summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGedare Bloom <gedare@rtems.org>2015-03-16 12:49:47 -0400
committerGedare Bloom <gedare@rtems.org>2015-03-16 12:49:47 -0400
commited152a0c4b714e2a9243181db6d09047cb7a546f (patch)
treeb9c997b5debcc5f67ae2f29fd77872373501024b
parent1ff449cfc473f6b88e1495492aebd665ad42b236 (diff)
downloadrtems-ed152a0c4b714e2a9243181db6d09047cb7a546f.tar.bz2
capture: fix warnings in print
-rw-r--r--cpukit/libmisc/capture/capture_support.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/cpukit/libmisc/capture/capture_support.c b/cpukit/libmisc/capture/capture_support.c
index 05e0e3bcc2..235459ae83 100644
--- a/cpukit/libmisc/capture/capture_support.c
+++ b/cpukit/libmisc/capture/capture_support.c
@@ -59,15 +59,17 @@ rtems_capture_print_timestamp (uint64_t uptime)
uint32_t minutes;
uint32_t seconds;
uint32_t nanosecs;
+ uint64_t up_secs;
- seconds = uptime / 1000000000LLU;
- minutes = seconds / 60;
+ up_secs = uptime / 1000000000LLU;
+ minutes = up_secs / 60;
hours = minutes / 60;
minutes = minutes % 60;
- seconds = seconds % 60;
+ seconds = up_secs % 60;
nanosecs = uptime % 1000000000;
- fprintf (stdout, "%5lu:%02lu:%02lu.%09lu", hours, minutes, seconds, nanosecs);
+ fprintf (stdout, "%5" PRIu32 ":%02" PRIu32 ":%02" PRIu32".%09" PRIu32,
+ hours, minutes, seconds, nanosecs);
}
void