From 5f06669958a7f0376ce2725634340bd79522950d Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Fri, 2 Nov 2012 18:53:52 +0000 Subject: * configure: Rebuild. * configure.ac (build_warnings): Add -Wempty-body. * m68k-tdep.c (m68k_gdbarch_init): Remove empty 'if'. * remote.c (handle_notification): Use braces for empty 'else' body. * s390-tdep.c (s390_analyze_prologue): Use braces for empty 'else' body. * sh64-tdep.c (sh64_push_dummy_call): Use braces for empty 'else' body. * solib-som.c (som_relocate_section_addresses): Use braces for empty 'else' body. * ui-file.c (stdio_file_write): Use braces for empty 'if' body. (stdio_file_write_async_safe, stdio_file_fputs): Likewise. --- gdb/ui-file.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'gdb/ui-file.c') diff --git a/gdb/ui-file.c b/gdb/ui-file.c index 8528793c74d..68089e60dab 100644 --- a/gdb/ui-file.c +++ b/gdb/ui-file.c @@ -561,7 +561,9 @@ stdio_file_write (struct ui_file *file, const char *buf, long length_buf) _("stdio_file_write: bad magic number")); /* Calling error crashes when we are called from the exception framework. */ if (fwrite (buf, length_buf, 1, stdio->file)) - ; + { + /* Nothing. */ + } } static void @@ -583,7 +585,9 @@ stdio_file_write_async_safe (struct ui_file *file, result of write (since it can be declared with attribute warn_unused_result). Alas casting to void doesn't work for this. */ if (write (stdio->fd, buf, length_buf)) - ; + { + /* Nothing. */ + } } static void @@ -596,7 +600,9 @@ stdio_file_fputs (const char *linebuffer, struct ui_file *file) _("stdio_file_fputs: bad magic number")); /* Calling error crashes when we are called from the exception framework. */ if (fputs (linebuffer, stdio->file)) - ; + { + /* Nothing. */ + } } static int -- cgit v1.2.1