[PATCH 11/11] Change inttype used and add casts, fixes 6 format warnings.
Cillian O'Donnell
cpodonnell8 at gmail.com
Fri Apr 7 22:37:47 UTC 2017
Unfortunately I couldn't figure out how to do this without casts. Either
32 or 64 bit was unhappy one way or the other. Type time_t seems to
be particularly tricky.
---
cpukit/rtems/src/ratemonreportstatistics.c | 36 +++++++++++++++---------------
1 file changed, 18 insertions(+), 18 deletions(-)
diff --git a/cpukit/rtems/src/ratemonreportstatistics.c b/cpukit/rtems/src/ratemonreportstatistics.c
index f3b4f36..a1bab4a 100644
--- a/cpukit/rtems/src/ratemonreportstatistics.c
+++ b/cpukit/rtems/src/ratemonreportstatistics.c
@@ -112,15 +112,15 @@ ididididid NNNN ccccc mmmmmm X
_Timespec_Divide_by_integer( total_cpu, the_stats.count, &cpu_average );
rtems_printf( printer,
- "%" PRIdMAX "." NANOSECONDS_FMT "/" /* min cpu time */
- "%" PRIdMAX "." NANOSECONDS_FMT "/" /* max cpu time */
- "%" PRIdMAX "." NANOSECONDS_FMT " ", /* avg cpu time */
- (intmax_t) _Timespec_Get_seconds( min_cpu ),
- (int) _Timespec_Get_nanoseconds( min_cpu ) / NANOSECONDS_DIVIDER,
- (intmax_t) _Timespec_Get_seconds( max_cpu ),
- (int) _Timespec_Get_nanoseconds( max_cpu ) / NANOSECONDS_DIVIDER,
- (intmax_t) _Timespec_Get_seconds( &cpu_average ),
- (int) _Timespec_Get_nanoseconds( &cpu_average ) / NANOSECONDS_DIVIDER
+ "%" PRId32 "." NANOSECONDS_FMT "/" /* min cpu time */
+ "%" PRId32 "." NANOSECONDS_FMT "/" /* max cpu time */
+ "%" PRId32 "." NANOSECONDS_FMT " ", /* avg cpu time */
+ _Timespec_Get_seconds( min_cpu ),
+ _Timespec_Get_nanoseconds( min_cpu ) / NANOSECONDS_DIVIDER,
+ _Timespec_Get_seconds( max_cpu ),
+ _Timespec_Get_nanoseconds( max_cpu ) / NANOSECONDS_DIVIDER,
+ _Timespec_Get_seconds( &cpu_average ),
+ _Timespec_Get_nanoseconds( &cpu_average ) / NANOSECONDS_DIVIDER
);
}
@@ -135,15 +135,15 @@ ididididid NNNN ccccc mmmmmm X
_Timespec_Divide_by_integer(total_wall, the_stats.count, &wall_average);
rtems_printf( printer,
- "%" PRIdMAX "." NANOSECONDS_FMT "/" /* min wall time */
- "%" PRIdMAX "." NANOSECONDS_FMT "/" /* max wall time */
- "%" PRIdMAX "." NANOSECONDS_FMT "\n", /* avg wall time */
- (intmax_t) _Timespec_Get_seconds( min_wall ),
- (int) _Timespec_Get_nanoseconds( min_wall ) / NANOSECONDS_DIVIDER,
- (intmax_t) _Timespec_Get_seconds( max_wall ),
- (int) _Timespec_Get_nanoseconds( max_wall ) / NANOSECONDS_DIVIDER,
- (intmax_t) _Timespec_Get_seconds( &wall_average ),
- (int) _Timespec_Get_nanoseconds( &wall_average ) / NANOSECONDS_DIVIDER
+ "%" PRId32 "." NANOSECONDS_FMT "/" /* min wall time */
+ "%" PRId32 "." NANOSECONDS_FMT "/" /* max wall time */
+ "%" PRId32 "." NANOSECONDS_FMT "\n", /* avg wall time */
+ _Timespec_Get_seconds( min_wall ),
+ _Timespec_Get_nanoseconds( min_wall ) / NANOSECONDS_DIVIDER,
+ _Timespec_Get_seconds( max_wall ),
+ _Timespec_Get_nanoseconds( max_wall ) / NANOSECONDS_DIVIDER,
+ _Timespec_Get_seconds( &wall_average ),
+ _Timespec_Get_nanoseconds( &wall_average ) / NANOSECONDS_DIVIDER
);
}
}
--
2.7.4
More information about the devel
mailing list