提交 75cafad7 编写于 作者: S Stefan Weil 提交者: Stefan Hajnoczi

configure: Fix compiler warnings in config.log (always return a value from main)

Fix several "warning: control reaches end of non-void function".
Signed-off-by: NStefan Weil <sw@weilnetz.de>
Signed-off-by: NStefan Hajnoczi <stefanha@linux.vnet.ibm.com>
上级 8ceb49fe
...@@ -1082,7 +1082,7 @@ fi ...@@ -1082,7 +1082,7 @@ fi
# check that the C compiler works. # check that the C compiler works.
cat > $TMPC <<EOF cat > $TMPC <<EOF
int main(void) {} int main(void) { return 0; }
EOF EOF
if compile_object ; then if compile_object ; then
...@@ -2651,7 +2651,7 @@ ucontext_coroutine=no ...@@ -2651,7 +2651,7 @@ ucontext_coroutine=no
if test "$darwin" != "yes"; then if test "$darwin" != "yes"; then
cat > $TMPC << EOF cat > $TMPC << EOF
#include <ucontext.h> #include <ucontext.h>
int main(void) { makecontext(0, 0, 0); } int main(void) { makecontext(0, 0, 0); return 0; }
EOF EOF
if compile_prog "" "" ; then if compile_prog "" "" ; then
ucontext_coroutine=yes ucontext_coroutine=yes
...@@ -2664,7 +2664,7 @@ fi ...@@ -2664,7 +2664,7 @@ fi
open_by_hande_at=no open_by_hande_at=no
cat > $TMPC << EOF cat > $TMPC << EOF
#include <fcntl.h> #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 EOF
if compile_prog "" "" ; then if compile_prog "" "" ; then
open_by_handle_at=yes open_by_handle_at=yes
...@@ -2677,6 +2677,7 @@ linux_magic_h=no ...@@ -2677,6 +2677,7 @@ linux_magic_h=no
cat > $TMPC << EOF cat > $TMPC << EOF
#include <linux/magic.h> #include <linux/magic.h>
int main(void) { int main(void) {
return 0;
} }
EOF EOF
if compile_prog "" "" ; then if compile_prog "" "" ; then
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册