Re: [PATCH] Prevent the configure script to fail if CFLAGS="-Werror" is specified

2010-04-21 Thread Gian Mario Tagliaretti
On Wed, Apr 21, 2010 at 3:04 PM, Giuseppe Scrivano  wrote:

Giuseppe,

> This is my second attempt to send it...

you should file a bug into gnome bugzilla and attach your patch there,
not every developer will see it here on the mailing list.

cheers!
-- 
Gian Mario Tagliaretti
GNOME Foundation member
gia...@gnome.org
___
gtk-devel-list mailing list
gtk-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-devel-list


[PATCH] Prevent the configure script to fail if CFLAGS="-Werror" is specified

2010-04-21 Thread Giuseppe Scrivano
Hello,

This is my second attempt to send it...

Without the patch, configure fails with this error (in config.log):

configure:23638: checking if  is needed for xReply
configure:23651: gcc -c -DGDK_PIXBUF_DISABLE_DEPRECATED -Werror -Wall  
-DG_DISABLE_SINGLE_INCLUDES -DATK_DISABLE_SINGLE_INCLUDES 
-DGDK_PIXBUF_DISABLE_SINGLE_INCLUDES -DGTK_DISABLE_SINGLE_INCLUDES   conftest.c 
>&5
cc1: warnings being treated as errors
conftest.c: In function 'main':
conftest.c:73: error: unused variable 'rep'
configure:23651: $? = 1


Have the possibility to specify CFLAGS="-Werror" is very helpful to spot
easier other warnings.

Cheers,
Giuseppe



>From 506ab703aa2d57bbe3847dc0603685f4226dac2b Mon Sep 17 00:00:00 2001
From: Giuseppe Scrivano 
Date: Mon, 12 Apr 2010 15:04:36 +0200
Subject: [PATCH] Prevent the configure script to fail if CFLAGS="-Werror" is 
specified

---
 configure.in |   10 ++
 1 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/configure.in b/configure.in
index d18b2f0..c8095f8 100644
--- a/configure.in
+++ b/configure.in
@@ -1408,12 +1408,14 @@ if test "x$gdktarget" = "xx11"; then
   # Check for xReply
 
   AC_MSG_CHECKING([if  is needed for xReply])
-  AC_TRY_COMPILE([#include ],
-  [xReply *rep;],
+  AC_TRY_COMPILE([#include 
+xReply *rep () {return NULL;}],
+  [rep ();],
   [AC_MSG_RESULT([no])],
   [AC_TRY_COMPILE([#include 
-#include ],
-   [xReply *rep;],
+#include 
+xReply *rep () {return NULL;}],
+   [rep ();]
[AC_MSG_RESULT([yes])
 AC_DEFINE([NEED_XIPROTO_H_FOR_XREPLY], 1,
   [Define if  needed for 
xReply])],
-- 
1.7.0.3
___
gtk-devel-list mailing list
gtk-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-devel-list


[PATCH] Prevent the configure script to fail if CFLAGS="-Werror" is specified

2010-04-21 Thread Giuseppe Scrivano
Hello,

this is my first patch for GTK+, I hope this is the proper place to send
it, please forgive me if I am wrong :-)


Without the patch, configure fails with this error (in config.log):

configure:23638: checking if  is needed for xReply
configure:23651: gcc -c -DGDK_PIXBUF_DISABLE_DEPRECATED -Werror -Wall  
-DG_DISABLE_SINGLE_INCLUDES -DATK_DISABLE_SINGLE_INCLUDES 
-DGDK_PIXBUF_DISABLE_SINGLE_INCLUDES -DGTK_DISABLE_SINGLE_INCLUDES   conftest.c 
>&5
cc1: warnings being treated as errors
conftest.c: In function 'main':
conftest.c:73: error: unused variable 'rep'
configure:23651: $? = 1


Have the possibility to specify CFLAGS="-Werror" is very helpful to spot
easier other warnings.

Cheers,
Giuseppe



>From 506ab703aa2d57bbe3847dc0603685f4226dac2b Mon Sep 17 00:00:00 2001
From: Giuseppe Scrivano 
Date: Mon, 12 Apr 2010 15:04:36 +0200
Subject: [PATCH] Prevent the configure script to fail if CFLAGS="-Werror" is 
specified

---
 configure.in |   10 ++
 1 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/configure.in b/configure.in
index d18b2f0..c8095f8 100644
--- a/configure.in
+++ b/configure.in
@@ -1408,12 +1408,14 @@ if test "x$gdktarget" = "xx11"; then
   # Check for xReply
 
   AC_MSG_CHECKING([if  is needed for xReply])
-  AC_TRY_COMPILE([#include ],
-  [xReply *rep;],
+  AC_TRY_COMPILE([#include 
+xReply *rep () {return NULL;}],
+  [rep ();],
   [AC_MSG_RESULT([no])],
   [AC_TRY_COMPILE([#include 
-#include ],
-   [xReply *rep;],
+#include 
+xReply *rep () {return NULL;}],
+   [rep ();]
[AC_MSG_RESULT([yes])
 AC_DEFINE([NEED_XIPROTO_H_FOR_XREPLY], 1,
   [Define if  needed for 
xReply])],
-- 
1.7.0.3
___
gtk-devel-list mailing list
gtk-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-devel-list