libMesh/libmesh — pull request #327 by roystgnr (2014-08-20 22:26:05+00:00)
Title: Paranoid warnings fixes

This branch is NOT ready to merge; I'm bringing up this PR both so MooseBuild can help me debug and so people other than me (and @jwpeterson, who *sees all*) will be aware of it.

So I decided to run in "paranoid" mode:

-Wall -Weffc++ -pedantic -pedantic-errors -Wextra -Wall -Waggregate-return -Wcast-align -Wcast-qual -Wchar-subscripts -Wcomment -Wconversion -Wdisabled-optimization -Wfloat-equal -Wformat -Wformat=2 -Wformat-nonliteral -Wformat-security -Wformat-y2k -Wimport -Winit-self -Winline -Winvalid-pch -Wlong-long -Wunsafe-loop-optimizations -Wmissing-braces -Wmissing-field-initializers -Wmissing-format-attribute -Wmissing-include-dirs -Wmissing-noreturn -Wpacked -Wpadded -Wparentheses -Wpointer-arith -Wredundant-decls -Wreturn-type -Wsequence-point -Wshadow -Wsign-compare -Wstack-protector -Wstrict-aliasing -Wstrict-aliasing=2 -Wswitch -Wswitch-default -Wswitch-enum -Wtrigraphs -Wuninitialized -Wunknown-pragmas -Wunreachable-code -Wunused -Wunused-function -Wunused-label -Wunused-parameter -Wunused-value -Wunused-variable -Wvariadic-macros -Wvolatile-register-var -Wwrite-strings

and see what turned up.

Much of what turned up was false positives (in particular we're never going to be warning-free with -Weffc++ or or -Wswitch-enum, and it would be foolish to be warning-free with -Waggregate-return or -Wfloat-equal) but there's a bunch of questionable code and a little outright incorrect code that's come up with the rest.