]> xenbits.xensource.com Git - qemu-upstream-4.2-testing.git/commitdiff
configure: Fix compiler warnings in config.log (always return a value from main)
authorStefan Weil <sw@weilnetz.de>
Sat, 17 Dec 2011 08:27:29 +0000 (09:27 +0100)
committerStefano Stabellini <stefano.stabellini@eu.citrix.com>
Fri, 22 Jun 2012 11:15:27 +0000 (11:15 +0000)
Fix several "warning: control reaches end of non-void function".

upstream-commit: 75cafad74d8df3f8ea188ed355127b91c9903290

Signed-off-by: Stefan Weil <sw@weilnetz.de>
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
configure

index b113f60938c14a3f9a323cb2fd9b24cf0be7395c..091e3893c3bda2a799994ac666a3f86d826f7ddb 100755 (executable)
--- a/configure
+++ b/configure
@@ -1082,7 +1082,7 @@ fi
 
 # check that the C compiler works.
 cat > $TMPC <<EOF
-int main(void) {}
+int main(void) { return 0; }
 EOF
 
 if compile_object ; then
@@ -2648,7 +2648,7 @@ ucontext_coroutine=no
 if test "$darwin" != "yes"; then
   cat > $TMPC << EOF
 #include <ucontext.h>
-int main(void) { makecontext(0, 0, 0); }
+int main(void) { makecontext(0, 0, 0); return 0; }
 EOF
   if compile_prog "" "" ; then
       ucontext_coroutine=yes
@@ -2661,7 +2661,7 @@ fi
 open_by_hande_at=no
 cat > $TMPC << EOF
 #include <fcntl.h>
-int main(void) { struct file_handle fh; open_by_handle_at(0, &fh, 0); }
+int main(void) { struct file_handle fh; return open_by_handle_at(0, &fh, 0); }
 EOF
 if compile_prog "" "" ; then
     open_by_handle_at=yes
@@ -2674,6 +2674,7 @@ linux_magic_h=no
 cat > $TMPC << EOF
 #include <linux/magic.h>
 int main(void) {
+  return 0;
 }
 EOF
 if compile_prog "" "" ; then