From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:50689) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SqnKr-0001r5-Pu for qemu-devel@nongnu.org; Mon, 16 Jul 2012 11:35:46 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SqnKl-0008Eb-I3 for qemu-devel@nongnu.org; Mon, 16 Jul 2012 11:35:45 -0400 Received: from mx1.redhat.com ([209.132.183.28]:11854) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SqnKl-0008DP-9m for qemu-devel@nongnu.org; Mon, 16 Jul 2012 11:35:39 -0400 Message-ID: <500434C8.6050200@redhat.com> Date: Mon, 16 Jul 2012 09:35:36 -0600 From: Eric Blake MIME-Version: 1.0 References: <1342360440-14328-1-git-send-email-sw@weilnetz.de> In-Reply-To: <1342360440-14328-1-git-send-email-sw@weilnetz.de> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="------------enigBF91A188FE49DBBAB107F98F" Subject: Re: [Qemu-devel] [PATCH] configure: Fix build with capabilities List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefan Weil Cc: Blue Swirl , qemu-devel@nongnu.org This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enigBF91A188FE49DBBAB107F98F Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 07/15/2012 07:54 AM, Stefan Weil wrote: > Since commit 417c9d72d48275d19c60861896efd4962d21aca2 all configure tes= ts > normally run with -Werror. Some of these tests now fail because they > raised a compiler warning. >=20 > This patch fixes support for capabilities. >=20 > Signed-off-by: Stefan Weil > --- > configure | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) >=20 > diff --git a/configure b/configure > index f745cc2..abde4c0 100755 > --- a/configure > +++ b/configure > @@ -2082,7 +2082,7 @@ if test "$cap" !=3D "no" ; then > cat > $TMPC < #include > #include > -int main(void) { cap_t caps; caps =3D cap_init(); } > +int main(void) { cap_t caps; caps =3D cap_init(); return caps !=3D NUL= L; } Nothing wrong with this patch, per se, but in the Autoconf world, the general advice is that programs should check whether -Werror is supported, but then avoid using it for the entire remainder of the configure script (that is, store the result of -Werror into a different variable that gets added into the final CFLAGS at make time, but not used during any of the rest of the configure time). That's because it's just too hard to avoid warnings-turned-into-errors for all possible versions (including future releases) of gcc, so you are just too likely to run into spurious changes in configurations when the next version of gcc starts warning about something new if you try to run all your configure tests with -Werror. --=20 Eric Blake eblake@redhat.com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --------------enigBF91A188FE49DBBAB107F98F Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux) Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iQEcBAEBCAAGBQJQBDTJAAoJEKeha0olJ0NqU6QH/0WtS8O7S6RQLxp85YkmSx99 +oA1GhCLsecpbfqIPn1FqfqjBqDck1hVLgLCOXBW/9QDsnccCdZfbXtB2nqWiOjC AA6t9twmmRckHAe0DYAiL/qB5KwAJ1w4Hb3/pKmov0v9zdWribB0bKiMNRYNXmk5 6jImLMwqaihY/oZOv8cHLsFAkOc45Jh7SRQkf+ZMxgedswO9wN8hWFvqWCZjRkGo MdejHqeiu642/6K+RW+oFdgMyWxyOWqKEdixQiY/4sTEhM0HY+J9Y2M/mGzSnS5u e50VFEmj+fBe3k5NxkmpO35CQNn2tXzDxKXGVfZZw1CEGV2/Za8Kkl6/l54WqD8= =5aC0 -----END PGP SIGNATURE----- --------------enigBF91A188FE49DBBAB107F98F--