Skip to contentSkip to conversation

configure: avoid compiler warning in pipe2 detection

PATCH Applied Bruce Rogers 4 participants 5 messages Aug 20, 2012 – Oct 27, 2012

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 configure: avoid compiler warning in pipe2 detection

When building qemu-kvm for openSUSE:Factory, I am getting a warning in the pipe2 detection performed by configure, which prevents using --enable-werror.

Change detection code to use return value of pipe2.

---
 configure |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)
configure +1 -2
index 5808764..2e1f7f8 100755
@@ -2399,8 +2399,7 @@ cat > $TMPC << EOF
 int main(void)
 {
     int pipefd[2];
-    pipe2(pipefd, O_CLOEXEC);
-    return 0;
+    return pipe2(pipefd, O_CLOEXEC);
 }
 EOF
 if compile_prog "" "" ; then
Signature · 1 line
1.7.7
#2 lore raw
In reply to Bruce Rogers

Ping! Just ran into this bug today and noticed this patch never got applied.
Patch still applies OK, patchwork url is:
http://patchwork.ozlabs.org/patch/178920/

thanks
-- PMM

Quoted 29 lines · Bruce Rogers

When building qemu-kvm for openSUSE:Factory, I am getting a warning in the pipe2 detection performed by configure, which prevents using --enable-werror.

Change detection code to use return value of pipe2.

---
 configure |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)
configure +1 -3
index 5808764..2e1f7f8 100755
@@ -2399,8 +2399,7 @@ cat > $TMPC << EOF
 int main(void)
 {
     int pipefd[2];
-    pipe2(pipefd, O_CLOEXEC);
-    return 0;
+    return pipe2(pipefd, O_CLOEXEC);
 }
 EOF
 if compile_prog "" "" ; then
--

1.7.7

#3 lore raw

Am 24.10.2012 18:48, schrieb Peter Maydell:

Quoted 4 lines

Ping! Just ran into this bug today and noticed this patch never got applied.
Patch still applies OK, patchwork url is:
http://patchwork.ozlabs.org/patch/178920/

...and since it was noticed while packaging v1.2, it should go into stable as well (cc'ed).

Andreas

Quoted 28 lines · Bruce Rogers
Quoted 27 lines

When building qemu-kvm for openSUSE:Factory, I am getting a warning in the pipe2 detection performed by configure, which prevents using --enable-werror.

Change detection code to use return value of pipe2.

---
 configure |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)
configure +1 -3
index 5808764..2e1f7f8 100755
@@ -2399,8 +2399,7 @@ cat > $TMPC << EOF
 int main(void)
 {
     int pipefd[2];
-    pipe2(pipefd, O_CLOEXEC);
-    return 0;
+    return pipe2(pipefd, O_CLOEXEC);
 }
 EOF
 if compile_prog "" "" ; then
--

1.7.7

Signature · 2 lines
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg
Applied
#4 lore raw
In reply to Bruce Rogers

Thanks, applied.

Quoted 29 lines · Bruce Rogers

When building qemu-kvm for openSUSE:Factory, I am getting a warning in the pipe2 detection performed by configure, which prevents using --enable-werror.

Change detection code to use return value of pipe2.

---
 configure |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)
configure +1 -3
index 5808764..2e1f7f8 100755
@@ -2399,8 +2399,7 @@ cat > $TMPC << EOF
 int main(void)
 {
     int pipefd[2];
-    pipe2(pipefd, O_CLOEXEC);
-    return 0;
+    return pipe2(pipefd, O_CLOEXEC);
 }
 EOF
 if compile_prog "" "" ; then
--

1.7.7