sim: io: add printf attributes to vprintf funcs too
authorMike Frysinger <vapier@gentoo.org>
Mon, 28 Jun 2021 03:23:40 +0000 (23:23 -0400)
committerMike Frysinger <vapier@gentoo.org>
Tue, 29 Jun 2021 06:20:28 +0000 (02:20 -0400)
The compiler can still do basic format checks with vprintf style
funcs, so add the printf attribute to these.

sim/common/ChangeLog
sim/common/sim-io.h

index 291d093b22541f1e6f1ef584cbeacc32e940be8e..6926fd3438b2195aedc41de27a7ecee9d8e61e33 100644 (file)
@@ -1,3 +1,8 @@
+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 " ".
index a78e8f59d5408f02357adc52b0af4e713461a092..9536e4b587a29209838a6fe710e78da4d497d9f6 100644 (file)
@@ -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,
This page took 0.02761 seconds and 4 git commands to generate.