From: Mike Frysinger via Gdb-patches <gdb-patches@sourceware.org>
To: "Aktemur, Tankut Baris" <tankut.baris.aktemur@intel.com>
Cc: "gdb-patches@sourceware.org" <gdb-patches@sourceware.org>
Subject: Re: [PATCH 2/3] sim: callback: add printf attributes
Date: Tue, 29 Jun 2021 10:32:07 -0400 [thread overview]
Message-ID: <YNsu512zZdXFPCYp@vapier> (raw)
In-Reply-To: <SN6PR11MB2893D2C8C16B19C106725301C4029@SN6PR11MB2893.namprd11.prod.outlook.com>
On 29 Jun 2021 07:01, Aktemur, Tankut Baris wrote:
> On Monday, June 28, 2021 5:25 AM, Mike Frysinger wrote:
> > This helps these funcs get printf format checking coverage.
> >
> > The sim-io.c hack as a result is a bit unfortunate, but the compiler
> > throws warnings when printing with empty strings. In this one case,
> > we actually want that due to the side-effect of the callback halting
> > execution for us.
> > ---
> > include/sim/callback.h | 12 ++++++++----
> > sim/common/sim-io.c | 3 ++-
> > 2 files changed, 10 insertions(+), 5 deletions(-)
>
> This patch resulted in the following build error:
>
> /path/to/sim/ppc/sim_calls.c: In function ‘sim_io_error’:
> /path/to/sim/ppc/sim_calls.c:382:32: error: zero-length gnu_printf format string [-Werror=format-zero-length]
> callbacks->error (callbacks, "");
> ^~
> /path/to/sim/ppc/sim_calls.c: In function ‘error’:
> /path/to/sim/ppc/sim_calls.c:394:32: error: zero-length gnu_printf format string [-Werror=format-zero-length]
> callbacks->error (callbacks, "");
> ^~
are you forcing extra -W flags in your build ?
-mike
next prev parent reply other threads:[~2021-06-29 14:32 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-28 3:24 [PATCH 1/3] sim: callback: drop unused printf helpers Mike Frysinger via Gdb-patches
2021-06-28 3:24 ` [PATCH 2/3] sim: callback: add printf attributes Mike Frysinger via Gdb-patches
2021-06-29 7:01 ` Aktemur, Tankut Baris via Gdb-patches
2021-06-29 14:32 ` Mike Frysinger via Gdb-patches [this message]
2021-06-29 16:03 ` Aktemur, Tankut Baris via Gdb-patches
2021-06-29 20:35 ` Mike Frysinger via Gdb-patches
2021-07-02 0:34 ` Mike Frysinger via Gdb-patches
2021-07-02 7:16 ` Aktemur, Tankut Baris via Gdb-patches
2021-06-30 2:33 ` [PATCH] sim: ppc: fix printf warnings Mike Frysinger via Gdb-patches
2021-06-28 3:24 ` [PATCH 3/3] sim: io: add printf attributes to vprintf funcs too Mike Frysinger via Gdb-patches
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=YNsu512zZdXFPCYp@vapier \
--to=gdb-patches@sourceware.org \
--cc=tankut.baris.aktemur@intel.com \
--cc=vapier@gentoo.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