postgres.git / summary / log / commit / refs

commit    d754ccc1ec9f367ef7bbcf0fa4bc230d04a2c341
Author:   Tom Lane <tgl@sss.pgh.pa.us>
Date:     Mon Dec 13 01:24:53 2021 +0000

    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) [parent: a86312362da4]