From: Mike Frysinger <vapier@gentoo.org>
To: gdb-patches@sourceware.org
Subject: [PATCH/committed] sim: igen: add printf attributes to the prototypes too
Date: Wed, 10 Jan 2024 22:31:29 -0500 [thread overview]
Message-ID: <20240111033129.25402-1-vapier@gentoo.org> (raw)
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 | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/sim/igen/misc.h b/sim/igen/misc.h
index 04a7f720b41d..5b3a1f03e710 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...) \
--
2.43.0
reply other threads:[~2024-01-11 3:31 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240111033129.25402-1-vapier@gentoo.org \
--to=vapier@gentoo.org \
--cc=gdb-patches@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).