Using gcc 5.2 (maybe other versions as well), building mi-pending.c gives
these warnings:
./gdb.mi/mi-pending.c: In function ‘thread_func’:
./gdb.mi/mi-pending.c:34:5: warning: ‘return’ with no value, in function returning non-void
return;
^
./gdb.mi/mi-pending.c:38:5: warning: ‘return’ with no value, in function returning non-void
return;
^
gdb_compile_pthreads assumes that the build was successful only if there
is no output. These warnings therefore make gdb_compile_pthreads think
that the build failed, and the test doesn't run.
The easy fix is to replace the "return" with "return NULL". I am
pushing this as obvious.
gdb/testsuite/ChangeLog:
* gdb.mi/mi-pending.c (thread_func): Replace return with return
NULL.
+2015-07-27 Simon Marchi <simon.marchi@ericsson.com>
+
+ * gdb.mi/mi-pending.c (thread_func): Replace return with return NULL.
+
2015-07-27 Simon Marchi <simon.marchi@ericsson.com>
* gdb.mi/mi-watch.exp (test_watchpoint_triggering): Remove xfail.
h = dlopen (libname, RTLD_LAZY); /* set breakpoint here */
if (h == NULL)
- return;
+ return NULL;
p_func = dlsym (h, "pendfunc3");
if (p_func == NULL)
- return;
+ return NULL;
(*p_func) ();
}