summaryrefslogtreecommitdiff
path: root/base
diff options
context:
space:
mode:
authorRobin Watts <Robin.Watts@artifex.com>2023-05-15 17:21:20 +0100
committerRobin Watts <Robin.Watts@artifex.com>2023-05-15 17:42:44 +0100
commit63f2f72a5d94e9085525197745935b4954b346fa (patch)
tree6c023dbca83c04dc2e296427c12d8736b81f4b0f /base
parentd9162e337a7e6c3603700b42e37eb9aaaff69bf0 (diff)
downloadghostpdl-63f2f72a5d94e9085525197745935b4954b346fa.tar.gz
Squash various warnings.
Unused variables, 'may be used unset' or implementations not matching prototypes. These show up now as the gcc version on the nodes has increased.
Diffstat (limited to 'base')
-rw-r--r--base/sha2.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/base/sha2.c b/base/sha2.c
index 30b333240..50e676afe 100644
--- a/base/sha2.c
+++ b/base/sha2.c
@@ -583,7 +583,7 @@ void pSHA256_Update(SHA256_CTX* context, const sha2_byte *data, size_t len) {
usedspace = freespace = 0;
}
-void pSHA256_Final(sha2_byte digest[], SHA256_CTX* context) {
+void pSHA256_Final(sha2_byte digest[SHA256_DIGEST_LENGTH], SHA256_CTX* context) {
sha2_word32 *d = (sha2_word32*)digest;
unsigned int usedspace;
@@ -646,7 +646,7 @@ void pSHA256_Final(sha2_byte digest[], SHA256_CTX* context) {
usedspace = 0;
}
-char *pSHA256_End(SHA256_CTX* context, char buffer[]) {
+char *pSHA256_End(SHA256_CTX* context, char buffer[SHA256_DIGEST_STRING_LENGTH]) {
sha2_byte digest[SHA256_DIGEST_LENGTH], *d = digest;
int i;
@@ -944,7 +944,7 @@ void pSHA512_Last(SHA512_CTX* context) {
pSHA512_Transform(context, (sha2_word64*)context->buffer);
}
-void pSHA512_Final(sha2_byte digest[], SHA512_CTX* context) {
+void pSHA512_Final(sha2_byte digest[SHA512_DIGEST_LENGTH], SHA512_CTX* context) {
sha2_word64 *d = (sha2_word64*)digest;
/* Sanity check: */
@@ -973,7 +973,7 @@ void pSHA512_Final(sha2_byte digest[], SHA512_CTX* context) {
MEMSET_BZERO(context, sizeof(*context));
}
-char *pSHA512_End(SHA512_CTX* context, char buffer[]) {
+char *pSHA512_End(SHA512_CTX* context, char buffer[SHA512_DIGEST_STRING_LENGTH]) {
sha2_byte digest[SHA512_DIGEST_LENGTH], *d = digest;
int i;
@@ -1018,7 +1018,7 @@ void pSHA384_Update(SHA384_CTX* context, const sha2_byte* data, size_t len) {
pSHA512_Update((SHA512_CTX*)context, data, len);
}
-void pSHA384_Final(sha2_byte digest[], SHA384_CTX* context) {
+void pSHA384_Final(sha2_byte digest[SHA384_DIGEST_LENGTH], SHA384_CTX* context) {
sha2_word64 *d = (sha2_word64*)digest;
/* Sanity check: */
@@ -1047,7 +1047,7 @@ void pSHA384_Final(sha2_byte digest[], SHA384_CTX* context) {
MEMSET_BZERO(context, sizeof(*context));
}
-char *pSHA384_End(SHA384_CTX* context, char buffer[]) {
+char *pSHA384_End(SHA384_CTX* context, char buffer[SHA384_DIGEST_STRING_LENGTH]) {
sha2_byte digest[SHA384_DIGEST_LENGTH], *d = digest;
int i;