[OB PATCH] Fix gdb.threads/tls-so_extern.exp with Clang
Gary Benson
gbenson@redhat.com
Thu Nov 12 15:07:21 GMT 2020
Hi all,
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.
Checked on Fedora 32 x86_64, with GCC and Clang, and pushed as obvious.
Thanks,
Gary
---
gdb/testsuite/ChangeLog:
* gdb.threads/tls-so_extern_main.c (tls_ptr): Add missing return
statement.
---
gdb/testsuite/ChangeLog | 5 +++++
gdb/testsuite/gdb.threads/tls-so_extern_main.c | 2 ++
2 files changed, 7 insertions(+)
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 @@
{
so_extern = &so_extern;
so_extern2 = &so_extern2; /* break here to check result */
+
+ return NULL;
}
int
--
1.8.3.1
More information about the Gdb-patches
mailing list