diff options
author | Ruediger Meier | 2017-08-16 14:50:57 +0200 |
---|---|---|
committer | Ruediger Meier | 2017-08-16 15:51:15 +0200 |
commit | e282116f6d5ffa99ed2996f44aa262faa4fe8a1c (patch) | |
tree | 49d53d47f2698fca272ab7d881a97a930a1ea0fd /lib/randutils.c | |
parent | dmesg: fix delimiter calculation (diff) | |
download | kernel-qcow2-util-linux-e282116f6d5ffa99ed2996f44aa262faa4fe8a1c.tar.gz kernel-qcow2-util-linux-e282116f6d5ffa99ed2996f44aa262faa4fe8a1c.tar.xz kernel-qcow2-util-linux-e282116f6d5ffa99ed2996f44aa262faa4fe8a1c.zip |
misc: fix some printf format strings
Noticed on xcode/OSX.
Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
Diffstat (limited to 'lib/randutils.c')
-rw-r--r-- | lib/randutils.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/randutils.c b/lib/randutils.c index 43afc601d..b7e8e47e0 100644 --- a/lib/randutils.c +++ b/lib/randutils.c @@ -192,6 +192,8 @@ const char *random_tell_source(void) } #ifdef TEST_PROGRAM_RANDUTILS +#include <inttypes.h> + int main(int argc, char *argv[]) { size_t i, n; @@ -204,7 +206,7 @@ int main(int argc, char *argv[]) printf("Multiple random calls:\n"); for (i = 0; i < n; i++) { random_get_bytes(&v, sizeof(v)); - printf("#%02zu: %25ju\n", i, v); + printf("#%02zu: %25"PRIu64"\n", i, v); } @@ -217,7 +219,7 @@ int main(int argc, char *argv[]) random_get_bytes(buf, bufsz); for (i = 0; i < n; i++) { vp = (int64_t *) (buf + (i * sizeof(*vp))); - printf("#%02zu: %25ju\n", i, *vp); + printf("#%02zu: %25"PRIu64"\n", i, *vp); } return EXIT_SUCCESS; |