NULL vs. 0
make some variables static
remove redundant variables
There are only a few sparse warnings left now: some bitfield warnings
and a few 'mixing code and declarations' warnings from the ring macros.
* change "foo.h" to <X11/foo.h> for core headers, e.g. X.h, Xpoll.h;
* change "foo.h", "extensions/foo.h" and "X11/foo.h" to
<X11/extensions/foo.h> for extension headers, e.g. Xv.h;
* change "foo.[ch]" to <X11/Xtrans/foo.[ch]> for Xtrans files.