From: Jon Griffiths Date: Tue, 15 Mar 2016 06:48:29 +0000 (+1300) Subject: sha256: Mark parameters as potentially unused X-Git-Url: https://git.ozlabs.org/?p=ccan;a=commitdiff_plain;h=cedcaa1bbb44cad610973c449340c0fde9ae0280 sha256: Mark parameters as potentially unused Prevents warnings from gcc at higher warning levels. Signed-off-by: Jon Griffiths --- diff --git a/ccan/crypto/sha256/_info b/ccan/crypto/sha256/_info index fe1f5b8c..ecd08745 100644 --- a/ccan/crypto/sha256/_info +++ b/ccan/crypto/sha256/_info @@ -40,6 +40,7 @@ int main(int argc, char *argv[]) return 1; if (strcmp(argv[1], "depends") == 0) { + printf("ccan/compiler\n"); printf("ccan/endian\n"); return 0; } diff --git a/ccan/crypto/sha256/sha256.c b/ccan/crypto/sha256/sha256.c index 40da0b4b..5c48ed07 100644 --- a/ccan/crypto/sha256/sha256.c +++ b/ccan/crypto/sha256/sha256.c @@ -8,6 +8,7 @@ */ #include #include +#include #include #include #include @@ -21,7 +22,7 @@ static void invalidate_sha256(struct sha256_ctx *ctx) #endif } -static void check_sha256(struct sha256_ctx *ctx) +static void check_sha256(struct sha256_ctx *ctx UNUSED) { #ifdef CCAN_CRYPTO_SHA256_USE_OPENSSL assert(ctx->c.md_len != 0); @@ -166,7 +167,7 @@ static void Transform(uint32_t *s, const uint32_t *chunk) s[7] += h; } -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 return true;