Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GCC: unused warnings #8359

Merged
merged 1 commit into from
Aug 23, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions src/crypto/hash-extra-jh.c
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,9 @@
#include "jh.h"
#include "hash-ops.h"

#define JH_HASH_BITLEN HASH_SIZE * 8

void hash_extra_jh(const void *data, size_t length, char *hash) {
int r = jh_hash(HASH_SIZE * 8, data, 8 * length, (uint8_t*)hash);
assert(SUCCESS == r);
// No need to check for failure b/c jh_hash only fails for invalid hash size
jh_hash(JH_HASH_BITLEN, data, 8 * length, (uint8_t*)hash);
}
6 changes: 4 additions & 2 deletions src/crypto/hash-extra-skein.c
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,9 @@
#include "hash-ops.h"
#include "skein.h"

#define SKEIN_HASH_BITLEN HASH_SIZE * 8

void hash_extra_skein(const void *data, size_t length, char *hash) {
int r = skein_hash(8 * HASH_SIZE, data, 8 * length, (uint8_t*)hash);
assert(SKEIN_SUCCESS == r);
// No need to check for failure b/c skein_hash only fails for invalid hash size
skein_hash(SKEIN_HASH_BITLEN, data, 8 * length, (uint8_t*)hash);
}
4 changes: 4 additions & 0 deletions src/device/device_ledger.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,10 @@ namespace hw {

#ifdef WITH_DEVICE_LEDGER

namespace {
bool apdu_verbose =true;
}

#undef MONERO_DEFAULT_LOG_CATEGORY
#define MONERO_DEFAULT_LOG_CATEGORY "device.ledger"

Expand Down
4 changes: 0 additions & 4 deletions src/device/device_ledger.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -87,10 +87,6 @@ namespace hw {
#define SW_PROTOCOL_NOT_SUPPORTED 0x6e00
#define SW_UNKNOWN 0x6f00

namespace {
bool apdu_verbose =true;
}

void set_apdu_verbose(bool verbose);

class ABPkeys {
Expand Down
4 changes: 4 additions & 0 deletions src/wallet/wallet2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3418,6 +3418,10 @@ void wallet2::refresh(bool trusted_daemon, uint64_t start_height, uint64_t & blo
uint64_t blocks_start_height;
std::vector<cryptonote::block_complete_entry> blocks;
std::vector<parsed_block> parsed_blocks;
// TODO moneromooo-monero says this about the "refreshed" variable:
// "I had to reorder some code to fix... a timing info leak IIRC. In turn, this undid something I had fixed before, ... a subtle race condition with the txpool.
// It was pretty subtle IIRC, and so I needed time to think about how to refix it after the move, and I never got to it."
// https://github.com/monero-project/monero/pull/6097
bool refreshed = false;
std::shared_ptr<std::map<std::pair<uint64_t, uint64_t>, size_t>> output_tracker_cache;
hw::device &hwdev = m_account.get_device();
Expand Down