Skip to content
This repository was archived by the owner on Mar 5, 2024. It is now read-only.

Commit 82dac3f

Browse files
author
Colin Ian King
committed
Fix warning on incorrect printf type for unsigned int num_bytes
Minor issued when sanity checking code with cppcheck static analysis: [tests/test_ecc_utils.c:116]: (warning) %d in format string (no. 1) requires 'int' but the argument type is 'unsigned int'. use %u instead of %d Signed-off-by: Colin Ian King <[email protected]>
1 parent 09139db commit 82dac3f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tests/test_ecc_utils.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ void string2scalar(uint32_t * scalar, uint32_t num_word32, char *str) {
114114

115115
if (0 > (padding = 2*num_bytes - strlen(str))) {
116116
printf(
117-
"Error: 2*num_bytes(%d) < strlen(hex) (%zu)\n",
117+
"Error: 2*num_bytes(%u) < strlen(hex) (%zu)\n",
118118
2*num_bytes,
119119
strlen(str));
120120
exit(-1);

0 commit comments

Comments
 (0)