From: Sergio Durigan Junior <sergiodj@redhat.com>
To: Simon Marchi <simon.marchi@ericsson.com>
Cc: <gdb-patches@sourceware.org>
Subject: Re: [PATCH 5/5] Add ATTRIBUTE_PRINTF to trace_start_error
Date: Wed, 14 Jun 2017 19:49:00 -0000 [thread overview]
Message-ID: <87d1a6cptq.fsf@redhat.com> (raw)
In-Reply-To: <1497124689-11842-6-git-send-email-simon.marchi@ericsson.com> (Simon Marchi's message of "Sat, 10 Jun 2017 21:58:09 +0200")
On Saturday, June 10 2017, Simon Marchi wrote:
> clang complains that the fmt passed to vwarning in trace_start_error is
> not a literal. This looks like a fair warning, which can be removed by
> adding ATTRIBUTE_PRINTF to the declaration of trace_start_error.
>
> gdb/ChangeLog:
>
> * nat/fork-inferior.h (trace_start_error): Add ATTRIBUTE_PRINTF.
> ---
> gdb/nat/fork-inferior.h | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/gdb/nat/fork-inferior.h b/gdb/nat/fork-inferior.h
> index 10e3832..d369cff 100644
> --- a/gdb/nat/fork-inferior.h
> +++ b/gdb/nat/fork-inferior.h
> @@ -95,7 +95,7 @@ extern void gdb_flush_out_err ();
> (i.e., when the "traceme_fun" callback is called on fork_inferior)
> and bail out. This function does not return. */
> extern void trace_start_error (const char *fmt, ...)
> - ATTRIBUTE_NORETURN;
> + ATTRIBUTE_NORETURN ATTRIBUTE_PRINTF (1, 2);
>
> /* Like "trace_start_error", but the error message is constructed by
> combining STRING with the system error message for errno. This
> --
> 2.7.4
Thanks, this looks good to me.
--
Sergio
GPG key ID: 237A 54B1 0287 28BF 00EF 31F4 D0EB 7628 65FC 5E36
Please send encrypted e-mail if possible
http://sergiodj.net/
next prev parent reply other threads:[~2017-06-14 19:49 UTC|newest]
Thread overview: 38+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-10 19:58 [PATCH 0/5] Remove a few hurdles of compiling with clang Simon Marchi
2017-06-10 19:58 ` [PATCH 4/5] linux-low: Remove usage of "register" keyword Simon Marchi
2017-06-10 19:58 ` [PATCH 3/5] gdb: Add -Wno-mismatched-tags Simon Marchi
2017-06-10 19:58 ` [PATCH 2/5] gdb: Use -Werror when checking for (un)supported warning flags Simon Marchi
2017-06-10 19:58 ` [PATCH 1/5] gdb: Pass -x c++ to the compiler Simon Marchi
2017-06-10 19:58 ` [PATCH 5/5] Add ATTRIBUTE_PRINTF to trace_start_error Simon Marchi
2017-06-14 19:49 ` Sergio Durigan Junior [this message]
2017-06-11 2:36 ` [PATCH 0/5] Remove a few hurdles of compiling with clang Eli Zaretskii
2017-06-12 7:56 ` Yao Qi
2017-06-12 14:36 ` Eli Zaretskii
2017-06-12 15:54 ` Simon Marchi
2017-06-12 16:23 ` Andrew Pinski
2017-06-12 16:35 ` Pedro Alves
2017-06-12 16:37 ` Andrew Pinski
2017-06-12 16:45 ` Pedro Alves
2017-06-12 16:55 ` Pedro Alves
2017-06-12 16:44 ` Simon Marchi
2017-06-12 16:55 ` Andrew Pinski
2017-06-12 17:00 ` Simon Marchi
2017-06-12 16:44 ` Eli Zaretskii
2017-06-13 9:14 ` Yao Qi
2017-06-13 10:23 ` Simon Marchi
2017-06-13 11:06 ` Pedro Alves
2017-06-13 11:08 ` Simon Marchi
2017-06-13 14:38 ` Eli Zaretskii
2017-06-13 17:07 ` Simon Marchi
2017-06-13 19:23 ` Eli Zaretskii
2017-06-13 20:17 ` Simon Marchi
2017-06-14 2:29 ` Eli Zaretskii
2017-06-14 10:45 ` Pedro Alves
2017-06-16 16:12 ` John Baldwin
2017-06-13 15:22 ` Yao Qi
2017-06-13 15:44 ` Eli Zaretskii
2017-06-14 9:07 ` Yao Qi
2017-06-19 8:07 ` Yao Qi
2017-06-13 10:44 ` Pedro Alves
2017-06-13 15:09 ` Joel Brobecker
2017-06-17 21:23 ` Simon Marchi
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=87d1a6cptq.fsf@redhat.com \
--to=sergiodj@redhat.com \
--cc=gdb-patches@sourceware.org \
--cc=simon.marchi@ericsson.com \
/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).