Skip to content

Commit 6eb7efd

Browse files
committed
Suppress -Warray-parameter warnings in pgcrypto/sha2.c.
This is exactly the same problem as commit 1b242f4 fixed in ecpg, but in contrib/pgcrypto. Commit 273c458 eliminated the problem here for v10 and up. We hadn't noticed for exactly the same reasons enumerated in bbbf22c. 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
1 parent 9610c71 commit 6eb7efd

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

contrib/pgcrypto/sha2.c

+4-4
Original file line numberDiff line numberDiff line change
@@ -549,7 +549,7 @@ SHA256_Last(SHA256_CTX *context)
549549
}
550550

551551
void
552-
SHA256_Final(uint8 digest[], SHA256_CTX *context)
552+
SHA256_Final(uint8 digest[SHA256_DIGEST_LENGTH], SHA256_CTX *context)
553553
{
554554
/* If no digest buffer is passed, we don't bother doing this: */
555555
if (digest != NULL)
@@ -877,7 +877,7 @@ SHA512_Last(SHA512_CTX *context)
877877
}
878878

879879
void
880-
SHA512_Final(uint8 digest[], SHA512_CTX *context)
880+
SHA512_Final(uint8 digest[SHA512_DIGEST_LENGTH], SHA512_CTX *context)
881881
{
882882
/* If no digest buffer is passed, we don't bother doing this: */
883883
if (digest != NULL)
@@ -922,7 +922,7 @@ SHA384_Update(SHA384_CTX *context, const uint8 *data, size_t len)
922922
}
923923

924924
void
925-
SHA384_Final(uint8 digest[], SHA384_CTX *context)
925+
SHA384_Final(uint8 digest[SHA384_DIGEST_LENGTH], SHA384_CTX *context)
926926
{
927927
/* If no digest buffer is passed, we don't bother doing this: */
928928
if (digest != NULL)
@@ -966,7 +966,7 @@ SHA224_Update(SHA224_CTX *context, const uint8 *data, size_t len)
966966
}
967967

968968
void
969-
SHA224_Final(uint8 digest[], SHA224_CTX *context)
969+
SHA224_Final(uint8 digest[SHA224_DIGEST_LENGTH], SHA224_CTX *context)
970970
{
971971
/* If no digest buffer is passed, we don't bother doing this: */
972972
if (digest != NULL)

0 commit comments

Comments
 (0)