]> git.ozlabs.org Git - ccan/commitdiff
sha256: Mark parameters as potentially unused
authorJon Griffiths <jon_p_griffiths@yahoo.com>
Tue, 15 Mar 2016 06:48:29 +0000 (19:48 +1300)
committerJon Griffiths <jon_p_griffiths@yahoo.com>
Mon, 22 Aug 2016 12:29:20 +0000 (00:29 +1200)
Prevents warnings from gcc at higher warning levels.

Signed-off-by: Jon Griffiths <jon_p_griffiths@yahoo.com>
ccan/crypto/sha256/_info
ccan/crypto/sha256/sha256.c

index fe1f5b8c82060b084388663613d529f2187d5f52..ecd08745c0ad51abb274b55b6cdd13c8b45425c1 100644 (file)
@@ -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;
        }
index 40da0b4bb670d488b9a051b4307f8c41b9e8c42a..5c48ed07475f94d83f9ff84fd07da9b6a9555ea8 100644 (file)
@@ -8,6 +8,7 @@
  */
 #include <ccan/crypto/sha256/sha256.h>
 #include <ccan/endian/endian.h>
+#include <ccan/compiler/compiler.h>
 #include <stdbool.h>
 #include <assert.h>
 #include <string.h>
@@ -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;