On Sun, 2018-03-25 at 09:06:47 UTC, Mathieu Malaterre wrote:
> Update the other prototype declarations in asm/xmon.h.
>
> Silence warnings (triggered at W=1) by adding relevant __printf attribute.
> Move #define at bottom of the file to prevent conflict with gcc attribute.
>
> Solve the original warning:
>
> arch/powerpc/xmon/nonstdio.c:178:2: error: function might be possible
> candidate for âgnu_printfâ format attribute
> [-Werror=suggest-attribute=format]
>
> In turn this uncovered the following (partial list) warnings (treated as
> errors with W=1):
>
> arch/powerpc/xmon/xmon.c:2866:17: error: format â%xâ expects argument
> of type âunsigned intâ, but argument 2 has type âunsigned char *â
> [-Werror=format=]
> arch/powerpc/xmon/xmon.c:1607:31: error: format â%lxâ expects argument
> of type âlong unsigned intâ, but argument 4 has type âstruct pt_regs
> *â [-Werror=format=]
> arch/powerpc/xmon/xmon.c:1611:9: error: too many arguments for format
> [-Werror=format-extra-args]
> arch/powerpc/xmon/xmon.c:1623:26: error: format â%lxâ expects argument
> of type âlong unsigned intâ, but argument 2 has type âstruct
> task_struct *â [-Werror=format=]
> arch/powerpc/xmon/xmon.c:630:36: error: format â%lxâ expects argument
> of type âlong unsigned intâ, but argument 2 has type âintâ
> [-Werror=format=]
> arch/powerpc/xmon/xmon.c:1392:15: error: format â%xâ expects argument
> of type âunsigned intâ, but argument 2 has type âlong intâ
> [-Werror=format=]
> arch/powerpc/xmon/xmon.c:2570:16: error: format â%lxâ expects argument
> of type âlong unsigned intâ, but argument 3 has type âu64 {aka long
> long unsigned int}â [-Werror=format=]
> arch/powerpc/xmon/xmon.c:1629:25: error: format â%ldâ expects argument
> of type âlong intâ, but argument 2 has type âpid_t {aka int}â
> [-Werror=format=]
> arch/powerpc/xmon/xmon.c:1168:18: error: format â%xâ expects argument
> of type âunsigned intâ, but argument 2 has type âlong unsigned intâ
> [-Werror=format=]
> arch/powerpc/xmon/xmon.c:3016:24: error: format â%lxâ expects argument
> of type âlong unsigned intâ, but argument 2 has type âpgd_t * {aka
> struct <anonymous> *}â [-Werror=format=]
> arch/powerpc/xmon/xmon.c:2339:9: error: format â%lxâ expects argument
> of type âlong unsigned intâ, but argument 5 has type âu64 {aka long
> long unsigned int}â [-Werror=format=]
> arch/powerpc/xmon/xmon.c:2339:9: error: format â%llxâ expects argument
> of type âlong long unsigned intâ, but argument 5 has type âlong
> unsigned intâ [-Werror=format=]
> arch/powerpc/xmon/xmon.c:3827:10: error: format â%pâ expects argument
> of type âvoid *â, but argument 4 has type âlong long unsigned intâ
> [-Werror=format=]
> arch/powerpc/xmon/xmon.c:3896:50: error: format â%dâ expects argument
> of type âintâ, but argument 2 has type âlong unsigned intâ
> [-Werror=format=]
> arch/powerpc/xmon/spu-dis.c:137:18: error: format â%dâ expects argument
> of type âintâ, but argument 2 has type âlong unsigned intâ
> [-Werror=format=]
> arch/powerpc/xmon/xmon.c:3827:10: error: format â%dâ expects argument
> of type âintâ, but argument 4 has type âu64 {aka long long unsigned
> int}â [-Werror=format=]
> arch/powerpc/xmon/xmon.c:1665:17: error: format â%ldâ expects argument
> of type âlong intâ, but argument 2 has type âintâ [-Werror=format=]
> arch/powerpc/xmon/xmon.c:2339:9: error: '#' flag used with â%pâ
> gnu_printf format [-Werror=format=]
>
> Signed-off-by: Mathieu Malaterre <[email protected]>
Applied to powerpc next, thanks.
https://git.kernel.org/powerpc/c/e70d8f55268ba95f00c61857df2bab
cheers