diff options
author | Mike Frysinger <vapier@gentoo.org> | 2021-06-27 23:23:40 -0400 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2021-06-29 02:20:28 -0400 |
commit | fda2f85e587cc9692ad19c396a170fdfde740476 (patch) | |
tree | 5b6d1a538afd7b80001f904ec8b2c9e4f10c9a2c /sim | |
parent | a1d9117f94cd835b266c6ec17b4cdcf4ce31b9ee (diff) | |
download | gdb-fda2f85e587cc9692ad19c396a170fdfde740476.zip gdb-fda2f85e587cc9692ad19c396a170fdfde740476.tar.gz gdb-fda2f85e587cc9692ad19c396a170fdfde740476.tar.bz2 |
sim: io: add printf attributes to vprintf funcs too
The compiler can still do basic format checks with vprintf style
funcs, so add the printf attribute to these.
Diffstat (limited to 'sim')
-rw-r--r-- | sim/common/ChangeLog | 5 | ||||
-rw-r--r-- | sim/common/sim-io.h | 6 |
2 files changed, 9 insertions, 2 deletions
diff --git a/sim/common/ChangeLog b/sim/common/ChangeLog index 291d093..6926fd3 100644 --- a/sim/common/ChangeLog +++ b/sim/common/ChangeLog @@ -1,5 +1,10 @@ 2021-06-29 Mike Frysinger <vapier@gentoo.org> + * sim-io.h (sim_io_vprintf): Add ATTRIBUTE_PRINTF. + (sim_io_evprintf): Likewise. + +2021-06-29 Mike Frysinger <vapier@gentoo.org> + * sim-io.c (sim_io_error): Change "" to " ". 2021-06-29 Mike Frysinger <vapier@gentoo.org> diff --git a/sim/common/sim-io.h b/sim/common/sim-io.h index a78e8f5..9536e4b 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, |