]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
sim: igen: add printf attributes to the prototypes too
authorMike Frysinger <vapier@gentoo.org>
Thu, 11 Jan 2024 02:41:40 +0000 (21:41 -0500)
committerMike Frysinger <vapier@gentoo.org>
Thu, 11 Jan 2024 03:30:58 +0000 (22:30 -0500)
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.

sim/igen/misc.h

index 04a7f720b41de5cd4b98199b59e7367e472fd0a0..5b3a1f03e71036a7ff4949b44b2058f09f408bf2 100644 (file)
@@ -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...) \