From 8c29b58e98b4a6d4354b0a5bea6af5ec47cc10aa Mon Sep 17 00:00:00 2001 From: Yao Qi Date: Mon, 26 Nov 2012 13:30:07 +0000 Subject: [PATCH] gdb/gdbserver/ 2012-11-26 Yao Qi * configure.ac (build_warnings): Append '-Wempty-body'. * configure: Regenerated. * linux-low.c (linux_create_inferior): Use braces for empty 'if' body. --- gdb/gdbserver/ChangeLog | 7 +++++++ gdb/gdbserver/configure | 2 +- gdb/gdbserver/configure.ac | 2 +- gdb/gdbserver/linux-low.c | 4 +++- 4 files changed, 12 insertions(+), 3 deletions(-) diff --git a/gdb/gdbserver/ChangeLog b/gdb/gdbserver/ChangeLog index 7025e582eea..efebfb111a0 100644 --- a/gdb/gdbserver/ChangeLog +++ b/gdb/gdbserver/ChangeLog @@ -1,3 +1,10 @@ +2012-11-26 Yao Qi + + * configure.ac (build_warnings): Append '-Wempty-body'. + * configure: Regenerated. + * linux-low.c (linux_create_inferior): Use braces for empty 'if' + body. + 2012-11-15 Pierre Muller * configure.ac (AC_CHECK_HEADERS): Add wait.h header. diff --git a/gdb/gdbserver/configure b/gdb/gdbserver/configure index b451a22bc32..02d45da71fc 100755 --- a/gdb/gdbserver/configure +++ b/gdb/gdbserver/configure @@ -4569,7 +4569,7 @@ if test "${ERROR_ON_WARNING}" = yes ; then fi build_warnings="-Wall -Wdeclaration-after-statement -Wpointer-arith \ --Wformat-nonliteral -Wno-char-subscripts" +-Wformat-nonliteral -Wno-char-subscripts -Wempty-body" WARN_CFLAGS="" if test "x$GCC" = xyes diff --git a/gdb/gdbserver/configure.ac b/gdb/gdbserver/configure.ac index 46f5dc024dc..36ed82f55da 100644 --- a/gdb/gdbserver/configure.ac +++ b/gdb/gdbserver/configure.ac @@ -126,7 +126,7 @@ if test "${ERROR_ON_WARNING}" = yes ; then fi build_warnings="-Wall -Wdeclaration-after-statement -Wpointer-arith \ --Wformat-nonliteral -Wno-char-subscripts" +-Wformat-nonliteral -Wno-char-subscripts -Wempty-body" WARN_CFLAGS="" if test "x$GCC" = xyes diff --git a/gdb/gdbserver/linux-low.c b/gdb/gdbserver/linux-low.c index 2de46d288b6..c697f6b4677 100644 --- a/gdb/gdbserver/linux-low.c +++ b/gdb/gdbserver/linux-low.c @@ -659,7 +659,9 @@ linux_create_inferior (char *program, char **allargs) dup2 (2, 1); if (write (2, "stdin/stdout redirected\n", sizeof ("stdin/stdout redirected\n") - 1) < 0) - /* Errors ignored. */; + { + /* Errors ignored. */; + } } execv (program, allargs); -- 2.30.2