[PATCH] cpukit/../ratemonreportstatistics.c:Use rtems/inttypes removes 12 warnings.

Joel Sherrill joel at rtems.org
Tue Apr 25 12:08:57 UTC 2017


I pushed a slightly different patch to this file yesterday. I used
PRItime_t as I recall.

Update your tree. I got rid of a LOT of warnings this weekend.

--joel

On Apr 25, 2017 5:02 AM, "Cillian O'Donnell" <cpodonnell8 at gmail.com> wrote:

> ---
>  cpukit/rtems/src/ratemonreportstatistics.c | 15 ++++++++-------
>  1 file changed, 8 insertions(+), 7 deletions(-)
>
> diff --git a/cpukit/rtems/src/ratemonreportstatistics.c
> b/cpukit/rtems/src/ratemonreportstatistics.c
> index a1bab4a..78477b0 100644
> --- a/cpukit/rtems/src/ratemonreportstatistics.c
> +++ b/cpukit/rtems/src/ratemonreportstatistics.c
> @@ -21,13 +21,14 @@
>  #include <rtems/rtems/ratemonimpl.h>
>  #include <rtems/rtems/object.h>
>  #include <rtems/printer.h>
> +#include <rtems/inttypes.h>
>
>  #include <inttypes.h>
>
>  /* We print to 1/10's of milliseconds */
>  #define NANOSECONDS_DIVIDER 1000
>  #define PERCENT_FMT     "%04" PRId32
> -#define NANOSECONDS_FMT "%06" PRId32
> +#define NANOSECONDS_FMT "%06" PRIdtime_t
>
>  void rtems_rate_monotonic_report_statistics_with_plugin(
>    const rtems_printer *printer
> @@ -112,9 +113,9 @@ ididididid NNNN ccccc mmmmmm X
>
>        _Timespec_Divide_by_integer( total_cpu, the_stats.count,
> &cpu_average );
>        rtems_printf( printer,
> -        "%" PRId32 "."  NANOSECONDS_FMT "/"        /* min cpu time */
> -        "%" PRId32 "."  NANOSECONDS_FMT "/"        /* max cpu time */
> -        "%" PRId32 "."  NANOSECONDS_FMT " ",       /* avg cpu time */
> +        "%" PRIdtime_t "."  NANOSECONDS_FMT "/"        /* min cpu time */
> +        "%" PRIdtime_t "."  NANOSECONDS_FMT "/"        /* max cpu time */
> +        "%" PRIdtime_t "."  NANOSECONDS_FMT " ",       /* avg cpu time */
>          _Timespec_Get_seconds( min_cpu ),
>           _Timespec_Get_nanoseconds( min_cpu ) / NANOSECONDS_DIVIDER,
>          _Timespec_Get_seconds( max_cpu ),
> @@ -135,9 +136,9 @@ ididididid NNNN ccccc mmmmmm X
>
>        _Timespec_Divide_by_integer(total_wall, the_stats.count,
> &wall_average);
>        rtems_printf( printer,
> -        "%" PRId32 "." NANOSECONDS_FMT "/"        /* min wall time */
> -        "%" PRId32 "." NANOSECONDS_FMT "/"        /* max wall time */
> -        "%" PRId32 "." NANOSECONDS_FMT "\n",      /* avg wall time */
> +        "%" PRIdtime_t "." NANOSECONDS_FMT "/"        /* min wall time */
> +        "%" PRIdtime_t "." NANOSECONDS_FMT "/"        /* max wall time */
> +        "%" PRIdtime_t "." NANOSECONDS_FMT "\n",      /* avg wall time */
>          _Timespec_Get_seconds( min_wall ),
>            _Timespec_Get_nanoseconds( min_wall ) / NANOSECONDS_DIVIDER,
>          _Timespec_Get_seconds( max_wall ),
> --
> 2.7.4
>
> _______________________________________________
> devel mailing list
> devel at rtems.org
> http://lists.rtems.org/mailman/listinfo/devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/devel/attachments/20170425/6b458ca1/attachment-0002.html>


More information about the devel mailing list