Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: "Aktemur, Tankut Baris via Gdb-patches" <gdb-patches@sourceware.org>
To: Mike Frysinger <vapier@gentoo.org>
Cc: "gdb-patches@sourceware.org" <gdb-patches@sourceware.org>
Subject: RE: [PATCH 2/3] sim: callback: add printf attributes
Date: Tue, 29 Jun 2021 07:01:13 +0000	[thread overview]
Message-ID: <SN6PR11MB2893D2C8C16B19C106725301C4029@SN6PR11MB2893.namprd11.prod.outlook.com> (raw)
In-Reply-To: <20210628032439.14514-2-vapier@gentoo.org>

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(-)

Hi,

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, "");
                                ^~

Thanks
-Baris


Intel Deutschland GmbH
Registered Address: Am Campeon 10, 85579 Neubiberg, Germany
Tel: +49 89 99 8853-0, www.intel.de <http://www.intel.de>
Managing Directors: Christin Eisenschmid, Sharon Heck, Tiffany Doon Silva  
Chairperson of the Supervisory Board: Nicole Lau
Registered Office: Munich
Commercial Register: Amtsgericht Muenchen HRB 186928

  reply	other threads:[~2021-06-29  7:01 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 [this message]
2021-06-29 14:32     ` Mike Frysinger via Gdb-patches
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=SN6PR11MB2893D2C8C16B19C106725301C4029@SN6PR11MB2893.namprd11.prod.outlook.com \
    --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