Coping with -Wunused-but-set-variable, second round
Cyril Brulebois
kibi at debian.org
Mon May 23 10:24:45 PDT 2011
Just a quick heads-up:
Cyril Brulebois <kibi at debian.org> (20/05/2011):
> gcc 4.6 has -Wunused-but-set-variable[1]:
> ,----
> | New -Wunused-but-set-variable and -Wunused-but-set-parameter warnings
> | were added for C, C++, Objective-C and Objective-C++. These warnings
> | diagnose variables respective parameters which are only set in the
> | code and never otherwise used. Usually such variables are useless and
> | often even the value assigned to them is computed needlessly,
> | sometimes expensively. The -Wunused-but-set-variable warning is
> | enabled by default by -Wall flag and -Wunused-but-set-parameter by
> | -Wall -Wextra flags.
> `----
>
> 1. http://gcc.gnu.org/gcc-4.6/changes.html
>
> We have a lot of hits, but with the upcoming patchset (30 patches…) we
> go down from 126 to 91; remaining parts include fb*, shrotpack*.h,
> render2swap.c stuff, which I was a bit reluctant to patch without
> thinking of it a bit. So the patchset should only have “easy to
> ACK/NACK” items.
I also have a second series, which basically depends on the _X_UNUSED
macro in xproto (so depends on a new release of that proto, which
should hopefully happen soon), which should get rid of almost
everything. I only have to do those without that flag with both series
applied:
make -C hw/dmx/input/ dmxevents.o
make -C hw/dmx/glxProxy/
Will be tidied up and posted soon-ish.
Mraw,
KiBi.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://lists.x.org/archives/xorg-devel/attachments/20110523/1fda34bc/attachment.pgp>
More information about the xorg-devel
mailing list