mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2024-12-15 04:31:49 +08:00
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.
This commit is contained in:
parent
163df4df08
commit
86e4e63d7c
@ -1,3 +1,23 @@
|
||||
2020-05-15 Gary Benson <gbenson@redhat.com>
|
||||
|
||||
* 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.
|
||||
|
||||
2020-05-15 Gary Benson <gbenson@redhat.com>
|
||||
|
||||
* gdb.opencl/callfuncs.exp: Report when test skipped.
|
||||
|
@ -48,6 +48,8 @@ thread_proc (void *args)
|
||||
{
|
||||
pthread_mutex_lock (&mutex);
|
||||
pthread_mutex_unlock (&mutex);
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
int
|
||||
|
@ -20,6 +20,7 @@ static int minsym_var;
|
||||
static int minsym_fun (void)
|
||||
{
|
||||
minsym_var++;
|
||||
return 0;
|
||||
}
|
||||
|
||||
int
|
||||
|
@ -22,4 +22,5 @@ func (void)
|
||||
{
|
||||
int a[4096];
|
||||
blah (a);
|
||||
return 0;
|
||||
}
|
||||
|
@ -5,11 +5,13 @@ extern int foo2();
|
||||
int
|
||||
foo1()
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
int
|
||||
bar1()
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
int
|
||||
|
@ -3,4 +3,5 @@
|
||||
int
|
||||
foo2()
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
@ -18,6 +18,7 @@
|
||||
static int
|
||||
foo (void)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
int
|
||||
|
@ -23,6 +23,7 @@ int func(int *foo)
|
||||
(*foo)++;
|
||||
global++;
|
||||
global2++;
|
||||
return 0;
|
||||
}
|
||||
|
||||
void func2(int *foo)
|
||||
|
@ -37,6 +37,7 @@ int verylongfun()
|
||||
glob *= 8;
|
||||
glob += 9;
|
||||
glob *= 9;
|
||||
return 0;
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -29,7 +29,7 @@ bar()
|
||||
exit(1);
|
||||
}
|
||||
|
||||
int commonfun() { bar(); } /* from hello */
|
||||
int commonfun() { bar(); return 0; } /* from hello */
|
||||
|
||||
int
|
||||
hello(int x)
|
||||
|
@ -56,6 +56,7 @@ int
|
||||
call_longjmp (jmp_buf *buf)
|
||||
{
|
||||
call_longjmp_1 (buf);
|
||||
return 0;
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -33,6 +33,7 @@ static void *
|
||||
thread_func (void *arg)
|
||||
{
|
||||
/* Empty. */
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -90,6 +90,8 @@ thread_forks (void *arg)
|
||||
exit (1);
|
||||
}
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/* Set this to tell the thread_breakpoint thread to exit. */
|
||||
|
@ -24,6 +24,7 @@ static int
|
||||
foo (void)
|
||||
{
|
||||
usleep (1);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void *
|
||||
|
@ -44,6 +44,8 @@ child_function (void *arg)
|
||||
pthread_barrier_wait (&threads_started_barrier);
|
||||
|
||||
infinite_loop ();
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -18,6 +18,7 @@
|
||||
int
|
||||
end (int i)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
int
|
||||
|
Loading…
Reference in New Issue
Block a user