diff mbox

[3/3] GDB testsuite: More fixes for warnings with -std=gnu11

Message ID 1415990846-9482-4-git-send-email-arnez@linux.vnet.ibm.com
State New
Headers show

Commit Message

Andreas Arnez Nov. 14, 2014, 6:47 p.m. UTC
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/gdb.base/bp-permanent.c        | 1 +
 gdb/testsuite/gdb.python/py-framefilter-mi.c | 3 ++-
 gdb/testsuite/gdb.python/py-framefilter.c    | 3 ++-
 gdb/testsuite/gdb.trace/actions-changed.c    | 3 +++
 4 files changed, 8 insertions(+), 2 deletions(-)
diff mbox

Patch

diff --git a/gdb/testsuite/gdb.base/bp-permanent.c b/gdb/testsuite/gdb.base/bp-permanent.c
index 53b3777..a45a922 100644
--- a/gdb/testsuite/gdb.base/bp-permanent.c
+++ b/gdb/testsuite/gdb.base/bp-permanent.c
@@ -18,6 +18,7 @@ 
 #include <string.h>
 #ifdef SIGNALS
 #include <signal.h>
+#include <unistd.h>
 #endif
 
 #define NOP asm("nop")
diff --git a/gdb/testsuite/gdb.python/py-framefilter-mi.c b/gdb/testsuite/gdb.python/py-framefilter-mi.c
index 242efa1..2955b71 100644
--- a/gdb/testsuite/gdb.python/py-framefilter-mi.c
+++ b/gdb/testsuite/gdb.python/py-framefilter-mi.c
@@ -132,7 +132,8 @@  int func5(int f, int d)
   return i;
 }
 
-main()
+int main()
 {
   func5(3,5);
+  return 0;
 }
diff --git a/gdb/testsuite/gdb.python/py-framefilter.c b/gdb/testsuite/gdb.python/py-framefilter.c
index 80087c2..3102dda 100644
--- a/gdb/testsuite/gdb.python/py-framefilter.c
+++ b/gdb/testsuite/gdb.python/py-framefilter.c
@@ -146,10 +146,11 @@  int func5(int f, int d)
   return i;
 }
 
-main()
+int main()
 {
   int z = 32;
   int y = 44;
   const char *foo1 = "Test";
   func5(3,5);
+  return 0;
 }
diff --git a/gdb/testsuite/gdb.trace/actions-changed.c b/gdb/testsuite/gdb.trace/actions-changed.c
index 602e61a..b9df26b 100644
--- a/gdb/testsuite/gdb.trace/actions-changed.c
+++ b/gdb/testsuite/gdb.trace/actions-changed.c
@@ -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;
 }