aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGary Benson <gbenson@redhat.com>2020-11-12 15:05:22 +0000
committerGary Benson <gbenson@redhat.com>2020-11-12 15:05:22 +0000
commit9e74f0aef6a73dba185161558cebace2ed9a54e5 (patch)
tree54bb8f36f84efb0ee26d1ff90c9c4541ce4fda05
parenta3183ad61069e7d6edf46e783bb970d10df125c3 (diff)
downloadgdb-9e74f0aef6a73dba185161558cebace2ed9a54e5.zip
gdb-9e74f0aef6a73dba185161558cebace2ed9a54e5.tar.gz
gdb-9e74f0aef6a73dba185161558cebace2ed9a54e5.tar.bz2
Fix gdb.threads/tls-so_extern.exp with Clang
Clang fails to compile gdb.threads/tls-so_extern_main.c, giving the following error: /gdbtest/src/gdb/testsuite/gdb.threads/tls-so_extern_main.c:28:1: warning: non-void function does not return a value [-Wreturn-type] This commit adds a return statement to the offending function. gdb/testsuite/ChangeLog: * gdb.threads/tls-so_extern_main.c (tls_ptr): Add missing return statement.
-rw-r--r--gdb/testsuite/ChangeLog5
-rw-r--r--gdb/testsuite/gdb.threads/tls-so_extern_main.c2
2 files changed, 7 insertions, 0 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index 855ceaa..ecac8bb 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2020-11-12 Gary Benson <gbenson@redhat.com>
+
+ * gdb.threads/tls-so_extern_main.c (tls_ptr): Add missing return
+ statement.
+
2020-11-11 Simon Marchi <simon.marchi@efficios.com>
* gdb.base/continue-after-aborted-step-over.exp: Add "breakpoint
diff --git a/gdb/testsuite/gdb.threads/tls-so_extern_main.c b/gdb/testsuite/gdb.threads/tls-so_extern_main.c
index c326451..8ad857c 100644
--- a/gdb/testsuite/gdb.threads/tls-so_extern_main.c
+++ b/gdb/testsuite/gdb.threads/tls-so_extern_main.c
@@ -25,6 +25,8 @@ tls_ptr (void *p)
{
so_extern = &so_extern;
so_extern2 = &so_extern2; /* break here to check result */
+
+ return NULL;
}
int