[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 4/6] configure: Fix for running with --enable-werror on macOS
From: |
Thomas Huth |
Subject: |
[PULL 4/6] configure: Fix for running with --enable-werror on macOS |
Date: |
Fri, 17 Jul 2020 11:56:03 +0200 |
The configure script currently refuses to succeed when run on macOS
with --enable-werror:
ERROR: configure test passed without -Werror but failed with -Werror.
The information in config.log indicates:
config-temp/qemu-conf.c:3:55: error: control reaches end of non-void
function [-Werror,-Wreturn-type]
static void *f(void *p) { pthread_setname_np("QEMU"); }
^
And indeed, the return statement is missing here.
Fixes: 479a57475e ("util: Implement debug-threads for macOS")
Message-Id: <20200716055655.24507-1-thuth@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Signed-off-by: Thomas Huth <thuth@redhat.com>
---
configure | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/configure b/configure
index b751c853f5..e93836aaae 100755
--- a/configure
+++ b/configure
@@ -4198,7 +4198,7 @@ pthread_setname_np_wo_tid=no
cat > $TMPC << EOF
#include <pthread.h>
-static void *f(void *p) { pthread_setname_np("QEMU"); }
+static void *f(void *p) { pthread_setname_np("QEMU"); return NULL; }
int main(void)
{
pthread_t thread;
--
2.18.1
- [PULL 0/6] Leak fixes for qtests + fuzzer CI, Thomas Huth, 2020/07/17
- [PULL 3/6] fuzz: Expect the cmdline in a freeable GString, Thomas Huth, 2020/07/17
- [PULL 2/6] tests: qmp-cmd-test: fix memory leak, Thomas Huth, 2020/07/17
- [PULL 4/6] configure: Fix for running with --enable-werror on macOS,
Thomas Huth <=
- [PULL 5/6] qom: Plug memory leak in "info qom-tree", Thomas Huth, 2020/07/17
- [PULL 1/6] qtest: bios-tables-test: fix a memory leak, Thomas Huth, 2020/07/17
- [PULL 6/6] gitlab-ci.yml: Add fuzzer tests, Thomas Huth, 2020/07/17
- Re: [PULL 0/6] Leak fixes for qtests + fuzzer CI, Peter Maydell, 2020/07/17