+2021-04-22 Simon Marchi <simon.marchi@polymtl.ca>
+
+ * 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.
+
2021-04-18 Mike Frysinger <vapier@gentoo.org>
* gennltvals.py (TARGETS): Add moxie.
/* DEPRECATED */
/* VARARGS */
-static void
+static void ATTRIBUTE_PRINTF (2, 3)
os_printf_filtered (host_callback *p ATTRIBUTE_UNUSED, const char *format, ...)
{
va_list args;
}
/* VARARGS */
-static void
+static void ATTRIBUTE_PRINTF (2, 0)
os_vprintf_filtered (host_callback *p ATTRIBUTE_UNUSED, const char *format, va_list args)
{
vprintf (format, args);
}
/* VARARGS */
-static void
+static void ATTRIBUTE_PRINTF (2, 0)
os_evprintf_filtered (host_callback *p ATTRIBUTE_UNUSED, const char *format, va_list args)
{
vfprintf (stderr, format, args);
#ifdef __GNUC__
__attribute__ ((__noreturn__))
#endif
-static void
+static void ATTRIBUTE_PRINTF (2, 3)
os_error (host_callback *p ATTRIBUTE_UNUSED, const char *format, ...)
{
va_list args;
sim_cpu *cpu,
sim_cia cia,
const char *fmt,
- ...) __attribute__ ((format (printf, 4, 5))) __attribute__ ((noreturn));
+ ...) ATTRIBUTE_PRINTF (4, 5) __attribute__ ((noreturn));
extern void sim_engine_vabort
(SIM_DESC sd,
sim_cpu *cpu,
sim_cia cia,
const char *fmt,
- va_list ap) __attribute__ ((noreturn));
+ va_list ap) ATTRIBUTE_PRINTF (4, 0) __attribute__ ((noreturn));
/* No abort hook - when possible this function exits using the
engine_halt function (and SIM_ENGINE_HALT_HOOK). */
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,
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