GSoC/GCI Archive
Google Code-in 2012 BRL-CAD

Compile with -Wwrite-strings, fix warnings that ensue

completed by: gcking

mentors: Sean

We hold BRL-CAD to a rather high standard of code quality.  We compile with nearly every useful warning that GCC is capable of producing and consider all warnings as errors that stop compilation.  This is done because many/most warnings are "code smells" that are eventually usually costly to ignore over time.

This task involves adding the -Wwrite-strings warning to our compilation and fixing the issues that result.  You can add the flag by editing misc/CMake/BRLCAD_CompilerFlags.cmake

Make sure you compile cleanly before beginning.  Make sure you're using a fresh SVN checkout.  See for help.

Protip: run this to save all errors to a file so you can work on them in bulk: make -k 2>&1 | tee build.log

Note that nearly all the errors that will result are trivially fixed by adding "const" to a struct declaration.  Submit you work as a single patch file, see