From: Eric Blake <eblake@redhat.com>
To: Stefan Weil <sw@weilnetz.de>
Cc: Blue Swirl <blauwirbel@gmail.com>, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] configure: Fix build with capabilities
Date: Mon, 16 Jul 2012 09:35:36 -0600 [thread overview]
Message-ID: <500434C8.6050200@redhat.com> (raw)
In-Reply-To: <1342360440-14328-1-git-send-email-sw@weilnetz.de>
[-- Attachment #1: Type: text/plain, Size: 1628 bytes --]
On 07/15/2012 07:54 AM, Stefan Weil wrote:
> Since commit 417c9d72d48275d19c60861896efd4962d21aca2 all configure tests
> normally run with -Werror. Some of these tests now fail because they
> raised a compiler warning.
>
> This patch fixes support for capabilities.
>
> Signed-off-by: Stefan Weil <sw@weilnetz.de>
> ---
> configure | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/configure b/configure
> index f745cc2..abde4c0 100755
> --- a/configure
> +++ b/configure
> @@ -2082,7 +2082,7 @@ if test "$cap" != "no" ; then
> cat > $TMPC <<EOF
> #include <stdio.h>
> #include <sys/capability.h>
> -int main(void) { cap_t caps; caps = cap_init(); }
> +int main(void) { cap_t caps; caps = cap_init(); return caps != NULL; }
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.
--
Eric Blake eblake@redhat.com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 620 bytes --]
next prev parent reply other threads:[~2012-07-16 15:35 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-07-15 13:54 [Qemu-devel] [PATCH] configure: Fix build with capabilities Stefan Weil
2012-07-16 15:35 ` Eric Blake [this message]
2012-07-16 15:40 ` Peter Maydell
2012-07-16 17:24 ` Alexander Graf
2012-07-16 18:28 ` Peter Maydell
2012-07-16 18:33 ` Alexander Graf
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=500434C8.6050200@redhat.com \
--to=eblake@redhat.com \
--cc=blauwirbel@gmail.com \
--cc=qemu-devel@nongnu.org \
--cc=sw@weilnetz.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).