GDB testsuite: Fix warnings with -std=gnu11
authorAndreas Arnez <arnez@linux.vnet.ibm.com>
Tue, 28 Oct 2014 12:39:22 +0000 (12:39 +0000)
committerAndreas Krebbel <krebbel@linux.vnet.ibm.com>
Thu, 13 Nov 2014 09:20:44 +0000 (10:20 +0100)
commita59add0c2ed21c03efc8b39e333564d7713a7ccc
tree3832abef650cd187f011fa6fd19ed452442e3fa6
parent3b5d59973315a2f2e77e9febd35034b4d51c716f
GDB testsuite: Fix warnings with -std=gnu11

Since upstream GCC has changed the default C language dialect to
'gnu11', it yields multiple warnings in the GDB testsuite for missing
function return types and implicit function declarations.  This patch
attempts to fix these.

gdb/testsuite/ChangeLog:

* gdb.ada/cond_lang/foo.c (callme): Add return type.
* gdb.base/call-sc.c (zed): Likewise.
* gdb.base/checkpoint.c (main): Likewise.
* gdb.base/dump.c (main): Likewise.
* gdb.base/gcore.c (main): Likewise.
* gdb.base/huge.c (main): Likewise.
* gdb.base/multi-forks.c (main): Likewise.
* gdb.base/pr10179-a.c (main): Likewise.
* gdb.base/savedregs.c (main): Likewise.
* gdb.base/sigaltstack.c (main): Likewise.
* gdb.base/siginfo.c (main): Likewise.
* gdb.base/structs.c (zed): Likewise.
* gdb.mi/mi-stack.c (callee3, callee2, callee1, main): Likewise.
* gdb.mi/mi-syn-frame.c (main): Likewise.
* gdb.mi/until.c (foo, main): Likewise.
* gdb.base/global-var-nested-by-dso.c (b_main, c_main): Declare.
* gdb.base/solib-weak.c (foo): Declare.
* gdb.base/attach-twice.c: Include stdio.h.
* gdb.base/weaklib1.c: Likewise.
* gdb.base/weaklib2.c: Likewise.
* gdb.base/catch-signal-fork.c: Include stdio.h and sys/wait.h.
* gdb.mi/mi-condbreak-call-thr-state-mt.c: Include stdio.h and
unistd.h.
* gdb.base/attach-pie-misread.c: Include stdlib.h.
* gdb.mi/mi-exit-code.c: Likewise.
* gdb.base/break-interp-lib.c: Include string.h.
* gdb.base/coremaker.c: Likewise.
* gdb.base/testenv.c: Likewise.
* gdb.python/py-finish-breakpoint.c: Likewise.
* gdb.base/inferior-died.c: Include sys/wait.h.
* gdb.base/fileio.c: Include time.h.
* gdb.base/async-shell.c: Include unistd.h.
* gdb.base/dprintf-non-stop.c: Likewise.
* gdb.base/info-os.c: Likewise.
* gdb.mi/mi-console.c: Likewise.
* gdb.mi/watch-nonstop.c: Likewise.
* gdb.python/py-events.c: Likewise.
* gdb.base/async.c (baz): Move up before its invocation.
* gdb.base/code_elim2.c (my_global_func): Likewise.
* gdb.base/skip-solib-lib.c (multiply): Likewise.
* gdb.base/advance.c (func2): Likewise.
41 files changed:
gdb/testsuite/ChangeLog
gdb/testsuite/gdb.ada/cond_lang/foo.c
gdb/testsuite/gdb.base/advance.c
gdb/testsuite/gdb.base/async-shell.c
gdb/testsuite/gdb.base/async.c
gdb/testsuite/gdb.base/attach-pie-misread.c
gdb/testsuite/gdb.base/attach-twice.c
gdb/testsuite/gdb.base/break-interp-lib.c
gdb/testsuite/gdb.base/call-sc.c
gdb/testsuite/gdb.base/catch-signal-fork.c
gdb/testsuite/gdb.base/checkpoint.c
gdb/testsuite/gdb.base/code_elim2.c
gdb/testsuite/gdb.base/coremaker.c
gdb/testsuite/gdb.base/dprintf-non-stop.c
gdb/testsuite/gdb.base/dump.c
gdb/testsuite/gdb.base/fileio.c
gdb/testsuite/gdb.base/gcore.c
gdb/testsuite/gdb.base/global-var-nested-by-dso.c
gdb/testsuite/gdb.base/huge.c
gdb/testsuite/gdb.base/inferior-died.c
gdb/testsuite/gdb.base/info-os.c
gdb/testsuite/gdb.base/multi-forks.c
gdb/testsuite/gdb.base/pr10179-a.c
gdb/testsuite/gdb.base/savedregs.c
gdb/testsuite/gdb.base/sigaltstack.c
gdb/testsuite/gdb.base/siginfo.c
gdb/testsuite/gdb.base/skip-solib-lib.c
gdb/testsuite/gdb.base/solib-weak.c
gdb/testsuite/gdb.base/structs.c
gdb/testsuite/gdb.base/testenv.c
gdb/testsuite/gdb.base/weaklib1.c
gdb/testsuite/gdb.base/weaklib2.c
gdb/testsuite/gdb.mi/mi-condbreak-call-thr-state-mt.c
gdb/testsuite/gdb.mi/mi-console.c
gdb/testsuite/gdb.mi/mi-exit-code.c
gdb/testsuite/gdb.mi/mi-stack.c
gdb/testsuite/gdb.mi/mi-syn-frame.c
gdb/testsuite/gdb.mi/until.c
gdb/testsuite/gdb.mi/watch-nonstop.c
gdb/testsuite/gdb.python/py-events.c
gdb/testsuite/gdb.python/py-finish-breakpoint.c