* 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.
This commit is contained in:
parent
b786c52157
commit
d4fb63e140
|
@ -1,3 +1,18 @@
|
|||
2012-11-02 Tom Tromey <tromey@redhat.com>
|
||||
|
||||
* 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.
|
||||
|
||||
2012-11-02 Pedro Alves <palves@redhat.com>
|
||||
|
||||
PR gdb/14766
|
||||
|
|
|
@ -12470,7 +12470,7 @@ build_warnings="-Wall -Wdeclaration-after-statement -Wpointer-arith \
|
|||
-Wformat-nonliteral -Wno-pointer-sign \
|
||||
-Wno-unused -Wunused-value -Wunused-function \
|
||||
-Wno-switch -Wno-char-subscripts -Wmissing-prototypes \
|
||||
-Wdeclaration-after-statement"
|
||||
-Wdeclaration-after-statement -Wempty-body"
|
||||
|
||||
# Enable -Wno-format by default when using gcc on mingw since many
|
||||
# GCC versions complain about %I64.
|
||||
|
|
|
@ -1920,7 +1920,7 @@ build_warnings="-Wall -Wdeclaration-after-statement -Wpointer-arith \
|
|||
-Wformat-nonliteral -Wno-pointer-sign \
|
||||
-Wno-unused -Wunused-value -Wunused-function \
|
||||
-Wno-switch -Wno-char-subscripts -Wmissing-prototypes \
|
||||
-Wdeclaration-after-statement"
|
||||
-Wdeclaration-after-statement -Wempty-body"
|
||||
|
||||
# Enable -Wno-format by default when using gcc on mingw since many
|
||||
# GCC versions complain about %I64.
|
||||
|
|
|
@ -1100,9 +1100,6 @@ m68k_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
|
|||
|
||||
feature = tdesc_find_feature (info.target_desc,
|
||||
"org.gnu.gdb.m68k.core");
|
||||
if (feature != NULL)
|
||||
/* Do nothing. */
|
||||
;
|
||||
|
||||
if (feature == NULL)
|
||||
{
|
||||
|
|
|
@ -6781,9 +6781,10 @@ handle_notification (char *buf)
|
|||
}
|
||||
}
|
||||
else
|
||||
/* We ignore notifications we don't recognize, for compatibility
|
||||
with newer stubs. */
|
||||
;
|
||||
{
|
||||
/* We ignore notifications we don't recognize, for compatibility
|
||||
with newer stubs. */
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -1461,13 +1461,14 @@ s390_analyze_prologue (struct gdbarch *gdbarch,
|
|||
break;
|
||||
|
||||
else
|
||||
/* An instruction we don't know how to simulate. The only
|
||||
safe thing to do would be to set every value we're tracking
|
||||
to 'unknown'. Instead, we'll be optimistic: we assume that
|
||||
we *can* interpret every instruction that the compiler uses
|
||||
to manipulate any of the data we're interested in here --
|
||||
then we can just ignore anything else. */
|
||||
;
|
||||
{
|
||||
/* An instruction we don't know how to simulate. The only
|
||||
safe thing to do would be to set every value we're tracking
|
||||
to 'unknown'. Instead, we'll be optimistic: we assume that
|
||||
we *can* interpret every instruction that the compiler uses
|
||||
to manipulate any of the data we're interested in here --
|
||||
then we can just ignore anything else. */
|
||||
}
|
||||
|
||||
/* Record the address after the last instruction that changed
|
||||
the FP, SP, or backlink. Ignore instructions that changed
|
||||
|
|
|
@ -1175,10 +1175,10 @@ sh64_push_dummy_call (struct gdbarch *gdbarch,
|
|||
int_argreg ++;
|
||||
}
|
||||
else
|
||||
;
|
||||
/* Store it as the integers, 8 bytes at the time, if
|
||||
necessary spilling on the stack. */
|
||||
|
||||
{
|
||||
/* Store it as the integers, 8 bytes at the time, if
|
||||
necessary spilling on the stack. */
|
||||
}
|
||||
}
|
||||
else if (len == 8)
|
||||
{
|
||||
|
@ -1202,9 +1202,10 @@ sh64_push_dummy_call (struct gdbarch *gdbarch,
|
|||
int_argreg ++;
|
||||
}
|
||||
else
|
||||
;
|
||||
/* Store it as the integers, 8 bytes at the time, if
|
||||
necessary spilling on the stack. */
|
||||
{
|
||||
/* Store it as the integers, 8 bytes at the time, if
|
||||
necessary spilling on the stack. */
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -126,7 +126,9 @@ som_relocate_section_addresses (struct so_list *so,
|
|||
sec->endaddr += so->lm_info->data_start;
|
||||
}
|
||||
else
|
||||
;
|
||||
{
|
||||
/* Nothing. */
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue