diff options
author | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2021-06-13 14:59:48 +0900 |
---|---|---|
committer | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2021-06-13 15:12:45 +0900 |
commit | 32b18fe9d04e9c95ac0b8d5df258226867efc063 (patch) | |
tree | 40a32217b47f23d5dd3f3af078966e4d16aeaa27 /ext | |
parent | 9ab6d39a66f4df16d0a6940a966afc69ba6c14d3 (diff) | |
download | ruby-32b18fe9d04e9c95ac0b8d5df258226867efc063.tar.gz |
Suppress array-parameter warnings by gcc 11
Diffstat (limited to 'ext')
-rw-r--r-- | ext/digest/sha2/sha2.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/ext/digest/sha2/sha2.c b/ext/digest/sha2/sha2.c index f55de33eb3..e7d7b15c5b 100644 --- a/ext/digest/sha2/sha2.c +++ b/ext/digest/sha2/sha2.c @@ -575,7 +575,7 @@ void SHA256_Update(SHA256_CTX* context, const sha2_byte *data, size_t len) { usedspace = freespace = 0; } -int SHA256_Final(sha2_byte digest[], SHA256_CTX* context) { +int SHA256_Final(sha2_byte digest[SHA256_DIGEST_LENGTH], SHA256_CTX* context) { sha2_word32 *d = (sha2_word32*)digest; unsigned int usedspace; @@ -640,7 +640,7 @@ int SHA256_Final(sha2_byte digest[], SHA256_CTX* context) { return 1; } -char *SHA256_End(SHA256_CTX* context, char buffer[]) { +char *SHA256_End(SHA256_CTX* context, char buffer[SHA256_DIGEST_STRING_LENGTH]) { sha2_byte digest[SHA256_DIGEST_LENGTH], *d = digest; int i; @@ -943,7 +943,7 @@ void SHA512_Last(SHA512_CTX* context) { SHA512_Transform(context, (sha2_word64*)context->buffer); } -int SHA512_Final(sha2_byte digest[], SHA512_CTX* context) { +int SHA512_Final(sha2_byte digest[SHA512_DIGEST_LENGTH], SHA512_CTX* context) { sha2_word64 *d = (sha2_word64*)digest; /* Sanity check: */ @@ -973,7 +973,7 @@ int SHA512_Final(sha2_byte digest[], SHA512_CTX* context) { return 1; } -char *SHA512_End(SHA512_CTX* context, char buffer[]) { +char *SHA512_End(SHA512_CTX* context, char buffer[SHA512_DIGEST_STRING_LENGTH]) { sha2_byte digest[SHA512_DIGEST_LENGTH], *d = digest; int i; @@ -1019,7 +1019,7 @@ void SHA384_Update(SHA384_CTX* context, const sha2_byte* data, size_t len) { SHA512_Update((SHA512_CTX*)context, data, len); } -int SHA384_Final(sha2_byte digest[], SHA384_CTX* context) { +int SHA384_Final(sha2_byte digest[SHA384_DIGEST_LENGTH], SHA384_CTX* context) { sha2_word64 *d = (sha2_word64*)digest; /* Sanity check: */ @@ -1049,7 +1049,7 @@ int SHA384_Final(sha2_byte digest[], SHA384_CTX* context) { return 1; } -char *SHA384_End(SHA384_CTX* context, char buffer[]) { +char *SHA384_End(SHA384_CTX* context, char buffer[SHA384_DIGEST_STRING_LENGTH]) { sha2_byte digest[SHA384_DIGEST_LENGTH], *d = digest; int i; |