From: Michael Ellerman <patch-notifications@ellerman.id.au>
To: Mathieu Malaterre <malat@debian.org>
Cc: Mathieu Malaterre <malat@debian.org>,
Paul Mackerras <paulus@samba.org>,
linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org
Subject: Re: [v2] xmon: Use __printf markup to silence compiler
Date: Fri, 25 May 2018 21:41:24 +1000 (AEST) [thread overview]
Message-ID: <40skq861hKz9s3c@ozlabs.org> (raw)
In-Reply-To: <20180325090648.1029-1-malat@debian.org>
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 3731 bytes --]
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 <malat@debian.org>
Applied to powerpc next, thanks.
https://git.kernel.org/powerpc/c/e70d8f55268ba95f00c61857df2bab
cheers
next prev parent reply other threads:[~2018-05-25 11:41 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-03-16 11:02 [PATCH 00/19] Start using __printf attribute (single commit series) Mathieu Malaterre
2018-03-16 11:02 ` [PATCH 01/19] xmon: Use __printf markup to silence compiler Mathieu Malaterre
2018-03-17 23:33 ` kbuild test robot
2018-03-18 0:27 ` kbuild test robot
2018-03-25 9:06 ` [PATCH v2] " Mathieu Malaterre
2018-04-24 18:55 ` Mathieu Malaterre
2018-05-25 11:41 ` Michael Ellerman [this message]
2018-03-16 11:02 ` [PATCH 02/19] ppc32: change %x into %lx Mathieu Malaterre
2018-03-16 11:02 ` [PATCH 03/19] ppc32: Change %.16x into %p Mathieu Malaterre
2018-03-16 11:02 ` [PATCH 04/19] ppc32: change %lx " Mathieu Malaterre
2018-03-16 11:02 ` [PATCH 05/19] ppc32: change %lx into %tx (ptrdiff_t) Mathieu Malaterre
2018-03-16 11:02 ` [PATCH 06/19] ppc64: change %lx into %llx Mathieu Malaterre
2018-03-16 11:02 ` [PATCH 07/19] ppc64: change %ld into %d Mathieu Malaterre
2018-03-16 11:02 ` [PATCH 08/19] ppc64: change %x into %lx Mathieu Malaterre
2018-03-16 11:02 ` [PATCH 09/19] ppc64: change %016lx into %p Mathieu Malaterre
2018-03-16 11:02 ` [PATCH 10/19] ppc64: change %lx " Mathieu Malaterre
2018-03-16 11:02 ` [PATCH 11/19] ppc64: change %lx into %x Mathieu Malaterre
2018-03-16 11:02 ` [PATCH 12/19] ppc64: change %lx into %llx Mathieu Malaterre
2018-03-16 11:02 ` [PATCH 13/19] ppc64: change %llx into %lx Mathieu Malaterre
2018-03-16 11:02 ` [PATCH 14/19] ppc64: change %p into %llx Mathieu Malaterre
2018-03-16 11:02 ` [PATCH 15/19] ppc64: change %d into %ld Mathieu Malaterre
2018-03-16 11:02 ` [PATCH 16/19] ppc64: Change %d into %lu Mathieu Malaterre
2018-03-16 11:02 ` [PATCH 17/19] ppc64: change %d into %llu Mathieu Malaterre
2018-03-16 11:02 ` [PATCH 18/19] ppc64: change %ld into %d Mathieu Malaterre
2018-03-16 11:02 ` [PATCH 19/19] ppc64: Handle %p format in DUMPPTR() function-like macro Mathieu Malaterre
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=40skq861hKz9s3c@ozlabs.org \
--to=patch-notifications@ellerman.id.au \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=malat@debian.org \
--cc=paulus@samba.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).