[ccan] Should we start using -Wextra in CCAN?

Joseph Adams joeyadams3.14159 at gmail.com
Fri May 15 17:51:51 EST 2009


Building with -Wall -Wextra (a.k.a. -Wall -W) adds extra warnings like
"Comparison between signed and unsigned" and "Unused variable foo"
that are not present in -Wall by itself.  This can be a major nuisance
when trying to use a CCAN module in a project that uses -Wextra.

Would it be a good idea to start using -Wextra in CCAN?  I went ahead
and did the grunt work for this by turning on -Wextra wherever -Wall
was found and spewing casts and voids all over the CCAN repository
code.  A patch for this is attached.  I tested make, make check, and
make tools, and they all seem to work fine with this patch.  I also
changed the template for run.c so it would read "int main(void)"
instead of "int main(int argc, char *argv[])", as argc and argv are
unused.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: wextra_20090515.patch
Type: text/x-patch
Size: 37485 bytes
Desc: not available
URL: <http://lists.ozlabs.org/pipermail/ccan/attachments/20090515/ec66eccc/attachment.bin>


More information about the ccan mailing list