aboutsummaryrefslogtreecommitdiff
path: root/gdb/remote-sim.c
diff options
context:
space:
mode:
authorSimon Marchi <simon.marchi@ericsson.com>2018-02-20 11:41:54 -0500
committerSimon Marchi <simon.marchi@ericsson.com>2018-02-20 11:41:54 -0500
commit7104e59bece90e387d70f617eb7ed4c34087283d (patch)
tree6b1cae121caf3533a8b6ff98fb455971510b355c /gdb/remote-sim.c
parentb0ab9c4549148435114b95edf38cbf4b6d9fec21 (diff)
downloadgdb-7104e59bece90e387d70f617eb7ed4c34087283d.zip
gdb-7104e59bece90e387d70f617eb7ed4c34087283d.tar.gz
gdb-7104e59bece90e387d70f617eb7ed4c34087283d.tar.bz2
remote-sim: Add missing ATTRIBUTE_PRINTF
Fixes: /home/emaisin/src/binutils-gdb/gdb/remote-sim.c:385:34: error: format string is not a string literal [-Werror,-Wformat-nonliteral] vfprintf_filtered (gdb_stdout, format, args); ^~~~~~ /home/emaisin/src/binutils-gdb/gdb/remote-sim.c:394:34: error: format string is not a string literal [-Werror,-Wformat-nonliteral] vfprintf_filtered (gdb_stdout, format, ap); ^~~~~~ /home/emaisin/src/binutils-gdb/gdb/remote-sim.c:402:34: error: format string is not a string literal [-Werror,-Wformat-nonliteral] vfprintf_filtered (gdb_stderr, format, ap); ^~~~~~ /home/emaisin/src/binutils-gdb/gdb/remote-sim.c:413:11: error: format string is not a string literal [-Werror,-Wformat-nonliteral] verror (format, args); ^~~~~~ 4 errors generated. gdb/ChangeLog: * remote-sim.c (gdb_os_printf_filtered, gdb_os_vprintf_filtered, gdb_os_evprintf_filtered, gdb_os_error): Add ATTRIBUTE_PRINTF.
Diffstat (limited to 'gdb/remote-sim.c')
-rw-r--r--gdb/remote-sim.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/gdb/remote-sim.c b/gdb/remote-sim.c
index 2f8fb68..456fa8a 100644
--- a/gdb/remote-sim.c
+++ b/gdb/remote-sim.c
@@ -376,8 +376,8 @@ gdb_os_flush_stderr (host_callback *p)
/* GDB version of printf_filtered callback. */
-static void
-gdb_os_printf_filtered (host_callback * p, const char *format,...)
+static void ATTRIBUTE_PRINTF (2, 3)
+gdb_os_printf_filtered (host_callback * p, const char *format, ...)
{
va_list args;
@@ -388,7 +388,7 @@ gdb_os_printf_filtered (host_callback * p, const char *format,...)
/* GDB version of error vprintf_filtered. */
-static void
+static void ATTRIBUTE_PRINTF (2, 0)
gdb_os_vprintf_filtered (host_callback * p, const char *format, va_list ap)
{
vfprintf_filtered (gdb_stdout, format, ap);
@@ -396,7 +396,7 @@ gdb_os_vprintf_filtered (host_callback * p, const char *format, va_list ap)
/* GDB version of error evprintf_filtered. */
-static void
+static void ATTRIBUTE_PRINTF (2, 0)
gdb_os_evprintf_filtered (host_callback * p, const char *format, va_list ap)
{
vfprintf_filtered (gdb_stderr, format, ap);
@@ -404,7 +404,7 @@ gdb_os_evprintf_filtered (host_callback * p, const char *format, va_list ap)
/* GDB version of error callback. */
-static void
+static void ATTRIBUTE_PRINTF (2, 3)
gdb_os_error (host_callback * p, const char *format, ...)
{
va_list args;