Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/common/lib/libc/hash/sha2 Fix build with -Werror=array-param...



details:   https://anonhg.NetBSD.org/src/rev/af2bdcfbb81b
branches:  trunk
changeset: 1024557:af2bdcfbb81b
user:      christos <christos%NetBSD.org@localhost>
date:      Thu Oct 28 15:08:05 2021 +0000

description:
Fix build with -Werror=array-parameter (Etienne Brateau)

diffstat:

 common/lib/libc/hash/sha2/sha2.c |  14 +++++++-------
 1 files changed, 7 insertions(+), 7 deletions(-)

diffs (63 lines):

diff -r d2abb8102970 -r af2bdcfbb81b common/lib/libc/hash/sha2/sha2.c
--- a/common/lib/libc/hash/sha2/sha2.c  Thu Oct 28 14:54:32 2021 +0000
+++ b/common/lib/libc/hash/sha2/sha2.c  Thu Oct 28 15:08:05 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: sha2.c,v 1.24 2013/06/09 19:46:56 christos Exp $ */
+/* $NetBSD: sha2.c,v 1.25 2021/10/28 15:08:05 christos Exp $ */
 /*     $KAME: sha2.c,v 1.9 2003/07/20 00:28:38 itojun Exp $    */
 
 /*
@@ -43,7 +43,7 @@
 #include <sys/cdefs.h>
 
 #if defined(_KERNEL) || defined(_STANDALONE)
-__KERNEL_RCSID(0, "$NetBSD: sha2.c,v 1.24 2013/06/09 19:46:56 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sha2.c,v 1.25 2021/10/28 15:08:05 christos Exp $");
 
 #include <sys/param.h> /* XXX: to pull <machine/macros.h> for vax memset(9) */
 #include <lib/libkern/libkern.h>
@@ -51,7 +51,7 @@
 #else
 
 #if defined(LIBC_SCCS) && !defined(lint)
-__RCSID("$NetBSD: sha2.c,v 1.24 2013/06/09 19:46:56 christos Exp $");
+__RCSID("$NetBSD: sha2.c,v 1.25 2021/10/28 15:08:05 christos Exp $");
 #endif /* LIBC_SCCS and not lint */
 
 #include "namespace.h"
@@ -572,7 +572,7 @@
 }
 
 int
-SHA256_Final(uint8_t digest[], SHA256_CTX *context)
+SHA256_Final(uint8_t digest[SHA256_DIGEST_LENGTH], SHA256_CTX *context)
 {
        return SHA224_256_Final(digest, context, SHA256_DIGEST_LENGTH);
 }
@@ -606,7 +606,7 @@
 }
 
 int
-SHA224_Final(uint8_t digest[], SHA224_CTX *context)
+SHA224_Final(uint8_t digest[SHA224_DIGEST_LENGTH], SHA224_CTX *context)
 {
        return SHA224_256_Final(digest, (SHA256_CTX *)context,
            SHA224_DIGEST_LENGTH);
@@ -899,7 +899,7 @@
 }
 
 int
-SHA512_Final(uint8_t digest[], SHA512_CTX *context)
+SHA512_Final(uint8_t digest[SHA512_DIGEST_LENGTH], SHA512_CTX *context)
 {
        size_t i;
 
@@ -946,7 +946,7 @@
 }
 
 int
-SHA384_Final(uint8_t digest[], SHA384_CTX *context)
+SHA384_Final(uint8_t digest[SHA384_DIGEST_LENGTH], SHA384_CTX *context)
 {
        size_t i;
 



Home | Main Index | Thread Index | Old Index