public inbox for gdb-cvs@sourceware.org help / color / mirror / Atom feed
From: Simon Marchi <simark@sourceware.org> To: gdb-cvs@sourceware.org Subject: [binutils-gdb] gdb: add ATTRIBUTE_PRINTF to complaint_interceptor::issue_complaint Date: Wed, 13 Apr 2022 18:40:17 +0000 (GMT) [thread overview] Message-ID: <20220413184017.68B383858C53@sourceware.org> (raw) https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=08755c5aadfff98c4c3db60f3043589015414f11 commit 08755c5aadfff98c4c3db60f3043589015414f11 Author: Simon Marchi <simon.marchi@efficios.com> Date: Wed Apr 13 11:15:38 2022 -0400 gdb: add ATTRIBUTE_PRINTF to complaint_interceptor::issue_complaint Fix this error when building with clang++-14: CXX complaints.o /home/smarchi/src/binutils-gdb/gdb/complaints.c:130:65: error: format string is not a string literal [-Werror,-Wformat-nonliteral] g_complaint_interceptor->m_complaints.insert (string_vprintf (fmt, args)); ^~~ Change-Id: I0ef11f970510eb8638d1651fa0d5eeecd6a9d31a Diff: --- gdb/complaints.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/gdb/complaints.h b/gdb/complaints.h index 09d8cd39b27..68c79bd6d0a 100644 --- a/gdb/complaints.h +++ b/gdb/complaints.h @@ -70,11 +70,12 @@ private: /* The saved value of deprecated_warning_hook. */ void (*m_saved_warning_hook) (const char *, va_list) - ATTRIBUTE_FPTR_PRINTF(1,0); + ATTRIBUTE_FPTR_PRINTF (1,0); /* A helper function that is used by the 'complaint' implementation to issue a complaint. */ - static void issue_complaint (const char *, va_list); + static void issue_complaint (const char *, va_list) + ATTRIBUTE_PRINTF (1, 0); /* This object. Used by the static callback function. */ static complaint_interceptor *g_complaint_interceptor;
reply other threads:[~2022-04-13 18:40 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=20220413184017.68B383858C53@sourceware.org \ --to=simark@sourceware.org \ --cc=gdb-cvs@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: linkBe 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).