aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJean-Philippe Aumasson <jeanphilippe.aumasson@gmail.com>2019-09-14 12:43:31 +0200
committerGitHub <noreply@github.com>2019-09-14 12:43:31 +0200
commitb718d6107f12e641c65e8781b66ce9b050eb0e9e (patch)
tree672564456c8fa78f416ba201832a66c8a2ac0281
parentMerge pull request #15 from altendky/makefile_rounds_parameters (diff)
parentUse size_t and fixed with format specifiers for printf() (diff)
downloadsiphash-b718d6107f12e641c65e8781b66ce9b050eb0e9e.tar.gz
siphash-b718d6107f12e641c65e8781b66ce9b050eb0e9e.tar.xz
Merge pull request #17 from altendky/format_specifiers
Use size_t and fixed width format specifiers for printf()
Diffstat (limited to '')
-rw-r--r--halfsiphash.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/halfsiphash.c b/halfsiphash.c
index 862de9d..a929224 100644
--- a/halfsiphash.c
+++ b/halfsiphash.c
@@ -14,6 +14,7 @@
<http://creativecommons.org/publicdomain/zero/1.0/>.
*/
#include <assert.h>
+#include <inttypes.h>
#include <stdint.h>
#include <stdio.h>
#include <string.h>
@@ -59,10 +60,10 @@
#ifdef DEBUG
#define TRACE \
do { \
- printf("(%3d) v0 %08x\n", (int)inlen, v0); \
- printf("(%3d) v1 %08x\n", (int)inlen, v1); \
- printf("(%3d) v2 %08x\n", (int)inlen, v2); \
- printf("(%3d) v3 %08x\n", (int)inlen, v3); \
+ printf("(%3zu) v0 %08"PRIx32"\n", inlen, v0); \
+ printf("(%3zu) v1 %08"PRIx32"\n", inlen, v1); \
+ printf("(%3zu) v2 %08"PRIx32"\n", inlen, v2); \
+ printf("(%3zu) v3 %08"PRIx32"\n", inlen, v3); \
} while (0)
#else
#define TRACE