]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
sim: ppc: use common ATTRIBUTE_PRINTF macros
authorMike Frysinger <vapier@gentoo.org>
Wed, 16 Jun 2021 00:46:10 +0000 (20:46 -0400)
committerMike Frysinger <vapier@gentoo.org>
Wed, 16 Jun 2021 05:14:05 +0000 (01:14 -0400)
Use the common ansidecl.h macros to replace our ad-hoc printf attributes.

sim/ppc/ChangeLog
sim/ppc/cpu.h
sim/ppc/device.h
sim/ppc/lf.h
sim/ppc/sim_callbacks.h
sim/ppc/tree.h

index 6456dde8e1aefaf0b9f1dbb3ae33e2694e62327a..fd3a0c81eca2bab4649a1b3cd045d19123952e47 100644 (file)
@@ -1,3 +1,18 @@
+2021-06-16  Mike Frysinger  <vapier@gentoo.org>
+
+       * cpu.h: Include ansidecl.h.
+       (cpu_error): Change __attribute__ ((format (printf... to
+       ATTRIBUTE_PRINTF_3.
+       * device.h (device_error): Change __attribute__ ((format (printf...
+       to ATTRIBUTE_PRINTF_2.
+       * lf.h: Include ansidecl.h.
+       (lf_printf): Change __attribute__ ((format (printf... to
+       ATTRIBUTE_PRINTF_2.
+       * sim_callbacks.h (sim_io_printf_filtered): Change __attribute__
+       ((format (printf... to ATTRIBUTE_PRINTF_1.
+       * tree.h (tree_parse): Change __attribute__ ((format (printf... to
+       ATTRIBUTE_PRINTF_2.
+
 2021-06-16  Mike Frysinger  <vapier@gentoo.org>
 
        * double.c: Include ansidecls.h.
index bafb5e1791a1f23fccf61d4e6f6afcc06f2d7ab0..7dc6074b9c6cc66af52447f1fbcbbc0704294e46 100644 (file)
@@ -34,6 +34,7 @@
 #include "os_emul.h"
 #include "mon.h"
 #include "model.h"
+#include "ansidecl.h"
 #include "libiberty.h"
 
 #ifndef CONST_ATTRIBUTE
@@ -113,7 +114,7 @@ EXTERN_CPU\
 (cpu *processor,
  unsigned_word cia,
  const char *fmt,
- ...) __attribute__ ((format (printf, 3, 4)));
+ ...) ATTRIBUTE_PRINTF_3;
 
 
 /* The processors local concept of time */
index 1bc000876eecc53a6e3d0dd409857bf2074ad954..68a2d24dd8dfd2899a4e060b823c9aed00f1367f 100644 (file)
@@ -729,7 +729,7 @@ EXTERN_DEVICE\
 (void) device_error
 (device *me,
  const char *fmt,
- ...) __attribute__ ((format (printf, 2, 3)));
+ ...) ATTRIBUTE_PRINTF_2;
 
 INLINE_DEVICE\
 (int) device_trace
index ce0b8763bba3e8015bcf97a855d7faee0ebd53a1..fabf8fbc58a8e2507af50536c57ec985a5dca47f 100644 (file)
@@ -20,6 +20,8 @@
 
 /* LF: Line Numbered Output Stream */
 
+#include "ansidecl.h"
+
 typedef struct _lf lf;
 
 typedef enum {
@@ -72,7 +74,7 @@ extern int lf_putbin
 extern int lf_printf
 (lf *file,
  const char *fmt,
- ...) __attribute__((format(printf, 2, 3)));
+ ...) ATTRIBUTE_PRINTF_2;
 
 
 /* Indentation control.
index e4d9c70bb016d29313e1d1338cfb7d78d51a0f5e..2b5f2a24c7be24c187750a2013cc9917ae2a47e9 100644 (file)
@@ -29,7 +29,7 @@
 
 #define printf_filtered sim_io_printf_filtered
 void sim_io_printf_filtered
-(const char *msg, ...) __attribute__ ((format (printf, 1, 2)));
+(const char *msg, ...) ATTRIBUTE_PRINTF_1;
 
 void ATTRIBUTE_NORETURN error
 (const char *msg, ...);
index 165612cb8ec9614060894d03f434d6a74117c904..6e278d9d14526adaaae4e8c642bdbb7bb93c3e13 100644 (file)
@@ -48,7 +48,7 @@ EXTERN_TREE\
 (device *) tree_parse
 (device *root,
  const char *fmt,
- ...) __attribute__ ((format (printf, 2, 3)));
+ ...) ATTRIBUTE_PRINTF_2;
 
 
 INLINE_TREE\