aboutsummaryrefslogtreecommitdiff
path: root/src/crypto
diff options
context:
space:
mode:
authorJeffrey Ryan <jeffreyryan@tutanota.com>2022-05-28 13:09:07 -0500
committerJeffrey Ryan <jeffreyryan@tutanota.com>2022-07-11 20:32:03 -0500
commit4d7f6f5cd51c0c02ab00c4f652015331e69ea1e0 (patch)
treec4c7f346f087d40e7b04a3aec615c97a2dde3761 /src/crypto
parentMerge pull request #8340 (diff)
downloadmonero-4d7f6f5cd51c0c02ab00c4f652015331e69ea1e0.tar.xz
GCC: fix some unused warnings
hash_extra: don't test for success in `jh_hash` and `skein_hash` since its guaranteed device_ledger: move anonymous global variable apdu_verbose into .cpp file Add comments to `refreshed` method variable in wallet2
Diffstat (limited to 'src/crypto')
-rw-r--r--src/crypto/hash-extra-jh.c6
-rw-r--r--src/crypto/hash-extra-skein.c6
2 files changed, 8 insertions, 4 deletions
diff --git a/src/crypto/hash-extra-jh.c b/src/crypto/hash-extra-jh.c
index 4d7481c07..52efd4ae3 100644
--- a/src/crypto/hash-extra-jh.c
+++ b/src/crypto/hash-extra-jh.c
@@ -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);
}
diff --git a/src/crypto/hash-extra-skein.c b/src/crypto/hash-extra-skein.c
index 9ea9c4faa..3eacaba58 100644
--- a/src/crypto/hash-extra-skein.c
+++ b/src/crypto/hash-extra-skein.c
@@ -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);
}