[rtems commit] capture: fix warnings in print
Gedare Bloom
gedare at rtems.org
Mon Mar 16 17:13:07 UTC 2015
Module: rtems
Branch: master
Commit: ed152a0c4b714e2a9243181db6d09047cb7a546f
Changeset: http://git.rtems.org/rtems/commit/?id=ed152a0c4b714e2a9243181db6d09047cb7a546f
Author: Gedare Bloom <gedare at rtems.org>
Date: Mon Mar 16 12:49:47 2015 -0400
capture: fix warnings in print
---
cpukit/libmisc/capture/capture_support.c | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/cpukit/libmisc/capture/capture_support.c b/cpukit/libmisc/capture/capture_support.c
index 05e0e3b..235459a 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
More information about the vc
mailing list