Fix compiler warnings in Sha1.c.
Some checks failed
Compile Cytoplasm / Compile Cytoplasm (x86, freebsd-v14.0) (push) Failing after 5s
Compile Cytoplasm / Compile Cytoplasm (x86_64, freebsd-v14.0) (push) Failing after 4s
Compile Cytoplasm / Compile Cytoplasm (x86_64, openbsd-v7.4) (push) Failing after 8s
Compile Cytoplasm / Compile Cytoplasm (x86, debian-v12.4) (push) Successful in 13s
Compile Cytoplasm / Compile Cytoplasm (x86, alpine-v3.19) (push) Successful in 12s
Compile Cytoplasm / Compile Cytoplasm (x86, netbsd-v9.3) (push) Successful in 12s
Compile Cytoplasm / Compile Cytoplasm (x86_64, debian-v12.4) (push) Successful in 15s
Compile Cytoplasm / Compile Cytoplasm (x86_64, alpine-v3.19) (push) Successful in 10s
Compile Cytoplasm / Compile Cytoplasm (x86_64, netbsd-v9.3) (push) Successful in 17s

These warnings are false positives emitted by GCC; there are no errors
in the code. By changing the parameter type to a pointer, we prevent
GCC from making faulty assumptions about the code.
This commit is contained in:
Jordan Bancino 2024-01-13 14:25:41 -05:00
parent f2e8334faf
commit 846e50a76e

View file

@ -60,7 +60,7 @@ typedef struct
} Sha1Context;
static void
Sha1Transform(uint32_t state[5], const uint8_t buffer[64])
Sha1Transform(uint32_t state[5], const uint8_t *buffer)
{
uint32_t a, b, c, d, e, i;
uint8_t workspace[64];