Commit a6bb84ad authored by Jon Griffiths's avatar Jon Griffiths

ripemd160: Mark parameters as potentially unused

Prevents warnings from gcc at higher warning levels.
Signed-off-by: default avatarJon Griffiths <jon_p_griffiths@yahoo.com>
parent c21a1eff
...@@ -40,6 +40,7 @@ int main(int argc, char *argv[]) ...@@ -40,6 +40,7 @@ int main(int argc, char *argv[])
return 1; return 1;
if (strcmp(argv[1], "depends") == 0) { if (strcmp(argv[1], "depends") == 0) {
printf("ccan/compiler\n");
printf("ccan/endian\n"); printf("ccan/endian\n");
return 0; return 0;
} }
......
...@@ -8,6 +8,7 @@ ...@@ -8,6 +8,7 @@
*/ */
#include <ccan/crypto/ripemd160/ripemd160.h> #include <ccan/crypto/ripemd160/ripemd160.h>
#include <ccan/endian/endian.h> #include <ccan/endian/endian.h>
#include <ccan/compiler/compiler.h>
#include <stdbool.h> #include <stdbool.h>
#include <assert.h> #include <assert.h>
#include <string.h> #include <string.h>
...@@ -21,7 +22,7 @@ static void invalidate_ripemd160(struct ripemd160_ctx *ctx) ...@@ -21,7 +22,7 @@ static void invalidate_ripemd160(struct ripemd160_ctx *ctx)
#endif #endif
} }
static void check_ripemd160(struct ripemd160_ctx *ctx) static void check_ripemd160(struct ripemd160_ctx *ctx UNUSED)
{ {
#ifdef CCAN_CRYPTO_RIPEMD160_USE_OPENSSL #ifdef CCAN_CRYPTO_RIPEMD160_USE_OPENSSL
assert(ctx->c.num != -1U); assert(ctx->c.num != -1U);
...@@ -66,7 +67,7 @@ static void inline Initialize(uint32_t* s) ...@@ -66,7 +67,7 @@ static void inline Initialize(uint32_t* s)
static uint32_t inline rol(uint32_t x, int i) { return (x << i) | (x >> (32 - i)); } static uint32_t inline rol(uint32_t x, int i) { return (x << i) | (x >> (32 - i)); }
static void inline Round(uint32_t *a, uint32_t b, uint32_t *c, uint32_t d, uint32_t e, uint32_t f, uint32_t x, uint32_t k, int r) static void inline Round(uint32_t *a, uint32_t b UNUSED, uint32_t *c, uint32_t d UNUSED, uint32_t e, uint32_t f, uint32_t x, uint32_t k, int r)
{ {
*a = rol(*a + f + x + k, r) + e; *a = rol(*a + f + x + k, r) + e;
*c = rol(*c, 10); *c = rol(*c, 10);
...@@ -267,7 +268,7 @@ static void Transform(uint32_t *s, const uint32_t *chunk) ...@@ -267,7 +268,7 @@ static void Transform(uint32_t *s, const uint32_t *chunk)
s[4] = t + b1 + c2; s[4] = t + b1 + c2;
} }
static bool alignment_ok(const void *p, size_t n) static bool alignment_ok(const void *p UNUSED, size_t n UNUSED)
{ {
#if HAVE_UNALIGNED_ACCESS #if HAVE_UNALIGNED_ACCESS
return true; return true;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment