aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2024-01-10 21:41:40 -0500
committerMike Frysinger <vapier@gentoo.org>2024-01-10 22:30:58 -0500
commitf0f0b063f0a6af814f3b3cc3872a69830d58980c (patch)
tree8bc326fcde05b4fc6d520ec275d958684e0b46e7
parent761ed61e7bcdd1579942482e0c035ca7773fc892 (diff)
downloadgdb-f0f0b063f0a6af814f3b3cc3872a69830d58980c.zip
gdb-f0f0b063f0a6af814f3b3cc3872a69830d58980c.tar.gz
gdb-f0f0b063f0a6af814f3b3cc3872a69830d58980c.tar.bz2
sim: igen: add printf attributes to the prototypes too
While gcc propagates the printf attribute via the typedef, clang doesn't seem to, so add it to the prototypes themselves too. We still keep it on the prototype for cases where it's used as a variable.
-rw-r--r--sim/igen/misc.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/sim/igen/misc.h b/sim/igen/misc.h
index 04a7f720..5b3a1f0 100644
--- a/sim/igen/misc.h
+++ b/sim/igen/misc.h
@@ -50,11 +50,11 @@ struct _line_ref
/* Error appends a new line, warning and notify do not */
typedef void error_func (const line_ref *line, const char *msg, ...)
- ATTRIBUTE_PRINTF (2, 3);
+ ATTRIBUTE_PRINTF_2;
-extern ATTRIBUTE_NORETURN error_func error;
-extern error_func warning;
-extern error_func notify;
+extern error_func error ATTRIBUTE_PRINTF_2 ATTRIBUTE_NORETURN;
+extern error_func warning ATTRIBUTE_PRINTF_2;
+extern error_func notify ATTRIBUTE_PRINTF_2;
#define ERROR(EXPRESSION, args...) \