add -Wold-style-definition
authorTom Tromey <tromey@redhat.com>
Mon, 1 Jul 2013 19:52:32 +0000 (19:52 +0000)
committerTom Tromey <tromey@redhat.com>
Mon, 1 Jul 2013 19:52:32 +0000 (19:52 +0000)
This adds -Wold-style-definition to gdb's list of warnings.  This
found a couple of spots where "()" was used where "(void)" is more
correct.

Tested by rebuilding on x86-64 Fedora 18.

* configure.ac (build_warnings): Add -Wold-style-definition.
* configure: Rebuild.
* machoread.c (_initialize_machoread): Use "(void)".
* macrocmd.c (macro_inform_no_debuginfo): Fix formatting;
use "(void)".

gdb/ChangeLog
gdb/configure
gdb/configure.ac
gdb/machoread.c
gdb/macrocmd.c

index 6e2d3550244aedccaf6f04534165556cdd9eb36e..d3e76d3cadef6cdce3c25f0b8ed5231f047b691b 100644 (file)
@@ -1,3 +1,11 @@
+2013-07-01  Tom Tromey  <tromey@redhat.com>
+
+       * configure.ac (build_warnings): Add -Wold-style-definition.
+       * configure: Rebuild.
+       * machoread.c (_initialize_machoread): Use "(void)".
+       * macrocmd.c (macro_inform_no_debuginfo): Fix formatting;
+       use "(void)".
+
 2013-07-01  Tom Tromey  <tromey@redhat.com>
 
        * configure.ac (build_warnings): Add -Wold-style-declaration.
index 7e08fba659e91d32205a7e851d035642f6d2b1da..822f2dfc2823266568d3f69d761be62dc21915ee 100755 (executable)
@@ -12471,7 +12471,7 @@ build_warnings="-Wall -Wdeclaration-after-statement -Wpointer-arith \
 -Wno-unused -Wunused-value -Wunused-function \
 -Wno-switch -Wno-char-subscripts -Wmissing-prototypes \
 -Wdeclaration-after-statement -Wempty-body -Wmissing-parameter-type \
--Wold-style-declaration"
+-Wold-style-declaration -Wold-style-definition"
 
 # Enable -Wno-format by default when using gcc on mingw since many
 # GCC versions complain about %I64.
index e0e5dd4efdecb6b885ad30e434927b84110302a2..89a07b417e3944ee43b30736937017d605e2e1dc 100644 (file)
@@ -1941,7 +1941,7 @@ build_warnings="-Wall -Wdeclaration-after-statement -Wpointer-arith \
 -Wno-unused -Wunused-value -Wunused-function \
 -Wno-switch -Wno-char-subscripts -Wmissing-prototypes \
 -Wdeclaration-after-statement -Wempty-body -Wmissing-parameter-type \
--Wold-style-declaration"
+-Wold-style-declaration -Wold-style-definition"
 
 # Enable -Wno-format by default when using gcc on mingw since many
 # GCC versions complain about %I64.
index 8d45f6f3b989f32fe585f64cee37c23b5dac41b1..b56e21c5418b27c9decf78cb0d90c1516b66012d 100644 (file)
@@ -1037,7 +1037,7 @@ static const struct sym_fns macho_sym_fns = {
 extern initialize_file_ftype _initialize_machoread;
 
 void
-_initialize_machoread ()
+_initialize_machoread (void)
 {
   add_symtab_fns (&macho_sym_fns);
 
index 250a1f0642bb6c1caac45e1db0207f65e9e19c90..b48c3c92cbc37ddca7f6501c5f3cd75d182850d0 100644 (file)
@@ -47,7 +47,8 @@ macro_command (char *arg, int from_tty)
 
 
 /* Prints an informational message regarding the lack of macro information.  */
-static void macro_inform_no_debuginfo()
+static void
+macro_inform_no_debuginfo (void)
 {
   puts_filtered ("GDB has no preprocessor macro information for that code.\n");
 }