"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "gui/test/data/benchmark/simple.cpp" between
cppcheck-1.86.tar.gz and cppcheck-1.87.tar.gz

About: Cppcheck is a static analysis tool for C/C++ code. It checks for memory leaks, mismatching allocation-deallocation, buffer overrun, and many more.

simple.cpp  (cppcheck-1.86):simple.cpp  (cppcheck-1.87)
/* /*
* Cppcheck - A tool for static C/C++ code analysis * Cppcheck - A tool for static C/C++ code analysis
* Copyright (C) 2007-2018 Cppcheck team. * Copyright (C) 2007-2019 Cppcheck team.
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or * the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version. * (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details. * GNU General Public License for more details.
skipping to change at line 3349 skipping to change at line 3349
void CheckOther::selfAssignmentError(const Token *tok, const std::string &varnam e) void CheckOther::selfAssignmentError(const Token *tok, const std::string &varnam e)
{ {
reportError(tok, Severity::warning, reportError(tok, Severity::warning,
"selfAssignment", "Redundant assignment of \"" + varname + "\" t o itself"); "selfAssignment", "Redundant assignment of \"" + varname + "\" t o itself");
} }
void CheckOther::assignmentInAssertError(const Token *tok, const std::string &va rname) void CheckOther::assignmentInAssertError(const Token *tok, const std::string &va rname)
{ {
reportError(tok, Severity::warning, reportError(tok, Severity::warning,
"assignmentInAssert", "Assert statement modifies '" + varname + "'.\n" "assignmentInAssert", "Assert statement modifies '" + varname + "'.\n"
"Variable '" + varname + "' is modified insert assert statement. " "Variable '" + varname + "' is modified inside assert statement. "
"Assert statements are removed from release builds so the code i nside " "Assert statements are removed from release builds so the code i nside "
"assert statement is not run. If the code is needed also in rele ase " "assert statement is not run. If the code is needed also in rele ase "
"builds this is a bug."); "builds this is a bug.");
} }
void CheckOther::incorrectLogicOperatorError(const Token *tok, bool always) void CheckOther::incorrectLogicOperatorError(const Token *tok, bool always)
{ {
if (always) if (always)
reportError(tok, Severity::warning, reportError(tok, Severity::warning,
"incorrectLogicOperator", "Mutual exclusion over || always e valuates to true. Did you intend to use && instead?"); "incorrectLogicOperator", "Mutual exclusion over || always e valuates to true. Did you intend to use && instead?");
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)