Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Mike Frysinger via Gdb-patches <gdb-patches@sourceware.org>
To: gdb-patches@sourceware.org
Subject: [PATCH 3/3] sim: io: add printf attributes to vprintf funcs too
Date: Sun, 27 Jun 2021 23:24:39 -0400	[thread overview]
Message-ID: <20210628032439.14514-3-vapier@gentoo.org> (raw)
In-Reply-To: <20210628032439.14514-1-vapier@gentoo.org>

The compiler can still do basic format checks with vprintf style
funcs, so add the printf attribute to these.
---
 sim/common/sim-io.h | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/sim/common/sim-io.h b/sim/common/sim-io.h
index a78e8f59d540..9536e4b587a2 100644
--- a/sim/common/sim-io.h
+++ b/sim/common/sim-io.h
@@ -65,13 +65,15 @@ void sim_io_printf (SIM_DESC sd,
 		    const char *fmt,
 		    ...) ATTRIBUTE_PRINTF (2, 3);
 
-void sim_io_vprintf (SIM_DESC sd, const char *fmt, va_list ap);
+void sim_io_vprintf (SIM_DESC sd, const char *fmt, va_list ap)
+  ATTRIBUTE_PRINTF (2, 0);
 
 void sim_io_eprintf (SIM_DESC sd,
 		     const char *fmt,
 		     ...) ATTRIBUTE_PRINTF (2, 3);
 
-void sim_io_evprintf (SIM_DESC sd, const char *fmt, va_list ap);
+void sim_io_evprintf (SIM_DESC sd, const char *fmt, va_list ap)
+  ATTRIBUTE_PRINTF (2, 0);
 
 void sim_io_error (SIM_DESC sd,
 		   const char *fmt,
-- 
2.31.1


      parent reply	other threads:[~2021-06-28  3:25 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
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 ` Mike Frysinger via Gdb-patches [this message]

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=20210628032439.14514-3-vapier@gentoo.org \
    --to=gdb-patches@sourceware.org \
    --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