aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeff Garzik <jeff@garzik.org>2007-12-03 19:34:31 -0500
committerJeff Garzik <jeff@garzik.org>2007-12-03 19:34:31 -0500
commit92ee2129949818c72e45bdde20180281584e87e7 (patch)
treedce1696191a450536abd38426127a600e42c9242
parentaa1b70b8dc02845e8bb9bea84b1f7ee2e4bfa20b (diff)
downloadrng-tools-92ee2129949818c72e45bdde20180281584e87e7.tar.gz
rng-tools-92ee2129949818c72e45bdde20180281584e87e7.tar.xz
rng-tools-92ee2129949818c72e45bdde20180281584e87e7.zip
Fix uint64_t/unsigned long long printf(3) warnings.
-rw-r--r--rngtest.c3
-rw-r--r--stats.c6
2 files changed, 6 insertions, 3 deletions
diff --git a/rngtest.c b/rngtest.c
index 9be57ed..762415c 100644
--- a/rngtest.c
+++ b/rngtest.c
@@ -317,7 +317,8 @@ static void dump_rng_stats(void)
gettimeofday(&now, 0);
fprintf(stderr, "%sProgram run time: %llu microseconds\n",
- logprefix, elapsed_time(&rng_stats.progstart, &now));
+ logprefix,
+ (unsigned long long) elapsed_time(&rng_stats.progstart, &now));
}
/* Return 32 bits of bootstrap data */
diff --git a/stats.c b/stats.c
index dbdac5d..86c908d 100644
--- a/stats.c
+++ b/stats.c
@@ -105,7 +105,8 @@ char *dump_stat_counter(char *buf, int size,
const char *msg, uint64_t value)
{
buf[size-1] = 0;
- snprintf(buf, size-1, "%s%s: %llu", stat_prefix, msg, value);
+ snprintf(buf, size-1, "%s%s: %llu", stat_prefix, msg,
+ (unsigned long long) value);
return buf;
}
@@ -120,7 +121,8 @@ char *dump_stat_stat(char *buf, int size,
buf[size-1] = 0;
snprintf(buf, size-1, "%s%s: (min=%llu; avg=%.3f; max=%llu)%s",
- stat_prefix, msg, stat->min, avg, stat->max, unit);
+ stat_prefix, msg, (unsigned long long) stat->min, avg,
+ (unsigned long long) stat->max, unit);
return buf;
}