printf format strings to fix warnings

Joel Sherrill joel.sherrill at OARcorp.com
Mon Sep 23 21:57:40 UTC 2013


Hi

There are only a handful of printf format warnings currently.

      2  warning: format '%lc' expects argument of type 'wint_t', but
argument 4 has type 'wchar_t' [-Wformat=]
      4  warning: format '%lo' expects argument of type 'long unsigned
int', but argument 3 has type 'mode_t' [-Wformat=]
      2  warning: format '%lo' expects argument of type 'long unsigned
int', but argument 6 has type 'mode_t' [-Wformat=]
      2  warning: format '%lx' expects argument of type 'long unsigned
int', but argument 3 has type 'blkcnt_t' [-Wformat=]
      2  warning: format '%lx' expects argument of type 'long unsigned
int', but argument 3 has type 'blksize_t' [-Wformat=]
     22  warning: format '%lx' expects argument of type 'long unsigned
int', but argument 3 has type 'pthread_t' [-Wformat=]
      9  warning: format '%lx' expects argument of type 'long unsigned
int', but argument 4 has type 'pthread_t' [-Wformat=]

Any suggestions on how to address each class with a specific
inttyps.h type macro?

-- 
Joel Sherrill, Ph.D.             Director of Research & Development
joel.sherrill at OARcorp.com        On-Line Applications Research
Ask me about RTEMS: a free RTOS  Huntsville AL 35805
Support Available                (256) 722-9985



More information about the devel mailing list