[PATCH:libxtrans 4/4] Rename index & stat variables to stop gcc -Wshadow warnings

Alan Coopersmith alan.coopersmith at oracle.com
Tue Dec 6 11:17:14 PST 2011


On 12/06/11 02:21, Mark Kettenis wrote:
>> From: Alan Coopersmith<alan.coopersmith at oracle.com>
>> Date: Mon,  5 Dec 2011 20:36:32 -0800
>>
>> It doesn't like local variables with the same name as system library
>> functions.
>
> Which IMHO is totally ridiculous and makes -Wshadow useless, since it
> means that any namespace pollution from system headers will result in
> warnings.  The GCC developers acknowledged that and future GCC
> versions will not warn if the shadowed identifier is from a system
> header.
>
> I vote for not "fixing" this type of shadowing.

If they're fixing gcc, then that works for me, and I'll just ignore
these until then.

-- 
	-Alan Coopersmith-        alan.coopersmith at oracle.com
	 Oracle Solaris Platform Engineering: X Window System



More information about the xorg-devel mailing list