diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index 6fd6e4f806..ac726851ac 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,10 @@ +2016-01-08 Jan Kratochvil + + * gdb.multi/goodbye.c: Fix compilation warnings by adding return types + and reordering the functions. + * gdb.multi/hangout.c: Likewise. + * gdb.multi/hello.c: Likewise. + 2016-01-08 Simon Marchi * gdb.perf/lib/perftest/perftest.py: Change relative imports to diff --git a/gdb/testsuite/gdb.multi/goodbye.c b/gdb/testsuite/gdb.multi/goodbye.c index 701e504a3b..bf7759a794 100644 --- a/gdb/testsuite/gdb.multi/goodbye.c +++ b/gdb/testsuite/gdb.multi/goodbye.c @@ -39,6 +39,23 @@ int verylongfun() glob *= 9; } +void +mailand() +{ + glob = 46; +} + +int +foo(int x) { + return x + 92; +} + +void +goodbye() { + ++glob; +} + +int main() { mailand(); foo(glob); @@ -46,17 +63,4 @@ main() { goodbye(); } -foo(int x) { - return x + 92; -} - -mailand() -{ - glob = 46; -} - void commonfun() { mailand(); } /* from goodbye */ - -goodbye() { - ++glob; -} diff --git a/gdb/testsuite/gdb.multi/hangout.c b/gdb/testsuite/gdb.multi/hangout.c index e2c41b8c94..3701512873 100644 --- a/gdb/testsuite/gdb.multi/hangout.c +++ b/gdb/testsuite/gdb.multi/hangout.c @@ -17,6 +17,7 @@ #include +int main(int argc, char *argv[]) { int i; diff --git a/gdb/testsuite/gdb.multi/hello.c b/gdb/testsuite/gdb.multi/hello.c index efff59d0fa..93d921f68a 100644 --- a/gdb/testsuite/gdb.multi/hello.c +++ b/gdb/testsuite/gdb.multi/hello.c @@ -21,20 +21,23 @@ short hglob = 1; short glob = 92; -int commonfun() { bar(); } /* from hello */ - +void bar() { if (glob == 0) exit(1); } +int commonfun() { bar(); } /* from hello */ + +int hello(int x) { x *= 2; return x + 45; } +int main() { int tmpx;