GDB testsuite: More fixes for warnings with -std=gnu11
authorAndreas Arnez <arnez@linux.vnet.ibm.com>
Fri, 14 Nov 2014 18:36:30 +0000 (18:36 +0000)
committerAndreas Krebbel <krebbel@linux.vnet.ibm.com>
Mon, 17 Nov 2014 09:26:31 +0000 (10:26 +0100)
Fix some more C compiler warnings for missing function return types
and implicit function declarations in the GDB testsuite.

gdb/testsuite/ChangeLog:

* gdb.base/bp-permanent.c: Include unistd.h.
* gdb.python/py-framefilter-mi.c (main): Add return type.
* gdb.python/py-framefilter.c (main): Likewise.
* gdb.trace/actions-changed.c (main): Likewise.

gdb/testsuite/ChangeLog
gdb/testsuite/gdb.base/bp-permanent.c
gdb/testsuite/gdb.python/py-framefilter-mi.c
gdb/testsuite/gdb.python/py-framefilter.c
gdb/testsuite/gdb.trace/actions-changed.c

index 351d2df..0bd36fc 100644 (file)
@@ -1,5 +1,12 @@
 2014-11-17  Andreas Arnez  <arnez@linux.vnet.ibm.com>
 
+       * gdb.base/bp-permanent.c: Include unistd.h.
+       * gdb.python/py-framefilter-mi.c (main): Add return type.
+       * gdb.python/py-framefilter.c (main): Likewise.
+       * gdb.trace/actions-changed.c (main): Likewise.
+
+2014-11-17  Andreas Arnez  <arnez@linux.vnet.ibm.com>
+
        * gdb.mi/until.c: Add eye-catchers.
        * gdb.mi/mi-until.exp: Refer to eye-catchers instead of literal
        line numbers.
index 53b3777..a45a922 100644 (file)
@@ -18,6 +18,7 @@
 #include <string.h>
 #ifdef SIGNALS
 #include <signal.h>
+#include <unistd.h>
 #endif
 
 #define NOP asm("nop")
index 242efa1..ae203a6 100644 (file)
@@ -132,7 +132,9 @@ int func5(int f, int d)
   return i;
 }
 
+int
 main()
 {
   func5(3,5);
+  return 0;
 }
index 80087c2..8bdb3da 100644 (file)
@@ -146,10 +146,12 @@ int func5(int f, int d)
   return i;
 }
 
+int
 main()
 {
   int z = 32;
   int y = 44;
   const char *foo1 = "Test";
   func5(3,5);
+  return 0;
 }
index 602e61a..b9df26b 100644 (file)
@@ -42,6 +42,7 @@ subr (int parm)
   return busy;
 }
 
+int
 main()
 {
   subr (1);
@@ -63,4 +64,6 @@ main()
   subr (6);
   subr2 (6);
   end (6);
+
+  return 0;
 }