aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2021-11-11 00:14:46 -0500
committerMike Frysinger <vapier@gentoo.org>2021-11-11 00:16:33 -0500
commit40f64666780b1c6511c49aca6d6016f11b58e785 (patch)
treee6fd8875469fe5e0b150f9c3f52ea531f4e27b77
parentbebe33486cfbd26fed33caa6c8edc49cbdb74aa4 (diff)
downloadgdb-40f64666780b1c6511c49aca6d6016f11b58e785.zip
gdb-40f64666780b1c6511c49aca6d6016f11b58e785.tar.gz
gdb-40f64666780b1c6511c49aca6d6016f11b58e785.tar.bz2
sim: io: tweak compiler workaround with error output
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.
-rw-r--r--sim/common/sim-io.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sim/common/sim-io.c b/sim/common/sim-io.c
index 7bb504c..9fdc79e 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", "");
}
}