[PATCH 00/10] -Wshadow fixes for the X server

Keith Packard keithp at keithp.com
Sun Dec 15 02:03:03 PST 2013


I must have been using an old macros package or something, but it
looks like I didn't have -Wshadow turned on before. Here's a series of
patches which cleans up all of the warnings generated from that flag.

The first one globally replaces 'pointer' with 'void *' in the server,
and then a change to dix-config.h tricks Xdefs.h into not defining
'pointer'.

Similarly, the XI Pointer typedef also needs to go, but there's no
way to do that in the X server, so I just stopped using it, which
seems to make the compiler happy at least.

The rest of them are pretty straight forward, replacing shadowing
names with new ones.

I caught a couple of places where the code was re-declaring a private
pointer and fetching the value anew where it could not have changed;
those are marked in the patches and could use extra scrutiny in case I
mis-read the code.


More information about the xorg-devel mailing list