aboutsummaryrefslogtreecommitdiff
path: root/gdb/nat
diff options
context:
space:
mode:
authorSimon Marchi <simon.marchi@ericsson.com>2017-09-21 15:19:40 +0200
committerSimon Marchi <simon.marchi@ericsson.com>2017-09-21 15:19:40 +0200
commit1e5b66ed4285ecf063e7801a46178ebb0ce5be41 (patch)
tree2e6faf4d37906907faec06f3fd41fbc3bb73ee39 /gdb/nat
parentebe48ba0856dcccaa7a60d873c61e6f1f96f5887 (diff)
downloadgdb-1e5b66ed4285ecf063e7801a46178ebb0ce5be41.zip
gdb-1e5b66ed4285ecf063e7801a46178ebb0ce5be41.tar.gz
gdb-1e5b66ed4285ecf063e7801a46178ebb0ce5be41.tar.bz2
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.
Diffstat (limited to 'gdb/nat')
-rw-r--r--gdb/nat/linux-waitpid.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gdb/nat/linux-waitpid.c b/gdb/nat/linux-waitpid.c
index bf5e725..05d1e26 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