* [PATCH] sim: io: tweak compiler workaround with error output
@ 2021-11-11 5:16 Mike Frysinger
0 siblings, 0 replies; only message in thread
From: Mike Frysinger @ 2021-11-11 5:16 UTC (permalink / raw)
To: gdb-patches
Outputting an extra space broke a cris test. Change the workaround
to use %s with an empty string to avoid the compiler warning but not
output an extra space.
---
sim/common/sim-io.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/sim/common/sim-io.c b/sim/common/sim-io.c
index 7bb504c74296..9fdc79e0301b 100644
--- a/sim/common/sim-io.c
+++ b/sim/common/sim-io.c
@@ -308,9 +308,9 @@ sim_io_error (SIM_DESC sd,
va_start (ap, fmt);
STATE_CALLBACK (sd)->evprintf_filtered (STATE_CALLBACK (sd), fmt, ap);
va_end (ap);
- /* Printing a space here avoids empty printf compiler warnings. Not ideal,
- but we want error's side-effect where it halts processing. */
- STATE_CALLBACK (sd)->error (STATE_CALLBACK (sd), " ");
+ /* The %s avoids empty printf compiler warnings. Not ideal, but we want
+ error's side-effect where it halts processing. */
+ STATE_CALLBACK (sd)->error (STATE_CALLBACK (sd), "%s", "");
}
}
--
2.33.0
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2021-11-11 5:16 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-11 5:16 [PATCH] sim: io: tweak compiler workaround with error output Mike Frysinger
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).