diff --git a/Makefile b/Makefile index 7e72defd0..0131b615e 100644 --- a/Makefile +++ b/Makefile @@ -284,7 +284,7 @@ man/cppcheck.1: $(MAN_SOURCE) $(XP) $(DB2MAN) $(MAN_SOURCE) tags: - ctags -R --exclude=doxyoutput . + ctags -R --exclude=doxyoutput --exclude=test/cfg cli externals gui lib test install: cppcheck install -d ${BIN} diff --git a/lib/checkother.cpp b/lib/checkother.cpp index 289bf5cb1..aeaaa8b4f 100644 --- a/lib/checkother.cpp +++ b/lib/checkother.cpp @@ -561,7 +561,7 @@ void CheckOther::checkRedundantAssignment() if (printWarning && scope->type == Scope::eSwitch && Token::findmatch(it->second, "default|case", tok)) redundantAssignmentInSwitchError(it->second, tok, tok->str()); else if (printPerformance) { - // See #7133 + // See #7133 const bool nonlocal = it->second->variable() && nonLocal(it->second->variable()); if (printInconclusive || !nonlocal) // see #5089 - report inconclusive only when requested if (_tokenizer->isC() || checkExceptionHandling(tok)) // see #6555 to see how exception handling might have an impact diff --git a/test/testother.cpp b/test/testother.cpp index 70189baf3..e6efcb9c3 100644 --- a/test/testother.cpp +++ b/test/testother.cpp @@ -148,7 +148,7 @@ private: TEST_CASE(incompleteArrayFill); TEST_CASE(redundantVarAssignment); - TEST_CASE(redundantVarAssignment_7133); + TEST_CASE(redundantVarAssignment_7133); TEST_CASE(redundantMemWrite); TEST_CASE(varFuncNullUB); @@ -5619,11 +5619,11 @@ private: " memptr = 0;\n" "}"); ASSERT_EQUALS("[test.cpp:3] -> [test.cpp:4]: (performance) Variable 'memptr' is reassigned a value before the old one has been used.\n", errout.str()); - } + } - void redundantVarAssignment_7133() { + void redundantVarAssignment_7133() { // #7133 - check("sal_Int32 impl_Export() {\n" + check("sal_Int32 impl_Export() {\n" " try {\n" " try {\n" " uno::Sequence< uno::Any > aArgs(2);\n" @@ -5640,7 +5640,7 @@ private: " }\n" " catch (const uno::Exception&) {\n" " }\n" - "}", "test.cpp", false, true); + "}", "test.cpp", false, true); ASSERT_EQUALS("[test.cpp:6] -> [test.cpp:9]: (performance) Variable 'Name' is reassigned a value before the old one has been used.\n", errout.str()); } diff --git a/tools/dmake.cpp b/tools/dmake.cpp index 6d6978db7..f16edba51 100644 --- a/tools/dmake.cpp +++ b/tools/dmake.cpp @@ -427,7 +427,7 @@ int main(int argc, char **argv) fout << "man/cppcheck.1:\t$(MAN_SOURCE)\n\n"; fout << "\t$(XP) $(DB2MAN) $(MAN_SOURCE)\n\n"; fout << "tags:\n"; - fout << "\tctags -R --exclude=doxyoutput .\n\n"; + fout << "\tctags -R --exclude=doxyoutput --exclude=test/cfg cli externals gui lib test\n\n"; fout << "install: cppcheck\n"; fout << "\tinstall -d ${BIN}\n"; fout << "\tinstall cppcheck ${BIN}\n";