Clean up cppcheck-reported diagnostics.