Module Name: src
Committed By: christos
Date: Thu Oct 28 15:08:05 UTC 2021
Modified Files:
src/common/lib/libc/hash/sha2: sha2.c
Log Message:
Fix build with -Werror=array-parameter (Etienne Brateau)
To generate a diff of this commit:
cvs rdiff -u -r1.24 -r1.25 src/common/lib/libc/hash/sha2/sha2.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/common/lib/libc/hash/sha2/sha2.c
diff -u src/common/lib/libc/hash/sha2/sha2.c:1.24 src/common/lib/libc/hash/sha2/sha2.c:1.25
--- src/common/lib/libc/hash/sha2/sha2.c:1.24 Sun Jun 9 15:46:56 2013
+++ src/common/lib/libc/hash/sha2/sha2.c Thu Oct 28 11:08:05 2021
@@ -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 @@ __KERNEL_RCSID(0, "$NetBSD: sha2.c,v 1.2
#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 @@ SHA224_256_Final(uint8_t digest[], SHA25
}
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 @@ SHA224_Transform(SHA224_CTX *context, co
}
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 @@ SHA512_Last(SHA512_CTX *context)
}
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 @@ SHA384_Transform(SHA512_CTX *context, co
}
int
-SHA384_Final(uint8_t digest[], SHA384_CTX *context)
+SHA384_Final(uint8_t digest[SHA384_DIGEST_LENGTH], SHA384_CTX *context)
{
size_t i;