On 01/03/2018 09:19 AM, Tim Rühsen wrote: >> and since cdefs.h is in that group, feel free to submit a patch to have >> the use of __USE_FORTIFY_LEVEL pacify -Wundef. > > There was a patch attached to email...
Ah, I had overlooked it because you top-posted, and I didn't scroll past the quoted content to see your patch. > > Since lib/stdio.in.h doesn't trigger here I am unsure if I should patch > it as well. It's easier to wait until someone reports actual issues. > > From 8706dfd2673acfd668a250a6942cc437f5636154 Mon Sep 17 00:00:00 2001 > From: =?UTF-8?q?Tim=20R=C3=BChsen?= <tim.rueh...@gmx.de> > Date: Wed, 3 Jan 2018 11:50:07 +0100 > Subject: [PATCH] Fix -Wundef in user-included header lib/cdef.h We still use ChangeLog-style comments in the commit message (and/or ChangeLog itself) for gnulib commits; it's also nice to call out which previous commit to cdefs.h already added protection for -Wundef compilation. But with those additions, I'm okay with your patch; I'll wait a day or so to see if anyone else chimes in. > > --- > lib/cdefs.h | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/lib/cdefs.h b/lib/cdefs.h > index ec1fd4106..db72af433 100644 > --- a/lib/cdefs.h > +++ b/lib/cdefs.h > @@ -295,7 +295,7 @@ > #if __GNUC_PREREQ (3,4) > # define __attribute_warn_unused_result__ \ > __attribute__ ((__warn_unused_result__)) > -# if __USE_FORTIFY_LEVEL > 0 > +# if defined __USE_FORTIFY_LEVEL && __USE_FORTIFY_LEVEL > 0 > # define __wur __attribute_warn_unused_result__ > # endif > #else -- Eric Blake, Principal Software Engineer Red Hat, Inc. +1-919-301-3266 Virtualization: qemu.org | libvirt.org
signature.asc
Description: OpenPGP digital signature