Merge pull request #21 from altendky/full_siphash_format_specifiers

Use size_t and fixed width format specifiers for printf()...  for siphash.c
main
Jean-Philippe Aumasson 2019-09-19 19:10:29 -04:00 committed by GitHub
commit 42efb6c384
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 8 deletions

View File

@ -15,6 +15,7 @@
<http://creativecommons.org/publicdomain/zero/1.0/>.
*/
#include <assert.h>
#include <inttypes.h>
#include <stdint.h>
#include <stdio.h>
#include <string.h>
@ -66,14 +67,10 @@
#ifdef DEBUG
#define TRACE \
do { \
printf("(%3d) v0 %08x %08x\n", (int)inlen, (uint32_t)(v0 >> 32), \
(uint32_t)v0); \
printf("(%3d) v1 %08x %08x\n", (int)inlen, (uint32_t)(v1 >> 32), \
(uint32_t)v1); \
printf("(%3d) v2 %08x %08x\n", (int)inlen, (uint32_t)(v2 >> 32), \
(uint32_t)v2); \
printf("(%3d) v3 %08x %08x\n", (int)inlen, (uint32_t)(v3 >> 32), \
(uint32_t)v3); \
printf("(%3zu) v0 %016"PRIx64"\n", inlen, v0); \
printf("(%3zu) v1 %016"PRIx64"\n", inlen, v1); \
printf("(%3zu) v2 %016"PRIx64"\n", inlen, v2); \
printf("(%3zu) v3 %016"PRIx64"\n", inlen, v3); \
} while (0)
#else
#define TRACE