[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[qemu-xen staging] configure: Fix for running with --enable-werror on macOS



commit 12a9b8d8240aaddf14774b9fb03af5e2e0b9f60a
Author:     Thomas Huth <thuth@xxxxxxxxxx>
AuthorDate: Thu Jul 16 07:12:22 2020 +0200
Commit:     Thomas Huth <thuth@xxxxxxxxxx>
CommitDate: Fri Jul 17 10:44:23 2020 +0200

    configure: Fix for running with --enable-werror on macOS
    
    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@xxxxxxxxxx>
    Reviewed-by: Philippe Mathieu-Daudé <f4bug@xxxxxxxxx>
    Signed-off-by: Thomas Huth <thuth@xxxxxxxxxx>
---
 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;
--
generated by git-patchbot for /home/xen/git/qemu-xen.git#staging



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.