]> git.proxmox.com Git - mirror_qemu.git/commitdiff
configure: Fix for running with --enable-werror on macOS
authorThomas Huth <thuth@redhat.com>
Thu, 16 Jul 2020 05:12:22 +0000 (07:12 +0200)
committerThomas Huth <thuth@redhat.com>
Fri, 17 Jul 2020 08:44:23 +0000 (10:44 +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

index b751c853f54c394d2e1c2adee409da1f47c47ac2..e93836aaae6869d1068c5cf3f1050c22423bf28e 100755 (executable)
--- 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;