diff options
author | Simon Marchi <simon.marchi@polymtl.ca> | 2021-04-22 12:07:14 -0400 |
---|---|---|
committer | Simon Marchi <simon.marchi@polymtl.ca> | 2021-04-22 12:07:14 -0400 |
commit | 2f63213381e3b073f169ee776043486b44ea2e68 (patch) | |
tree | 55947613d8a4dc4a2262758c5ae053b950e7f0e1 /sim/common/sim-events.h | |
parent | 4efeb0d3e8ee210cd61b15355cca39b16b66004d (diff) | |
download | gdb-2f63213381e3b073f169ee776043486b44ea2e68.zip gdb-2f63213381e3b073f169ee776043486b44ea2e68.tar.gz gdb-2f63213381e3b073f169ee776043486b44ea2e68.tar.bz2 |
sim: sprinkle some ATTRIBUTE_PRINTF
Add some ATTRIBUTE_PRINTF attributes to functions that take a format
string, to fix a few -Wformat-nonliteral warnings. Use the
ATTRIBUTE_PRINTF macro like we use in GDB, instead of spelling out
__attribute__((format...)). Use ATTRIBUTE_NULL_PRINTF at one place,
because callers expect to be able to pass NULL.
sim/common/ChangeLog:
* callback.c (os_printf_filtered, os_vprintf_filtered,
os_evprintf_filtered, os_error): Use ATTRIBUTE_PRINTF.
* sim-engine.h (sim_engine_abort, sim_engine_vabort): Likewise.
* sim-events.h (sim_events_schedule_tracef,
sim_events_schedule_vtracef): Use ATTRIBUTE_NULL_PRINTF.
Change-Id: Icd206f7b2c325e8b144f72eb129fb2a6b5af2fa3
Diffstat (limited to 'sim/common/sim-events.h')
-rw-r--r-- | sim/common/sim-events.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sim/common/sim-events.h b/sim/common/sim-events.h index 7a5fc96..3f1501e 100644 --- a/sim/common/sim-events.h +++ b/sim/common/sim-events.h @@ -117,7 +117,7 @@ extern sim_event *sim_events_schedule_tracef sim_event_handler *handler, void *data, const char *fmt, - ...) __attribute__ ((format (printf, 5, 6))); + ...) ATTRIBUTE_NULL_PRINTF (5, 6); extern sim_event *sim_events_schedule_vtracef (SIM_DESC sd, @@ -125,7 +125,7 @@ extern sim_event *sim_events_schedule_vtracef sim_event_handler *handler, void *data, const char *fmt, - va_list ap); + va_list ap) ATTRIBUTE_NULL_PRINTF (5, 0); extern void sim_events_schedule_after_signal |