From: Simon Marchi Date: Thu, 21 Sep 2017 13:19:40 +0000 (+0200) Subject: linux-waitpid: Get rid of format string warning X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=1e5b66ed4285ecf063e7801a46178ebb0ce5be41;p=binutils-gdb.git linux-waitpid: Get rid of format string warning Clang gives this warning: /home/emaisin/src/binutils-gdb/gdb/gdbserver/../nat/linux-waitpid.c:45:25: error: format string is not a string literal [-Werror,-Wformat-nonliteral] vfprintf (stderr, format, args); ^~~~~~ Get rid of it by adding ATTRIBUTE_PRINTF. gdb/ChangeLog: * nat/linux-waitpid.c (linux_debug): Add ATTRIBUTE_PRINTF. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 88e7a6eb4a4..5803abf2acb 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,7 @@ +2017-09-21 Simon Marchi + + * nat/linux-waitpid.c (linux_debug): Add ATTRIBUTE_PRINTF. + 2017-09-21 Simon Marchi * microblaze-tdep.c (microblaze_debug): Add ATTRIBUTE_PRINTF. diff --git a/gdb/nat/linux-waitpid.c b/gdb/nat/linux-waitpid.c index bf5e72546a9..05d1e267d03 100644 --- a/gdb/nat/linux-waitpid.c +++ b/gdb/nat/linux-waitpid.c @@ -34,7 +34,7 @@ /* Print debugging output based on the format string FORMAT and its parameters. */ -static inline void +static inline void ATTRIBUTE_PRINTF (1,2) linux_debug (const char *format, ...) { #ifdef GDBSERVER