public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Mike Frysinger <vapier@gentoo.org>
To: gdb-patches@sourceware.org
Subject: [PATCH/committed 2/4] sim: m68hc11: tweak printf-style funcs
Date: Sat, 30 Jan 2021 13:40:14 -0500	[thread overview]
Message-ID: <20210130184016.7405-2-vapier@gentoo.org> (raw)
In-Reply-To: <20210130184016.7405-1-vapier@gentoo.org>

GCC complains that we past non-string literals to a printf style func,
so put a %s in here to keep it quiet.
---
 sim/m68hc11/ChangeLog | 4 ++++
 sim/m68hc11/interp.c  | 4 ++--
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/sim/m68hc11/ChangeLog b/sim/m68hc11/ChangeLog
index 90d73df898a7..7c956d1b6278 100644
--- a/sim/m68hc11/ChangeLog
+++ b/sim/m68hc11/ChangeLog
@@ -1,3 +1,7 @@
+2021-01-30  Mike Frysinger  <vapier@gentoo.org>
+
+	* interp.c (sim_get_info, sim_board_reset): Pass %s to sim_hw_parse.
+
 2021-01-30  Mike Frysinger  <vapier@gentoo.org>
 
 	* dv-m68hc11.c, m68hc11_sim.c: Include stdlib.h.
diff --git a/sim/m68hc11/interp.c b/sim/m68hc11/interp.c
index 26f2d1527beb..7dc8e25c0462 100644
--- a/sim/m68hc11/interp.c
+++ b/sim/m68hc11/interp.c
@@ -100,7 +100,7 @@ sim_get_info (SIM_DESC sd, char *cmd)
 	  sim_io_eprintf (sd, "Valid devices: cpu timer sio eeprom\n");
 	  return;
 	}
-      hw_dev = sim_hw_parse (sd, dev_list[i].device);
+      hw_dev = sim_hw_parse (sd, "%s", dev_list[i].device);
       if (hw_dev == 0)
 	{
 	  sim_io_eprintf (sd, "Device '%s' not found\n", dev_list[i].device);
@@ -138,7 +138,7 @@ sim_board_reset (SIM_DESC sd)
       cpu_type = "/m68hc12";
     }
   
-  hw_cpu = sim_hw_parse (sd, cpu_type);
+  hw_cpu = sim_hw_parse (sd, "%s", cpu_type);
   if (hw_cpu == 0)
     {
       sim_io_eprintf (sd, "%s cpu not found in device tree.", cpu_type);
-- 
2.30.0


  reply	other threads:[~2021-01-30 18:40 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-30 18:40 [PATCH/committed 1/4] sim: m68hc11: include stdlib.h for prototypes Mike Frysinger
2021-01-30 18:40 ` Mike Frysinger [this message]
2021-01-30 18:40 ` [PATCH/committed 3/4] sim: m68hc11: localize a few functions Mike Frysinger
2021-01-30 18:40 ` [PATCH/committed 4/4] sim: m68hc11: fix printf size warnings Mike Frysinger

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=20210130184016.7405-2-vapier@gentoo.org \
    --to=vapier@gentoo.org \
    --cc=gdb-patches@sourceware.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 read-only IMAP folder(s) and NNTP newsgroup(s).