From 379c2e545e137fb1de784b9297c4dc9da08d19bb Mon Sep 17 00:00:00 2001 From: Philip Rebohle Date: Mon, 11 Jul 2022 19:23:42 +0200 Subject: [PATCH] [util] Work around silly compiler warnings on GCC 12.1 No, we're not actually reading 64 bytes from a 1-byte area. --- src/util/sha1/sha1.c | 2 +- src/util/sha1/sha1.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/util/sha1/sha1.c b/src/util/sha1/sha1.c index 39e60675e..2782dd5a9 100644 --- a/src/util/sha1/sha1.c +++ b/src/util/sha1/sha1.c @@ -48,7 +48,7 @@ typedef union { * Hash a single 512-bit block. This is the core of the algorithm. */ void -SHA1Transform(uint32_t state[5], const uint8_t buffer[SHA1_BLOCK_LENGTH]) +SHA1Transform(uint32_t state[5], const uint8_t* buffer) { uint32_t a, b, c, d, e; uint8_t workspace[SHA1_BLOCK_LENGTH]; diff --git a/src/util/sha1/sha1.h b/src/util/sha1/sha1.h index 029a0ae87..06867b395 100644 --- a/src/util/sha1/sha1.h +++ b/src/util/sha1/sha1.h @@ -28,7 +28,7 @@ typedef struct _SHA1_CTX { void SHA1Init(SHA1_CTX *); void SHA1Pad(SHA1_CTX *); -void SHA1Transform(uint32_t [5], const uint8_t [SHA1_BLOCK_LENGTH]); +void SHA1Transform(uint32_t [5], const uint8_t*); void SHA1Update(SHA1_CTX *, const uint8_t *, size_t); void SHA1Final(uint8_t [SHA1_DIGEST_LENGTH], SHA1_CTX *);