]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
Add ATTRIBUTE_PRINTF to trace_start_error
authorSimon Marchi <simon.marchi@ericsson.com>
Sat, 17 Jun 2017 21:19:25 +0000 (23:19 +0200)
committerSimon Marchi <simon.marchi@ericsson.com>
Sat, 17 Jun 2017 21:19:25 +0000 (23:19 +0200)
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/ChangeLog
gdb/nat/fork-inferior.h

index a08c78123d4faadc3b6f177c4fc99178ce89260b..85ee3cfc0fac2c8849cd41b927901a263ef7b697 100644 (file)
@@ -1,3 +1,7 @@
+2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
+
+       * nat/fork-inferior.h (trace_start_error): Add ATTRIBUTE_PRINTF.
+
 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
 
        * configure: Re-generate.
index 10e383299c616109f42726e1d0ed14d80cfac7af..d369cff2f3d2ca88220afbc59d55bb79ce022796 100644 (file)
@@ -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