From 25c8e5ef077ed726bfec93dffd4f7870b7ed4313 Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Sun, 12 Dec 2021 20:24:46 -0500 Subject: [PATCH] Suppress -Warray-parameter warnings in pgcrypto/sha2.c. This is exactly the same problem as commit 1b242f42b fixed in ecpg, but in contrib/pgcrypto. Commit 273c458a2 eliminated the problem here for v10 and up. We hadn't noticed for exactly the same reasons enumerated in bbbf22cf3. Back-patch down to 9.2, pursuant to newly-established project policy about keeping out-of-support branches buildable. Discussion: https://postgr.es/m/d0316012-ece7-7b7e-2d36-9c38cb77cb3b@enterprisedb.com --- contrib/pgcrypto/sha2.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/contrib/pgcrypto/sha2.c b/contrib/pgcrypto/sha2.c index 231f9dfbb0e..11311deda8d 100644 --- a/contrib/pgcrypto/sha2.c +++ b/contrib/pgcrypto/sha2.c @@ -549,7 +549,7 @@ SHA256_Last(SHA256_CTX *context) } void -SHA256_Final(uint8 digest[], SHA256_CTX *context) +SHA256_Final(uint8 digest[SHA256_DIGEST_LENGTH], SHA256_CTX *context) { /* If no digest buffer is passed, we don't bother doing this: */ if (digest != NULL) @@ -877,7 +877,7 @@ SHA512_Last(SHA512_CTX *context) } void -SHA512_Final(uint8 digest[], SHA512_CTX *context) +SHA512_Final(uint8 digest[SHA512_DIGEST_LENGTH], SHA512_CTX *context) { /* If no digest buffer is passed, we don't bother doing this: */ if (digest != NULL) @@ -922,7 +922,7 @@ SHA384_Update(SHA384_CTX *context, const uint8 *data, size_t len) } void -SHA384_Final(uint8 digest[], SHA384_CTX *context) +SHA384_Final(uint8 digest[SHA384_DIGEST_LENGTH], SHA384_CTX *context) { /* If no digest buffer is passed, we don't bother doing this: */ if (digest != NULL) @@ -966,7 +966,7 @@ SHA224_Update(SHA224_CTX *context, const uint8 *data, size_t len) } void -SHA224_Final(uint8 digest[], SHA224_CTX *context) +SHA224_Final(uint8 digest[SHA224_DIGEST_LENGTH], SHA224_CTX *context) { /* If no digest buffer is passed, we don't bother doing this: */ if (digest != NULL) -- 2.39.5