From: Simon Marchi Date: Sat, 17 Jun 2017 21:19:25 +0000 (+0200) Subject: Add ATTRIBUTE_PRINTF to trace_start_error X-Git-Tag: users/hjl/linux/release/2.28.51.0.1~1^2~12^2~7 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=1d4fbac99e05c2d2ea98984f9bc6f7d7f1a183b7;p=thirdparty%2Fbinutils-gdb.git Add ATTRIBUTE_PRINTF to trace_start_error 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. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index a08c78123d4..85ee3cfc0fa 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,7 @@ +2017-06-17 Simon Marchi + + * nat/fork-inferior.h (trace_start_error): Add ATTRIBUTE_PRINTF. + 2017-06-17 Simon Marchi * configure: Re-generate. diff --git a/gdb/nat/fork-inferior.h b/gdb/nat/fork-inferior.h index 10e383299c6..d369cff2f3d 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