-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Description
Hi,
there's an issue with 'sprintf' issue.
CC sha256.c
CC aml_chksum.c
gcc -c -Wall -Werror -pedantic -std=c99 -O2 -I. aml_chksum.c -o aml_chksum.o
gcc -c -Wall -Werror -pedantic -std=c99 -O2 -I. sha256.c -o sha256.o
aml_chksum.c: In function ‘printf_sha256_sum’:
aml_chksum.c:21:3: error: ‘sprintf’ argument 3 overlaps destination object ‘str’ [-Werror=restrict]
21 | sprintf(str, "%s%02x", str, sum[index]);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
aml_chksum.c:17:7: note: destination object referenced by ‘restrict’-qualified argument 1 was declared here
17 | char str[SHA256_SUM_LEN * 2 + 1];
| ^~~
cc1: all warnings being treated as errors
make: *** [Makefile:28: aml_chksum.o] Error 1
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels