Warning Update

Gedare Bloom gedare at rtems.org
Tue Mar 17 15:28:36 UTC 2015


On Mon, Mar 16, 2015 at 5:06 PM, Joel Sherrill
<joel.sherrill at oarcorp.com> wrote:
> Hi
>
> Gedare attempted to remove a couple of warnings and I wanted to pass
> along that in two cases, the warnings weren't resolved. These are from
> the sparc-erc32 and main_df.c previously didn't have warnings here.
>
> ../../../../../../rtems/c/src/../../cpukit/libmisc/shell/hexdump-conv.c:
> In function 'rtems_shell_hexdump_conv_c':
> ../../../../../../rtems/c/src/../../cpukit/libmisc/shell/hexdump-conv.c:145:6:
> warning: format '%lc' expects argument of type 'wint_t', but argument 4
> has type 'wchar_t' [-Wformat=]
>       (void)printf("%*s%lc", pad, "", wc);
>       ^
> ../../../../../../rtems/c/src/../../cpukit/libmisc/shell/hexdump-conv.c:145:6:
> warning: format '%lc' expects argument of type 'wint_t', but argument 4
> has type 'wchar_t' [-Wformat=]
These should be correct I think %lc is right for wchar_t?

> ../../../../../../rtems/c/src/../../cpukit/libmisc/shell/main_df.c: In
> function 'rtems_shell_df_print_entry':
> ../../../../../../rtems/c/src/../../cpukit/libmisc/shell/main_df.c:93:9:
> warning: format '%lu' expects argument of type 'long unsigned int', but
> argument 3 has type 'fsblkcnt_t' [-Wformat=]
>          mt_entry->target == NULL ? "none" : mt_entry->target);
>          ^
> ../../../../../../rtems/c/src/../../cpukit/libmisc/shell/main_df.c:93:9:
> warning: format '%lu' expects argument of type 'long unsigned int', but
> argument 4 has type 'fsblkcnt_t' [-Wformat=]
Have to look at this to see what the typedef is. if it is uint64_t
we'll need PRIu64 here.

> ../../../../../../rtems/c/src/../../cpukit/libmisc/shell/main_df.c:93:9:
> warning: format '%lu' expects argument of type 'long unsigned int', but
> argument 5 has type 'fsblkcnt_t' [-Wformat=]
> ../../../../../../rtems/c/src/../../cpukit/libmisc/shell/main_df.c:93:9:
> warning: format '%lu' expects argument of type 'long unsigned int', but
> argument 3 has type 'fsblkcnt_t' [-Wformat=]
> ../../../../../../rtems/c/src/../../cpukit/libmisc/shell/main_df.c:93:9:
> warning: format '%lu' expects argument of type 'long unsigned int', but
> argument 4 has type 'fsblkcnt_t' [-Wformat=]
> ../../../../../../rtems/c/src/../../cpukit/libmisc/shell/main_df.c:93:9:
> warning: format '%lu' expects argument of type 'long unsigned int', but
> argument 5 has type 'fsblkcnt_t' [-Wformat=]
>
> --
> 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