[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: -Wundef in *.h [was: [PATCH v2] stat-time: silence -Wunused-paramete
From: |
Eric Blake |
Subject: |
Re: -Wundef in *.h [was: [PATCH v2] stat-time: silence -Wunused-parameter regression] |
Date: |
Wed, 3 Jan 2018 15:29:33 -0600 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.0 |
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?= <address@hidden>
> 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
- Re: [PATCH] Avoid one "parameter unused" warnings., (continued)
Re: [PATCH] Avoid one "parameter unused" warnings., Eric Blake, 2018/01/02
- [PATCH v2] stat-time: silence -Wunused-parameter regression, Eric Blake, 2018/01/02
- Re: [PATCH v2] stat-time: silence -Wunused-parameter regression, Jim Meyering, 2018/01/02
- Re: [PATCH v2] stat-time: silence -Wunused-parameter regression, Paul Eggert, 2018/01/02
- Re: [PATCH v2] stat-time: silence -Wunused-parameter regression, Tim Rühsen, 2018/01/03
- -Wundef in *.h [was: [PATCH v2] stat-time: silence -Wunused-parameter regression], Eric Blake, 2018/01/03
- Re: -Wundef in *.h [was: [PATCH v2] stat-time: silence -Wunused-parameter regression], Tim Rühsen, 2018/01/03
- Re: -Wundef in *.h [was: [PATCH v2] stat-time: silence -Wunused-parameter regression],
Eric Blake <=
- Re: -Wundef in *.h [was: [PATCH v2] stat-time: silence -Wunused-parameter regression], Paul Eggert, 2018/01/03
- Re: -Wundef in *.h [was: [PATCH v2] stat-time: silence -Wunused-parameter regression], Tim Rühsen, 2018/01/04
- Re: -Wundef in *.h [was: [PATCH v2] stat-time: silence -Wunused-parameter regression], Bruno Haible, 2018/01/04
- Re: -Wundef in *.h [was: [PATCH v2] stat-time: silence -Wunused-parameter regression], Eric Blake, 2018/01/04
- Re: -Wundef in *.h [was: [PATCH v2] stat-time: silence -Wunused-parameter regression], Tim Rühsen, 2018/01/04
Re: [PATCH] Avoid one "parameter unused" warnings., Bruno Haible, 2018/01/01