Changeset a300ca1b in rtems


Ignore:
Timestamp:
Apr 24, 2017, 1:35:41 AM (3 years ago)
Author:
Joel Sherrill <joel@…>
Branches:
master
Children:
523b4fb
Parents:
5e899b5
git-author:
Joel Sherrill <joel@…> (04/24/17 01:35:41)
git-committer:
Joel Sherrill <joel@…> (04/24/17 17:00:57)
Message:

ratemonreportstatistics.c: Fix printf() warnings so clean on 32 and 64 bit architectures

File:
1 edited

Legend:

Unmodified
Added
Removed
  • cpukit/rtems/src/ratemonreportstatistics.c

    r5e899b5 ra300ca1b  
    2424
    2525#include <inttypes.h>
     26#include <rtems/inttypes.h>
    2627
    2728/* We print to 1/10's of milliseconds */
    2829#define NANOSECONDS_DIVIDER 1000
    2930#define PERCENT_FMT     "%04" PRId32
    30 #define NANOSECONDS_FMT "%06" PRId32
     31#define NANOSECONDS_FMT "%06" PRIdtime_t
    3132
    3233void rtems_rate_monotonic_report_statistics_with_plugin(
     
    113114      _Timespec_Divide_by_integer( total_cpu, the_stats.count, &cpu_average );
    114115      rtems_printf( printer,
    115         "%" PRId32 "."  NANOSECONDS_FMT "/"        /* min cpu time */
    116         "%" PRId32 "."  NANOSECONDS_FMT "/"        /* max cpu time */
    117         "%" PRId32 "."  NANOSECONDS_FMT " ",       /* avg cpu time */
     116        "%" PRIdtime_t "."  NANOSECONDS_FMT "/"        /* min cpu time */
     117        "%" PRIdtime_t "."  NANOSECONDS_FMT "/"        /* max cpu time */
     118        "%" PRIdtime_t "."  NANOSECONDS_FMT " ",       /* avg cpu time */
    118119        _Timespec_Get_seconds( min_cpu ),
    119120          _Timespec_Get_nanoseconds( min_cpu ) / NANOSECONDS_DIVIDER,
     
    136137      _Timespec_Divide_by_integer(total_wall, the_stats.count, &wall_average);
    137138      rtems_printf( printer,
    138         "%" PRId32 "." NANOSECONDS_FMT "/"        /* min wall time */
    139         "%" PRId32 "." NANOSECONDS_FMT "/"        /* max wall time */
    140         "%" PRId32 "." NANOSECONDS_FMT "\n",      /* avg wall time */
     139        "%" PRIdtime_t "." NANOSECONDS_FMT "/"        /* min wall time */
     140        "%" PRIdtime_t "." NANOSECONDS_FMT "/"        /* max wall time */
     141        "%" PRIdtime_t "." NANOSECONDS_FMT "\n",      /* avg wall time */
    141142        _Timespec_Get_seconds( min_wall ),
    142143          _Timespec_Get_nanoseconds( min_wall ) / NANOSECONDS_DIVIDER,
Note: See TracChangeset for help on using the changeset viewer.