]> git.ozlabs.org Git - ccan/blobdiff - ccan/crypto/sha256/sha256.c
sha256: Mark parameters as potentially unused
[ccan] / ccan / crypto / sha256 / sha256.c
index 4b1f8cdf303af328320691cc4ee8b8403c65fb5a..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);
@@ -36,7 +37,7 @@ void sha256_init(struct sha256_ctx *ctx)
        SHA256_Init(&ctx->c);
 }
 
-void sha256_update_bytes(struct sha256_ctx *ctx, const void *p, size_t size)
+void sha256_update(struct sha256_ctx *ctx, const void *p, size_t size)
 {
        check_sha256(ctx);
        SHA256_Update(&ctx->c, p, size);
@@ -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;