aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite/gdb.base/pr10179-a.c
diff options
context:
space:
mode:
authorGary Benson <gbenson@redhat.com>2020-05-15 15:03:42 +0100
committerGary Benson <gbenson@redhat.com>2020-05-15 15:03:42 +0100
commit86e4e63d7cabb94a80a5ce767f670b65add5a083 (patch)
tree3d623c14d1475c21d0c7fc4076f4ae134e96fec9 /gdb/testsuite/gdb.base/pr10179-a.c
parent163df4df08aa7b0dda75261c19832c8e66b2059c (diff)
downloadgdb-86e4e63d7cabb94a80a5ce767f670b65add5a083.zip
gdb-86e4e63d7cabb94a80a5ce767f670b65add5a083.tar.gz
gdb-86e4e63d7cabb94a80a5ce767f670b65add5a083.tar.bz2
Fix "control reaches end of non-void function" errors in testsuite
When running the testsuite with clang, a number of testcases fail to build with the following errors: warning: control reaches end of non-void function [-Wreturn-type] warning: control may reach end of non-void function [-Wreturn-type] This prevents a number of testcases from executing. This commit fixes. gdb/testsuite/ChangeLog: * gdb.base/info-os.c (main): Add return statement. * gdb.base/info_minsym.c (minsym_fun): Likewise. * gdb.base/large-frame-2.c (func): Likewise. * gdb.base/pr10179-a.c (foo1, bar1): Likewise. * gdb.base/pr10179-b.c (foo2): Likewise. * gdb.base/valgrind-disp-step.c (foo): Likewise. * gdb.base/watch-cond.c (func): Likewise. * gdb.multi/goodbye.c (verylongfun): Likewise. * gdb.multi/hello.c (commonfun): Likewise. * gdb.python/py-finish-breakpoint.c (call_longjmp): Likewise. * gdb.threads/fork-plus-threads.c (thread_func): Likewise. * gdb.threads/forking-threads-plus-breakpoint.c (thread_forks): Likewise. * gdb.threads/hand-call-new-thread.c (foo): Likewise. * gdb.threads/interrupt-while-step-over.c (child_function): Likewise. * gdb.trace/actions-changed.c (end): Likewise.
Diffstat (limited to 'gdb/testsuite/gdb.base/pr10179-a.c')
-rw-r--r--gdb/testsuite/gdb.base/pr10179-a.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/gdb/testsuite/gdb.base/pr10179-a.c b/gdb/testsuite/gdb.base/pr10179-a.c
index 56bce9d..584b1bc 100644
--- a/gdb/testsuite/gdb.base/pr10179-a.c
+++ b/gdb/testsuite/gdb.base/pr10179-a.c
@@ -5,11 +5,13 @@ extern int foo2();
int
foo1()
{
+ return 0;
}
int
bar1()
{
+ return 0;
}
int