commit cppcheck for openSUSE:Factory
Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package cppcheck for openSUSE:Factory checked in at 2024-06-24 20:54:08 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/cppcheck (Old) and /work/SRC/openSUSE:Factory/.cppcheck.new.18349 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Package is "cppcheck" Mon Jun 24 20:54:08 2024 rev:44 rq:1182708 version:2.14.2 Changes: -------- --- /work/SRC/openSUSE:Factory/cppcheck/cppcheck.changes 2024-06-03 17:43:43.931625264 +0200 +++ /work/SRC/openSUSE:Factory/.cppcheck.new.18349/cppcheck.changes 2024-06-24 20:55:26.281011421 +0200 @@ -1,0 +2,7 @@ +Sat Jun 22 14:37:43 UTC 2024 - Christoph G <foss@grueninger.de> + +- update to 2.14.2 + * Justifications for warnings using comments in the code + * Fix alignas handling + +------------------------------------------------------------------- Old: ---- cppcheck-2.14.1.tar.gz New: ---- cppcheck-2.14.2.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ cppcheck.spec ++++++ --- /var/tmp/diff_new_pack.f65e3c/_old 2024-06-24 20:55:28.889105220 +0200 +++ /var/tmp/diff_new_pack.f65e3c/_new 2024-06-24 20:55:28.909105939 +0200 @@ -17,7 +17,7 @@ Name: cppcheck -Version: 2.14.1 +Version: 2.14.2 Release: 0 Summary: A tool for static C/C++ code analysis License: GPL-3.0-or-later ++++++ cppcheck-2.14.1.tar.gz -> cppcheck-2.14.2.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cppcheck-2.14.1/Makefile new/cppcheck-2.14.2/Makefile --- old/cppcheck-2.14.1/Makefile 2024-05-26 17:58:01.000000000 +0200 +++ new/cppcheck-2.14.2/Makefile 2024-06-17 12:10:21.000000000 +0200 @@ -693,31 +693,31 @@ test/options.o: test/options.cpp test/options.h $(CXX) ${INCLUDE_FOR_TEST} $(CPPFLAGS) $(CXXFLAGS) -c -o $@ test/options.cpp -test/test64bit.o: test/test64bit.cpp lib/addoninfo.h lib/check.h lib/check64bit.h lib/color.h lib/config.h lib/errorlogger.h lib/errortypes.h lib/library.h lib/mathlib.h lib/platform.h lib/settings.h lib/standards.h lib/suppressions.h lib/tokenize.h lib/tokenlist.h lib/utils.h test/fixture.h test/helpers.h +test/test64bit.o: test/test64bit.cpp externals/simplecpp/simplecpp.h lib/addoninfo.h lib/check.h lib/check64bit.h lib/color.h lib/config.h lib/errorlogger.h lib/errortypes.h lib/library.h lib/mathlib.h lib/platform.h lib/preprocessor.h lib/settings.h lib/standards.h lib/suppressions.h lib/tokenize.h lib/tokenlist.h lib/utils.h test/fixture.h test/helpers.h $(CXX) ${INCLUDE_FOR_TEST} $(CPPFLAGS) $(CXXFLAGS) -c -o $@ test/test64bit.cpp test/testanalyzerinformation.o: test/testanalyzerinformation.cpp lib/addoninfo.h lib/analyzerinfo.h lib/check.h lib/color.h lib/config.h lib/errorlogger.h lib/errortypes.h lib/library.h lib/mathlib.h lib/platform.h lib/settings.h lib/standards.h lib/suppressions.h lib/utils.h test/fixture.h $(CXX) ${INCLUDE_FOR_TEST} $(CPPFLAGS) $(CXXFLAGS) -c -o $@ test/testanalyzerinformation.cpp -test/testassert.o: test/testassert.cpp lib/addoninfo.h lib/check.h lib/checkassert.h lib/color.h lib/config.h lib/errorlogger.h lib/errortypes.h lib/library.h lib/mathlib.h lib/platform.h lib/settings.h lib/standards.h lib/suppressions.h lib/tokenize.h lib/tokenlist.h lib/utils.h test/fixture.h test/helpers.h +test/testassert.o: test/testassert.cpp externals/simplecpp/simplecpp.h lib/addoninfo.h lib/check.h lib/checkassert.h lib/color.h lib/config.h lib/errorlogger.h lib/errortypes.h lib/library.h lib/mathlib.h lib/platform.h lib/preprocessor.h lib/settings.h lib/standards.h lib/suppressions.h lib/tokenize.h lib/tokenlist.h lib/utils.h test/fixture.h test/helpers.h $(CXX) ${INCLUDE_FOR_TEST} $(CPPFLAGS) $(CXXFLAGS) -c -o $@ test/testassert.cpp -test/testastutils.o: test/testastutils.cpp lib/addoninfo.h lib/astutils.h lib/check.h lib/color.h lib/config.h lib/errorlogger.h lib/errortypes.h lib/library.h lib/mathlib.h lib/platform.h lib/settings.h lib/smallvector.h lib/sourcelocation.h lib/standards.h lib/suppressions.h lib/symboldatabase.h lib/templatesimplifier.h lib/token.h lib/tokenize.h lib/tokenlist.h lib/utils.h lib/vfvalue.h test/fixture.h test/helpers.h +test/testastutils.o: test/testastutils.cpp externals/simplecpp/simplecpp.h lib/addoninfo.h lib/astutils.h lib/check.h lib/color.h lib/config.h lib/errorlogger.h lib/errortypes.h lib/library.h lib/mathlib.h lib/platform.h lib/preprocessor.h lib/settings.h lib/smallvector.h lib/sourcelocation.h lib/standards.h lib/suppressions.h lib/symboldatabase.h lib/templatesimplifier.h lib/token.h lib/tokenize.h lib/tokenlist.h lib/utils.h lib/vfvalue.h test/fixture.h test/helpers.h $(CXX) ${INCLUDE_FOR_TEST} $(CPPFLAGS) $(CXXFLAGS) -c -o $@ test/testastutils.cpp -test/testautovariables.o: test/testautovariables.cpp lib/addoninfo.h lib/check.h lib/checkautovariables.h lib/color.h lib/config.h lib/errorlogger.h lib/errortypes.h lib/library.h lib/mathlib.h lib/platform.h lib/settings.h lib/standards.h lib/suppressions.h lib/tokenize.h lib/tokenlist.h lib/utils.h test/fixture.h test/helpers.h +test/testautovariables.o: test/testautovariables.cpp externals/simplecpp/simplecpp.h lib/addoninfo.h lib/check.h lib/checkautovariables.h lib/color.h lib/config.h lib/errorlogger.h lib/errortypes.h lib/library.h lib/mathlib.h lib/platform.h lib/preprocessor.h lib/settings.h lib/standards.h lib/suppressions.h lib/tokenize.h lib/tokenlist.h lib/utils.h test/fixture.h test/helpers.h $(CXX) ${INCLUDE_FOR_TEST} $(CPPFLAGS) $(CXXFLAGS) -c -o $@ test/testautovariables.cpp -test/testbool.o: test/testbool.cpp lib/addoninfo.h lib/check.h lib/checkbool.h lib/color.h lib/config.h lib/errorlogger.h lib/errortypes.h lib/library.h lib/mathlib.h lib/platform.h lib/settings.h lib/standards.h lib/suppressions.h lib/tokenize.h lib/tokenlist.h lib/utils.h test/fixture.h test/helpers.h +test/testbool.o: test/testbool.cpp externals/simplecpp/simplecpp.h lib/addoninfo.h lib/check.h lib/checkbool.h lib/color.h lib/config.h lib/errorlogger.h lib/errortypes.h lib/library.h lib/mathlib.h lib/platform.h lib/preprocessor.h lib/settings.h lib/standards.h lib/suppressions.h lib/tokenize.h lib/tokenlist.h lib/utils.h test/fixture.h test/helpers.h $(CXX) ${INCLUDE_FOR_TEST} $(CPPFLAGS) $(CXXFLAGS) -c -o $@ test/testbool.cpp -test/testboost.o: test/testboost.cpp lib/addoninfo.h lib/check.h lib/checkboost.h lib/color.h lib/config.h lib/errorlogger.h lib/errortypes.h lib/library.h lib/mathlib.h lib/platform.h lib/settings.h lib/standards.h lib/suppressions.h lib/tokenize.h lib/tokenlist.h lib/utils.h test/fixture.h test/helpers.h +test/testboost.o: test/testboost.cpp externals/simplecpp/simplecpp.h lib/addoninfo.h lib/check.h lib/checkboost.h lib/color.h lib/config.h lib/errorlogger.h lib/errortypes.h lib/library.h lib/mathlib.h lib/platform.h lib/preprocessor.h lib/settings.h lib/standards.h lib/suppressions.h lib/tokenize.h lib/tokenlist.h lib/utils.h test/fixture.h test/helpers.h $(CXX) ${INCLUDE_FOR_TEST} $(CPPFLAGS) $(CXXFLAGS) -c -o $@ test/testboost.cpp -test/testbufferoverrun.o: test/testbufferoverrun.cpp lib/addoninfo.h lib/check.h lib/checkbufferoverrun.h lib/color.h lib/config.h lib/ctu.h lib/errorlogger.h lib/errortypes.h lib/library.h lib/mathlib.h lib/platform.h lib/settings.h lib/sourcelocation.h lib/standards.h lib/suppressions.h lib/symboldatabase.h lib/templatesimplifier.h lib/token.h lib/tokenize.h lib/tokenlist.h lib/utils.h lib/vfvalue.h test/fixture.h test/helpers.h +test/testbufferoverrun.o: test/testbufferoverrun.cpp externals/simplecpp/simplecpp.h lib/addoninfo.h lib/check.h lib/checkbufferoverrun.h lib/color.h lib/config.h lib/ctu.h lib/errorlogger.h lib/errortypes.h lib/library.h lib/mathlib.h lib/platform.h lib/preprocessor.h lib/settings.h lib/sourcelocation.h lib/standards.h lib/suppressions.h lib/symboldatabase.h lib/templatesimplifier.h lib/token.h lib/tokenize.h lib/tokenlist.h lib/utils.h lib/vfvalue.h test/fixture.h test/helpers.h $(CXX) ${INCLUDE_FOR_TEST} $(CPPFLAGS) $(CXXFLAGS) -c -o $@ test/testbufferoverrun.cpp -test/testcharvar.o: test/testcharvar.cpp lib/addoninfo.h lib/check.h lib/checkother.h lib/color.h lib/config.h lib/errorlogger.h lib/errortypes.h lib/library.h lib/mathlib.h lib/platform.h lib/settings.h lib/standards.h lib/suppressions.h lib/tokenize.h lib/tokenlist.h lib/utils.h test/fixture.h test/helpers.h +test/testcharvar.o: test/testcharvar.cpp externals/simplecpp/simplecpp.h lib/addoninfo.h lib/check.h lib/checkother.h lib/color.h lib/config.h lib/errorlogger.h lib/errortypes.h lib/library.h lib/mathlib.h lib/platform.h lib/preprocessor.h lib/settings.h lib/standards.h lib/suppressions.h lib/tokenize.h lib/tokenlist.h lib/utils.h test/fixture.h test/helpers.h $(CXX) ${INCLUDE_FOR_TEST} $(CPPFLAGS) $(CXXFLAGS) -c -o $@ test/testcharvar.cpp test/testcheck.o: test/testcheck.cpp lib/addoninfo.h lib/check.h lib/color.h lib/config.h lib/errorlogger.h lib/errortypes.h lib/library.h lib/mathlib.h lib/platform.h lib/settings.h lib/standards.h lib/suppressions.h lib/utils.h test/fixture.h @@ -726,73 +726,73 @@ test/testclangimport.o: test/testclangimport.cpp lib/addoninfo.h lib/check.h lib/clangimport.h lib/color.h lib/config.h lib/errorlogger.h lib/errortypes.h lib/library.h lib/mathlib.h lib/platform.h lib/settings.h lib/sourcelocation.h lib/standards.h lib/suppressions.h lib/symboldatabase.h lib/templatesimplifier.h lib/token.h lib/tokenize.h lib/tokenlist.h lib/utils.h lib/vfvalue.h test/fixture.h $(CXX) ${INCLUDE_FOR_TEST} $(CPPFLAGS) $(CXXFLAGS) -c -o $@ test/testclangimport.cpp -test/testclass.o: test/testclass.cpp lib/addoninfo.h lib/check.h lib/checkclass.h lib/color.h lib/config.h lib/errorlogger.h lib/errortypes.h lib/library.h lib/mathlib.h lib/platform.h lib/settings.h lib/sourcelocation.h lib/standards.h lib/suppressions.h lib/symboldatabase.h lib/templatesimplifier.h lib/token.h lib/tokenize.h lib/tokenlist.h lib/utils.h lib/vfvalue.h test/fixture.h test/helpers.h +test/testclass.o: test/testclass.cpp externals/simplecpp/simplecpp.h lib/addoninfo.h lib/check.h lib/checkclass.h lib/color.h lib/config.h lib/errorlogger.h lib/errortypes.h lib/library.h lib/mathlib.h lib/platform.h lib/preprocessor.h lib/settings.h lib/sourcelocation.h lib/standards.h lib/suppressions.h lib/symboldatabase.h lib/templatesimplifier.h lib/token.h lib/tokenize.h lib/tokenlist.h lib/utils.h lib/vfvalue.h test/fixture.h test/helpers.h $(CXX) ${INCLUDE_FOR_TEST} $(CPPFLAGS) $(CXXFLAGS) -c -o $@ test/testclass.cpp -test/testcmdlineparser.o: test/testcmdlineparser.cpp cli/cmdlinelogger.h cli/cmdlineparser.h cli/cppcheckexecutor.h lib/addoninfo.h lib/check.h lib/color.h lib/config.h lib/errorlogger.h lib/errortypes.h lib/filesettings.h lib/library.h lib/mathlib.h lib/path.h lib/platform.h lib/settings.h lib/standards.h lib/suppressions.h lib/timer.h lib/tokenize.h lib/tokenlist.h lib/utils.h test/fixture.h test/helpers.h test/redirect.h +test/testcmdlineparser.o: test/testcmdlineparser.cpp cli/cmdlinelogger.h cli/cmdlineparser.h cli/cppcheckexecutor.h externals/simplecpp/simplecpp.h lib/addoninfo.h lib/check.h lib/color.h lib/config.h lib/errorlogger.h lib/errortypes.h lib/filesettings.h lib/library.h lib/mathlib.h lib/path.h lib/platform.h lib/preprocessor.h lib/settings.h lib/standards.h lib/suppressions.h lib/timer.h lib/tokenize.h lib/tokenlist.h lib/utils.h test/fixture.h test/helpers.h test/redirect.h $(CXX) ${INCLUDE_FOR_TEST} $(CPPFLAGS) $(CXXFLAGS) -c -o $@ test/testcmdlineparser.cpp test/testcolor.o: test/testcolor.cpp lib/addoninfo.h lib/check.h lib/color.h lib/config.h lib/errorlogger.h lib/errortypes.h lib/library.h lib/mathlib.h lib/platform.h lib/settings.h lib/standards.h lib/suppressions.h lib/utils.h test/fixture.h $(CXX) ${INCLUDE_FOR_TEST} $(CPPFLAGS) $(CXXFLAGS) -c -o $@ test/testcolor.cpp -test/testcondition.o: test/testcondition.cpp lib/addoninfo.h lib/check.h lib/checkcondition.h lib/color.h lib/config.h lib/errorlogger.h lib/errortypes.h lib/library.h lib/mathlib.h lib/platform.h lib/settings.h lib/standards.h lib/suppressions.h lib/tokenize.h lib/tokenlist.h lib/utils.h test/fixture.h test/helpers.h +test/testcondition.o: test/testcondition.cpp externals/simplecpp/simplecpp.h lib/addoninfo.h lib/check.h lib/checkcondition.h lib/color.h lib/config.h lib/errorlogger.h lib/errortypes.h lib/library.h lib/mathlib.h lib/platform.h lib/preprocessor.h lib/settings.h lib/standards.h lib/suppressions.h lib/tokenize.h lib/tokenlist.h lib/utils.h test/fixture.h test/helpers.h $(CXX) ${INCLUDE_FOR_TEST} $(CPPFLAGS) $(CXXFLAGS) -c -o $@ test/testcondition.cpp -test/testconstructors.o: test/testconstructors.cpp lib/addoninfo.h lib/check.h lib/checkclass.h lib/color.h lib/config.h lib/errorlogger.h lib/errortypes.h lib/library.h lib/mathlib.h lib/platform.h lib/settings.h lib/sourcelocation.h lib/standards.h lib/suppressions.h lib/symboldatabase.h lib/templatesimplifier.h lib/token.h lib/tokenize.h lib/tokenlist.h lib/utils.h lib/vfvalue.h test/fixture.h test/helpers.h +test/testconstructors.o: test/testconstructors.cpp externals/simplecpp/simplecpp.h lib/addoninfo.h lib/check.h lib/checkclass.h lib/color.h lib/config.h lib/errorlogger.h lib/errortypes.h lib/library.h lib/mathlib.h lib/platform.h lib/preprocessor.h lib/settings.h lib/sourcelocation.h lib/standards.h lib/suppressions.h lib/symboldatabase.h lib/templatesimplifier.h lib/token.h lib/tokenize.h lib/tokenlist.h lib/utils.h lib/vfvalue.h test/fixture.h test/helpers.h $(CXX) ${INCLUDE_FOR_TEST} $(CPPFLAGS) $(CXXFLAGS) -c -o $@ test/testconstructors.cpp -test/testcppcheck.o: test/testcppcheck.cpp externals/simplecpp/simplecpp.h lib/addoninfo.h lib/analyzerinfo.h lib/check.h lib/color.h lib/config.h lib/cppcheck.h lib/errorlogger.h lib/errortypes.h lib/filesettings.h lib/library.h lib/mathlib.h lib/platform.h lib/settings.h lib/standards.h lib/suppressions.h lib/tokenize.h lib/tokenlist.h lib/utils.h test/fixture.h test/helpers.h +test/testcppcheck.o: test/testcppcheck.cpp externals/simplecpp/simplecpp.h lib/addoninfo.h lib/analyzerinfo.h lib/check.h lib/color.h lib/config.h lib/cppcheck.h lib/errorlogger.h lib/errortypes.h lib/filesettings.h lib/library.h lib/mathlib.h lib/platform.h lib/preprocessor.h lib/settings.h lib/standards.h lib/suppressions.h lib/tokenize.h lib/tokenlist.h lib/utils.h test/fixture.h test/helpers.h $(CXX) ${INCLUDE_FOR_TEST} $(CPPFLAGS) $(CXXFLAGS) -c -o $@ test/testcppcheck.cpp test/testerrorlogger.o: test/testerrorlogger.cpp externals/tinyxml2/tinyxml2.h lib/addoninfo.h lib/analyzerinfo.h lib/check.h lib/color.h lib/config.h lib/cppcheck.h lib/errorlogger.h lib/errortypes.h lib/library.h lib/mathlib.h lib/platform.h lib/settings.h lib/standards.h lib/suppressions.h lib/utils.h lib/xml.h test/fixture.h $(CXX) ${INCLUDE_FOR_TEST} $(CPPFLAGS) $(CXXFLAGS) -c -o $@ test/testerrorlogger.cpp -test/testexceptionsafety.o: test/testexceptionsafety.cpp lib/addoninfo.h lib/check.h lib/checkexceptionsafety.h lib/color.h lib/config.h lib/errorlogger.h lib/errortypes.h lib/library.h lib/mathlib.h lib/platform.h lib/settings.h lib/standards.h lib/suppressions.h lib/tokenize.h lib/tokenlist.h lib/utils.h test/fixture.h test/helpers.h +test/testexceptionsafety.o: test/testexceptionsafety.cpp externals/simplecpp/simplecpp.h lib/addoninfo.h lib/check.h lib/checkexceptionsafety.h lib/color.h lib/config.h lib/errorlogger.h lib/errortypes.h lib/library.h lib/mathlib.h lib/platform.h lib/preprocessor.h lib/settings.h lib/standards.h lib/suppressions.h lib/tokenize.h lib/tokenlist.h lib/utils.h test/fixture.h test/helpers.h $(CXX) ${INCLUDE_FOR_TEST} $(CPPFLAGS) $(CXXFLAGS) -c -o $@ test/testexceptionsafety.cpp test/testfilelister.o: test/testfilelister.cpp cli/filelister.h lib/addoninfo.h lib/check.h lib/color.h lib/config.h lib/errorlogger.h lib/errortypes.h lib/library.h lib/mathlib.h lib/path.h lib/pathmatch.h lib/platform.h lib/settings.h lib/standards.h lib/suppressions.h lib/utils.h test/fixture.h $(CXX) ${INCLUDE_FOR_TEST} $(CPPFLAGS) $(CXXFLAGS) -c -o $@ test/testfilelister.cpp -test/testfunctions.o: test/testfunctions.cpp lib/addoninfo.h lib/check.h lib/checkfunctions.h lib/color.h lib/config.h lib/errorlogger.h lib/errortypes.h lib/library.h lib/mathlib.h lib/platform.h lib/settings.h lib/standards.h lib/suppressions.h lib/tokenize.h lib/tokenlist.h lib/utils.h test/fixture.h test/helpers.h +test/testfunctions.o: test/testfunctions.cpp externals/simplecpp/simplecpp.h lib/addoninfo.h lib/check.h lib/checkfunctions.h lib/color.h lib/config.h lib/errorlogger.h lib/errortypes.h lib/library.h lib/mathlib.h lib/platform.h lib/preprocessor.h lib/settings.h lib/standards.h lib/suppressions.h lib/tokenize.h lib/tokenlist.h lib/utils.h test/fixture.h test/helpers.h $(CXX) ${INCLUDE_FOR_TEST} $(CPPFLAGS) $(CXXFLAGS) -c -o $@ test/testfunctions.cpp -test/testgarbage.o: test/testgarbage.cpp lib/addoninfo.h lib/check.h lib/color.h lib/config.h lib/errorlogger.h lib/errortypes.h lib/library.h lib/mathlib.h lib/platform.h lib/settings.h lib/standards.h lib/suppressions.h lib/templatesimplifier.h lib/token.h lib/tokenize.h lib/tokenlist.h lib/utils.h lib/vfvalue.h test/fixture.h test/helpers.h +test/testgarbage.o: test/testgarbage.cpp externals/simplecpp/simplecpp.h lib/addoninfo.h lib/check.h lib/color.h lib/config.h lib/errorlogger.h lib/errortypes.h lib/library.h lib/mathlib.h lib/platform.h lib/preprocessor.h lib/settings.h lib/standards.h lib/suppressions.h lib/templatesimplifier.h lib/token.h lib/tokenize.h lib/tokenlist.h lib/utils.h lib/vfvalue.h test/fixture.h test/helpers.h $(CXX) ${INCLUDE_FOR_TEST} $(CPPFLAGS) $(CXXFLAGS) -c -o $@ test/testgarbage.cpp test/testimportproject.o: test/testimportproject.cpp lib/addoninfo.h lib/check.h lib/color.h lib/config.h lib/errorlogger.h lib/errortypes.h lib/filesettings.h lib/importproject.h lib/library.h lib/mathlib.h lib/platform.h lib/settings.h lib/standards.h lib/suppressions.h lib/utils.h test/fixture.h test/redirect.h $(CXX) ${INCLUDE_FOR_TEST} $(CPPFLAGS) $(CXXFLAGS) -c -o $@ test/testimportproject.cpp -test/testincompletestatement.o: test/testincompletestatement.cpp lib/addoninfo.h lib/check.h lib/checkother.h lib/color.h lib/config.h lib/errorlogger.h lib/errortypes.h lib/library.h lib/mathlib.h lib/platform.h lib/settings.h lib/standards.h lib/suppressions.h lib/tokenize.h lib/tokenlist.h lib/utils.h test/fixture.h test/helpers.h +test/testincompletestatement.o: test/testincompletestatement.cpp externals/simplecpp/simplecpp.h lib/addoninfo.h lib/check.h lib/checkother.h lib/color.h lib/config.h lib/errorlogger.h lib/errortypes.h lib/library.h lib/mathlib.h lib/platform.h lib/preprocessor.h lib/settings.h lib/standards.h lib/suppressions.h lib/tokenize.h lib/tokenlist.h lib/utils.h test/fixture.h test/helpers.h $(CXX) ${INCLUDE_FOR_TEST} $(CPPFLAGS) $(CXXFLAGS) -c -o $@ test/testincompletestatement.cpp -test/testinternal.o: test/testinternal.cpp lib/addoninfo.h lib/check.h lib/checkinternal.h lib/color.h lib/config.h lib/errorlogger.h lib/errortypes.h lib/library.h lib/mathlib.h lib/platform.h lib/settings.h lib/standards.h lib/suppressions.h lib/tokenize.h lib/tokenlist.h lib/utils.h test/fixture.h test/helpers.h +test/testinternal.o: test/testinternal.cpp externals/simplecpp/simplecpp.h lib/addoninfo.h lib/check.h lib/checkinternal.h lib/color.h lib/config.h lib/errorlogger.h lib/errortypes.h lib/library.h lib/mathlib.h lib/platform.h lib/preprocessor.h lib/settings.h lib/standards.h lib/suppressions.h lib/tokenize.h lib/tokenlist.h lib/utils.h test/fixture.h test/helpers.h $(CXX) ${INCLUDE_FOR_TEST} $(CPPFLAGS) $(CXXFLAGS) -c -o $@ test/testinternal.cpp -test/testio.o: test/testio.cpp lib/addoninfo.h lib/check.h lib/checkio.h lib/color.h lib/config.h lib/errorlogger.h lib/errortypes.h lib/library.h lib/mathlib.h lib/platform.h lib/settings.h lib/standards.h lib/suppressions.h lib/tokenize.h lib/tokenlist.h lib/utils.h test/fixture.h test/helpers.h +test/testio.o: test/testio.cpp externals/simplecpp/simplecpp.h lib/addoninfo.h lib/check.h lib/checkio.h lib/color.h lib/config.h lib/errorlogger.h lib/errortypes.h lib/library.h lib/mathlib.h lib/platform.h lib/preprocessor.h lib/settings.h lib/standards.h lib/suppressions.h lib/tokenize.h lib/tokenlist.h lib/utils.h test/fixture.h test/helpers.h $(CXX) ${INCLUDE_FOR_TEST} $(CPPFLAGS) $(CXXFLAGS) -c -o $@ test/testio.cpp -test/testleakautovar.o: test/testleakautovar.cpp lib/addoninfo.h lib/check.h lib/checkleakautovar.h lib/color.h lib/config.h lib/errorlogger.h lib/errortypes.h lib/library.h lib/mathlib.h lib/platform.h lib/settings.h lib/standards.h lib/suppressions.h lib/tokenize.h lib/tokenlist.h lib/utils.h test/fixture.h test/helpers.h +test/testleakautovar.o: test/testleakautovar.cpp externals/simplecpp/simplecpp.h lib/addoninfo.h lib/check.h lib/checkleakautovar.h lib/color.h lib/config.h lib/errorlogger.h lib/errortypes.h lib/library.h lib/mathlib.h lib/platform.h lib/preprocessor.h lib/settings.h lib/standards.h lib/suppressions.h lib/tokenize.h lib/tokenlist.h lib/utils.h test/fixture.h test/helpers.h $(CXX) ${INCLUDE_FOR_TEST} $(CPPFLAGS) $(CXXFLAGS) -c -o $@ test/testleakautovar.cpp -test/testlibrary.o: test/testlibrary.cpp externals/tinyxml2/tinyxml2.h lib/addoninfo.h lib/check.h lib/color.h lib/config.h lib/errorlogger.h lib/errortypes.h lib/library.h lib/mathlib.h lib/platform.h lib/settings.h lib/standards.h lib/suppressions.h lib/templatesimplifier.h lib/token.h lib/tokenize.h lib/tokenlist.h lib/utils.h lib/vfvalue.h lib/xml.h test/fixture.h test/helpers.h +test/testlibrary.o: test/testlibrary.cpp externals/simplecpp/simplecpp.h externals/tinyxml2/tinyxml2.h lib/addoninfo.h lib/check.h lib/color.h lib/config.h lib/errorlogger.h lib/errortypes.h lib/library.h lib/mathlib.h lib/platform.h lib/preprocessor.h lib/settings.h lib/standards.h lib/suppressions.h lib/templatesimplifier.h lib/token.h lib/tokenize.h lib/tokenlist.h lib/utils.h lib/vfvalue.h lib/xml.h test/fixture.h test/helpers.h $(CXX) ${INCLUDE_FOR_TEST} $(CPPFLAGS) $(CXXFLAGS) -c -o $@ test/testlibrary.cpp test/testmathlib.o: test/testmathlib.cpp lib/addoninfo.h lib/check.h lib/color.h lib/config.h lib/errorlogger.h lib/errortypes.h lib/library.h lib/mathlib.h lib/platform.h lib/settings.h lib/standards.h lib/suppressions.h lib/utils.h test/fixture.h $(CXX) ${INCLUDE_FOR_TEST} $(CPPFLAGS) $(CXXFLAGS) -c -o $@ test/testmathlib.cpp -test/testmemleak.o: test/testmemleak.cpp lib/addoninfo.h lib/check.h lib/checkmemoryleak.h lib/color.h lib/config.h lib/errorlogger.h lib/errortypes.h lib/library.h lib/mathlib.h lib/platform.h lib/settings.h lib/sourcelocation.h lib/standards.h lib/suppressions.h lib/symboldatabase.h lib/templatesimplifier.h lib/token.h lib/tokenize.h lib/tokenlist.h lib/utils.h lib/vfvalue.h test/fixture.h test/helpers.h +test/testmemleak.o: test/testmemleak.cpp externals/simplecpp/simplecpp.h lib/addoninfo.h lib/check.h lib/checkmemoryleak.h lib/color.h lib/config.h lib/errorlogger.h lib/errortypes.h lib/library.h lib/mathlib.h lib/platform.h lib/preprocessor.h lib/settings.h lib/sourcelocation.h lib/standards.h lib/suppressions.h lib/symboldatabase.h lib/templatesimplifier.h lib/token.h lib/tokenize.h lib/tokenlist.h lib/utils.h lib/vfvalue.h test/fixture.h test/helpers.h $(CXX) ${INCLUDE_FOR_TEST} $(CPPFLAGS) $(CXXFLAGS) -c -o $@ test/testmemleak.cpp -test/testnullpointer.o: test/testnullpointer.cpp lib/addoninfo.h lib/check.h lib/checknullpointer.h lib/color.h lib/config.h lib/ctu.h lib/errorlogger.h lib/errortypes.h lib/library.h lib/mathlib.h lib/platform.h lib/settings.h lib/standards.h lib/suppressions.h lib/templatesimplifier.h lib/token.h lib/tokenize.h lib/tokenlist.h lib/utils.h lib/vfvalue.h test/fixture.h test/helpers.h +test/testnullpointer.o: test/testnullpointer.cpp externals/simplecpp/simplecpp.h lib/addoninfo.h lib/check.h lib/checknullpointer.h lib/color.h lib/config.h lib/ctu.h lib/errorlogger.h lib/errortypes.h lib/library.h lib/mathlib.h lib/platform.h lib/preprocessor.h lib/settings.h lib/standards.h lib/suppressions.h lib/templatesimplifier.h lib/token.h lib/tokenize.h lib/tokenlist.h lib/utils.h lib/vfvalue.h test/fixture.h test/helpers.h $(CXX) ${INCLUDE_FOR_TEST} $(CPPFLAGS) $(CXXFLAGS) -c -o $@ test/testnullpointer.cpp test/testoptions.o: test/testoptions.cpp lib/addoninfo.h lib/check.h lib/color.h lib/config.h lib/errorlogger.h lib/errortypes.h lib/library.h lib/mathlib.h lib/platform.h lib/settings.h lib/standards.h lib/suppressions.h lib/utils.h test/fixture.h test/options.h $(CXX) ${INCLUDE_FOR_TEST} $(CPPFLAGS) $(CXXFLAGS) -c -o $@ test/testoptions.cpp -test/testother.o: test/testother.cpp lib/addoninfo.h lib/check.h lib/checkother.h lib/color.h lib/config.h lib/errorlogger.h lib/errortypes.h lib/library.h lib/mathlib.h lib/platform.h lib/settings.h lib/standards.h lib/suppressions.h lib/tokenize.h lib/tokenlist.h lib/utils.h test/fixture.h test/helpers.h +test/testother.o: test/testother.cpp externals/simplecpp/simplecpp.h lib/addoninfo.h lib/check.h lib/checkother.h lib/color.h lib/config.h lib/errorlogger.h lib/errortypes.h lib/library.h lib/mathlib.h lib/platform.h lib/preprocessor.h lib/settings.h lib/standards.h lib/suppressions.h lib/tokenize.h lib/tokenlist.h lib/utils.h test/fixture.h test/helpers.h $(CXX) ${INCLUDE_FOR_TEST} $(CPPFLAGS) $(CXXFLAGS) -c -o $@ test/testother.cpp -test/testpath.o: test/testpath.cpp lib/addoninfo.h lib/check.h lib/color.h lib/config.h lib/errorlogger.h lib/errortypes.h lib/library.h lib/mathlib.h lib/path.h lib/platform.h lib/settings.h lib/standards.h lib/suppressions.h lib/tokenize.h lib/tokenlist.h lib/utils.h test/fixture.h test/helpers.h +test/testpath.o: test/testpath.cpp externals/simplecpp/simplecpp.h lib/addoninfo.h lib/check.h lib/color.h lib/config.h lib/errorlogger.h lib/errortypes.h lib/library.h lib/mathlib.h lib/path.h lib/platform.h lib/preprocessor.h lib/settings.h lib/standards.h lib/suppressions.h lib/tokenize.h lib/tokenlist.h lib/utils.h test/fixture.h test/helpers.h $(CXX) ${INCLUDE_FOR_TEST} $(CPPFLAGS) $(CXXFLAGS) -c -o $@ test/testpath.cpp test/testpathmatch.o: test/testpathmatch.cpp lib/addoninfo.h lib/check.h lib/color.h lib/config.h lib/errorlogger.h lib/errortypes.h lib/library.h lib/mathlib.h lib/pathmatch.h lib/platform.h lib/settings.h lib/standards.h lib/suppressions.h lib/utils.h test/fixture.h @@ -801,58 +801,58 @@ test/testplatform.o: test/testplatform.cpp externals/tinyxml2/tinyxml2.h lib/addoninfo.h lib/check.h lib/color.h lib/config.h lib/errorlogger.h lib/errortypes.h lib/library.h lib/mathlib.h lib/platform.h lib/settings.h lib/standards.h lib/suppressions.h lib/utils.h lib/xml.h test/fixture.h $(CXX) ${INCLUDE_FOR_TEST} $(CPPFLAGS) $(CXXFLAGS) -c -o $@ test/testplatform.cpp -test/testpostfixoperator.o: test/testpostfixoperator.cpp lib/addoninfo.h lib/check.h lib/checkpostfixoperator.h lib/color.h lib/config.h lib/errorlogger.h lib/errortypes.h lib/library.h lib/mathlib.h lib/platform.h lib/settings.h lib/standards.h lib/suppressions.h lib/tokenize.h lib/tokenlist.h lib/utils.h test/fixture.h test/helpers.h +test/testpostfixoperator.o: test/testpostfixoperator.cpp externals/simplecpp/simplecpp.h lib/addoninfo.h lib/check.h lib/checkpostfixoperator.h lib/color.h lib/config.h lib/errorlogger.h lib/errortypes.h lib/library.h lib/mathlib.h lib/platform.h lib/preprocessor.h lib/settings.h lib/standards.h lib/suppressions.h lib/tokenize.h lib/tokenlist.h lib/utils.h test/fixture.h test/helpers.h $(CXX) ${INCLUDE_FOR_TEST} $(CPPFLAGS) $(CXXFLAGS) -c -o $@ test/testpostfixoperator.cpp test/testpreprocessor.o: test/testpreprocessor.cpp externals/simplecpp/simplecpp.h lib/addoninfo.h lib/check.h lib/color.h lib/config.h lib/errorlogger.h lib/errortypes.h lib/library.h lib/mathlib.h lib/path.h lib/platform.h lib/preprocessor.h lib/settings.h lib/standards.h lib/suppressions.h lib/tokenize.h lib/tokenlist.h lib/utils.h test/fixture.h test/helpers.h $(CXX) ${INCLUDE_FOR_TEST} $(CPPFLAGS) $(CXXFLAGS) -c -o $@ test/testpreprocessor.cpp -test/testprocessexecutor.o: test/testprocessexecutor.cpp cli/executor.h cli/processexecutor.h lib/addoninfo.h lib/analyzerinfo.h lib/check.h lib/color.h lib/config.h lib/cppcheck.h lib/errorlogger.h lib/errortypes.h lib/filesettings.h lib/library.h lib/mathlib.h lib/platform.h lib/settings.h lib/standards.h lib/suppressions.h lib/timer.h lib/tokenize.h lib/tokenlist.h lib/utils.h test/fixture.h test/helpers.h test/redirect.h +test/testprocessexecutor.o: test/testprocessexecutor.cpp cli/executor.h cli/processexecutor.h externals/simplecpp/simplecpp.h lib/addoninfo.h lib/analyzerinfo.h lib/check.h lib/color.h lib/config.h lib/cppcheck.h lib/errorlogger.h lib/errortypes.h lib/filesettings.h lib/library.h lib/mathlib.h lib/platform.h lib/preprocessor.h lib/settings.h lib/standards.h lib/suppressions.h lib/timer.h lib/tokenize.h lib/tokenlist.h lib/utils.h test/fixture.h test/helpers.h test/redirect.h $(CXX) ${INCLUDE_FOR_TEST} $(CPPFLAGS) $(CXXFLAGS) -c -o $@ test/testprocessexecutor.cpp -test/testsettings.o: test/testsettings.cpp lib/addoninfo.h lib/check.h lib/color.h lib/config.h lib/errorlogger.h lib/errortypes.h lib/library.h lib/mathlib.h lib/platform.h lib/settings.h lib/standards.h lib/suppressions.h lib/tokenize.h lib/tokenlist.h lib/utils.h test/fixture.h test/helpers.h +test/testsettings.o: test/testsettings.cpp externals/simplecpp/simplecpp.h lib/addoninfo.h lib/check.h lib/color.h lib/config.h lib/errorlogger.h lib/errortypes.h lib/library.h lib/mathlib.h lib/platform.h lib/preprocessor.h lib/settings.h lib/standards.h lib/suppressions.h lib/tokenize.h lib/tokenlist.h lib/utils.h test/fixture.h test/helpers.h $(CXX) ${INCLUDE_FOR_TEST} $(CPPFLAGS) $(CXXFLAGS) -c -o $@ test/testsettings.cpp -test/testsimplifytemplate.o: test/testsimplifytemplate.cpp lib/addoninfo.h lib/check.h lib/color.h lib/config.h lib/errorlogger.h lib/errortypes.h lib/library.h lib/mathlib.h lib/platform.h lib/settings.h lib/standards.h lib/suppressions.h lib/templatesimplifier.h lib/token.h lib/tokenize.h lib/tokenlist.h lib/utils.h lib/vfvalue.h test/fixture.h test/helpers.h +test/testsimplifytemplate.o: test/testsimplifytemplate.cpp externals/simplecpp/simplecpp.h lib/addoninfo.h lib/check.h lib/color.h lib/config.h lib/errorlogger.h lib/errortypes.h lib/library.h lib/mathlib.h lib/platform.h lib/preprocessor.h lib/settings.h lib/standards.h lib/suppressions.h lib/templatesimplifier.h lib/token.h lib/tokenize.h lib/tokenlist.h lib/utils.h lib/vfvalue.h test/fixture.h test/helpers.h $(CXX) ${INCLUDE_FOR_TEST} $(CPPFLAGS) $(CXXFLAGS) -c -o $@ test/testsimplifytemplate.cpp -test/testsimplifytokens.o: test/testsimplifytokens.cpp lib/addoninfo.h lib/check.h lib/color.h lib/config.h lib/errorlogger.h lib/errortypes.h lib/library.h lib/mathlib.h lib/platform.h lib/settings.h lib/standards.h lib/suppressions.h lib/templatesimplifier.h lib/token.h lib/tokenize.h lib/tokenlist.h lib/utils.h lib/vfvalue.h test/fixture.h test/helpers.h +test/testsimplifytokens.o: test/testsimplifytokens.cpp externals/simplecpp/simplecpp.h lib/addoninfo.h lib/check.h lib/color.h lib/config.h lib/errorlogger.h lib/errortypes.h lib/library.h lib/mathlib.h lib/platform.h lib/preprocessor.h lib/settings.h lib/standards.h lib/suppressions.h lib/templatesimplifier.h lib/token.h lib/tokenize.h lib/tokenlist.h lib/utils.h lib/vfvalue.h test/fixture.h test/helpers.h $(CXX) ${INCLUDE_FOR_TEST} $(CPPFLAGS) $(CXXFLAGS) -c -o $@ test/testsimplifytokens.cpp -test/testsimplifytypedef.o: test/testsimplifytypedef.cpp lib/addoninfo.h lib/check.h lib/color.h lib/config.h lib/errorlogger.h lib/errortypes.h lib/library.h lib/mathlib.h lib/platform.h lib/settings.h lib/standards.h lib/suppressions.h lib/templatesimplifier.h lib/token.h lib/tokenize.h lib/tokenlist.h lib/utils.h lib/vfvalue.h test/fixture.h test/helpers.h +test/testsimplifytypedef.o: test/testsimplifytypedef.cpp externals/simplecpp/simplecpp.h lib/addoninfo.h lib/check.h lib/color.h lib/config.h lib/errorlogger.h lib/errortypes.h lib/library.h lib/mathlib.h lib/platform.h lib/preprocessor.h lib/settings.h lib/standards.h lib/suppressions.h lib/templatesimplifier.h lib/token.h lib/tokenize.h lib/tokenlist.h lib/utils.h lib/vfvalue.h test/fixture.h test/helpers.h $(CXX) ${INCLUDE_FOR_TEST} $(CPPFLAGS) $(CXXFLAGS) -c -o $@ test/testsimplifytypedef.cpp -test/testsimplifyusing.o: test/testsimplifyusing.cpp lib/addoninfo.h lib/check.h lib/color.h lib/config.h lib/errorlogger.h lib/errortypes.h lib/library.h lib/mathlib.h lib/platform.h lib/settings.h lib/standards.h lib/suppressions.h lib/templatesimplifier.h lib/token.h lib/tokenize.h lib/tokenlist.h lib/utils.h lib/vfvalue.h test/fixture.h test/helpers.h +test/testsimplifyusing.o: test/testsimplifyusing.cpp externals/simplecpp/simplecpp.h lib/addoninfo.h lib/check.h lib/color.h lib/config.h lib/errorlogger.h lib/errortypes.h lib/library.h lib/mathlib.h lib/platform.h lib/preprocessor.h lib/settings.h lib/standards.h lib/suppressions.h lib/templatesimplifier.h lib/token.h lib/tokenize.h lib/tokenlist.h lib/utils.h lib/vfvalue.h test/fixture.h test/helpers.h $(CXX) ${INCLUDE_FOR_TEST} $(CPPFLAGS) $(CXXFLAGS) -c -o $@ test/testsimplifyusing.cpp -test/testsingleexecutor.o: test/testsingleexecutor.cpp cli/executor.h cli/singleexecutor.h lib/addoninfo.h lib/analyzerinfo.h lib/check.h lib/color.h lib/config.h lib/cppcheck.h lib/errorlogger.h lib/errortypes.h lib/filesettings.h lib/library.h lib/mathlib.h lib/platform.h lib/settings.h lib/standards.h lib/suppressions.h lib/timer.h lib/tokenize.h lib/tokenlist.h lib/utils.h test/fixture.h test/helpers.h test/redirect.h +test/testsingleexecutor.o: test/testsingleexecutor.cpp cli/executor.h cli/singleexecutor.h externals/simplecpp/simplecpp.h lib/addoninfo.h lib/analyzerinfo.h lib/check.h lib/color.h lib/config.h lib/cppcheck.h lib/errorlogger.h lib/errortypes.h lib/filesettings.h lib/library.h lib/mathlib.h lib/platform.h lib/preprocessor.h lib/settings.h lib/standards.h lib/suppressions.h lib/timer.h lib/tokenize.h lib/tokenlist.h lib/utils.h test/fixture.h test/helpers.h test/redirect.h $(CXX) ${INCLUDE_FOR_TEST} $(CPPFLAGS) $(CXXFLAGS) -c -o $@ test/testsingleexecutor.cpp -test/testsizeof.o: test/testsizeof.cpp lib/addoninfo.h lib/check.h lib/checksizeof.h lib/color.h lib/config.h lib/errorlogger.h lib/errortypes.h lib/library.h lib/mathlib.h lib/platform.h lib/settings.h lib/standards.h lib/suppressions.h lib/tokenize.h lib/tokenlist.h lib/utils.h test/fixture.h test/helpers.h +test/testsizeof.o: test/testsizeof.cpp externals/simplecpp/simplecpp.h lib/addoninfo.h lib/check.h lib/checksizeof.h lib/color.h lib/config.h lib/errorlogger.h lib/errortypes.h lib/library.h lib/mathlib.h lib/platform.h lib/preprocessor.h lib/settings.h lib/standards.h lib/suppressions.h lib/tokenize.h lib/tokenlist.h lib/utils.h test/fixture.h test/helpers.h $(CXX) ${INCLUDE_FOR_TEST} $(CPPFLAGS) $(CXXFLAGS) -c -o $@ test/testsizeof.cpp -test/teststl.o: test/teststl.cpp lib/addoninfo.h lib/check.h lib/checkstl.h lib/color.h lib/config.h lib/errorlogger.h lib/errortypes.h lib/library.h lib/mathlib.h lib/platform.h lib/settings.h lib/standards.h lib/suppressions.h lib/tokenize.h lib/tokenlist.h lib/utils.h lib/vfvalue.h test/fixture.h test/helpers.h +test/teststl.o: test/teststl.cpp externals/simplecpp/simplecpp.h lib/addoninfo.h lib/check.h lib/checkstl.h lib/color.h lib/config.h lib/errorlogger.h lib/errortypes.h lib/library.h lib/mathlib.h lib/platform.h lib/preprocessor.h lib/settings.h lib/standards.h lib/suppressions.h lib/tokenize.h lib/tokenlist.h lib/utils.h lib/vfvalue.h test/fixture.h test/helpers.h $(CXX) ${INCLUDE_FOR_TEST} $(CPPFLAGS) $(CXXFLAGS) -c -o $@ test/teststl.cpp -test/teststring.o: test/teststring.cpp lib/addoninfo.h lib/check.h lib/checkstring.h lib/color.h lib/config.h lib/errorlogger.h lib/errortypes.h lib/library.h lib/mathlib.h lib/platform.h lib/settings.h lib/standards.h lib/suppressions.h lib/tokenize.h lib/tokenlist.h lib/utils.h test/fixture.h test/helpers.h +test/teststring.o: test/teststring.cpp externals/simplecpp/simplecpp.h lib/addoninfo.h lib/check.h lib/checkstring.h lib/color.h lib/config.h lib/errorlogger.h lib/errortypes.h lib/library.h lib/mathlib.h lib/platform.h lib/preprocessor.h lib/settings.h lib/standards.h lib/suppressions.h lib/tokenize.h lib/tokenlist.h lib/utils.h test/fixture.h test/helpers.h $(CXX) ${INCLUDE_FOR_TEST} $(CPPFLAGS) $(CXXFLAGS) -c -o $@ test/teststring.cpp -test/testsummaries.o: test/testsummaries.cpp lib/addoninfo.h lib/check.h lib/color.h lib/config.h lib/errorlogger.h lib/errortypes.h lib/library.h lib/mathlib.h lib/platform.h lib/settings.h lib/standards.h lib/summaries.h lib/suppressions.h lib/tokenize.h lib/tokenlist.h lib/utils.h test/fixture.h test/helpers.h +test/testsummaries.o: test/testsummaries.cpp externals/simplecpp/simplecpp.h lib/addoninfo.h lib/check.h lib/color.h lib/config.h lib/errorlogger.h lib/errortypes.h lib/library.h lib/mathlib.h lib/platform.h lib/preprocessor.h lib/settings.h lib/standards.h lib/summaries.h lib/suppressions.h lib/tokenize.h lib/tokenlist.h lib/utils.h test/fixture.h test/helpers.h $(CXX) ${INCLUDE_FOR_TEST} $(CPPFLAGS) $(CXXFLAGS) -c -o $@ test/testsummaries.cpp -test/testsuppressions.o: test/testsuppressions.cpp cli/cppcheckexecutor.h cli/executor.h cli/processexecutor.h cli/singleexecutor.h cli/threadexecutor.h lib/addoninfo.h lib/analyzerinfo.h lib/check.h lib/color.h lib/config.h lib/cppcheck.h lib/errorlogger.h lib/errortypes.h lib/filesettings.h lib/library.h lib/mathlib.h lib/platform.h lib/settings.h lib/standards.h lib/suppressions.h lib/tokenize.h lib/tokenlist.h lib/utils.h test/fixture.h test/helpers.h +test/testsuppressions.o: test/testsuppressions.cpp cli/cppcheckexecutor.h cli/executor.h cli/processexecutor.h cli/singleexecutor.h cli/threadexecutor.h externals/simplecpp/simplecpp.h lib/addoninfo.h lib/analyzerinfo.h lib/check.h lib/color.h lib/config.h lib/cppcheck.h lib/errorlogger.h lib/errortypes.h lib/filesettings.h lib/library.h lib/mathlib.h lib/platform.h lib/preprocessor.h lib/settings.h lib/standards.h lib/suppressions.h lib/tokenize.h lib/tokenlist.h lib/utils.h test/fixture.h test/helpers.h $(CXX) ${INCLUDE_FOR_TEST} $(CPPFLAGS) $(CXXFLAGS) -c -o $@ test/testsuppressions.cpp -test/testsymboldatabase.o: test/testsymboldatabase.cpp lib/addoninfo.h lib/check.h lib/color.h lib/config.h lib/errorlogger.h lib/errortypes.h lib/library.h lib/mathlib.h lib/platform.h lib/settings.h lib/sourcelocation.h lib/standards.h lib/suppressions.h lib/symboldatabase.h lib/templatesimplifier.h lib/token.h lib/tokenize.h lib/tokenlist.h lib/utils.h lib/vfvalue.h test/fixture.h test/helpers.h +test/testsymboldatabase.o: test/testsymboldatabase.cpp externals/simplecpp/simplecpp.h lib/addoninfo.h lib/check.h lib/color.h lib/config.h lib/errorlogger.h lib/errortypes.h lib/library.h lib/mathlib.h lib/platform.h lib/preprocessor.h lib/settings.h lib/sourcelocation.h lib/standards.h lib/suppressions.h lib/symboldatabase.h lib/templatesimplifier.h lib/token.h lib/tokenize.h lib/tokenlist.h lib/utils.h lib/vfvalue.h test/fixture.h test/helpers.h $(CXX) ${INCLUDE_FOR_TEST} $(CPPFLAGS) $(CXXFLAGS) -c -o $@ test/testsymboldatabase.cpp -test/testthreadexecutor.o: test/testthreadexecutor.cpp cli/executor.h cli/threadexecutor.h lib/addoninfo.h lib/analyzerinfo.h lib/check.h lib/color.h lib/config.h lib/cppcheck.h lib/errorlogger.h lib/errortypes.h lib/filesettings.h lib/library.h lib/mathlib.h lib/platform.h lib/settings.h lib/standards.h lib/suppressions.h lib/timer.h lib/tokenize.h lib/tokenlist.h lib/utils.h test/fixture.h test/helpers.h test/redirect.h +test/testthreadexecutor.o: test/testthreadexecutor.cpp cli/executor.h cli/threadexecutor.h externals/simplecpp/simplecpp.h lib/addoninfo.h lib/analyzerinfo.h lib/check.h lib/color.h lib/config.h lib/cppcheck.h lib/errorlogger.h lib/errortypes.h lib/filesettings.h lib/library.h lib/mathlib.h lib/platform.h lib/preprocessor.h lib/settings.h lib/standards.h lib/suppressions.h lib/timer.h lib/tokenize.h lib/tokenlist.h lib/utils.h test/fixture.h test/helpers.h test/redirect.h $(CXX) ${INCLUDE_FOR_TEST} $(CPPFLAGS) $(CXXFLAGS) -c -o $@ test/testthreadexecutor.cpp test/testtimer.o: test/testtimer.cpp lib/addoninfo.h lib/check.h lib/color.h lib/config.h lib/errorlogger.h lib/errortypes.h lib/library.h lib/mathlib.h lib/platform.h lib/settings.h lib/standards.h lib/suppressions.h lib/timer.h lib/utils.h test/fixture.h $(CXX) ${INCLUDE_FOR_TEST} $(CPPFLAGS) $(CXXFLAGS) -c -o $@ test/testtimer.cpp -test/testtoken.o: test/testtoken.cpp lib/addoninfo.h lib/check.h lib/color.h lib/config.h lib/errorlogger.h lib/errortypes.h lib/library.h lib/mathlib.h lib/platform.h lib/settings.h lib/standards.h lib/suppressions.h lib/templatesimplifier.h lib/token.h lib/tokenize.h lib/tokenlist.h lib/utils.h lib/vfvalue.h test/fixture.h test/helpers.h +test/testtoken.o: test/testtoken.cpp externals/simplecpp/simplecpp.h lib/addoninfo.h lib/check.h lib/color.h lib/config.h lib/errorlogger.h lib/errortypes.h lib/library.h lib/mathlib.h lib/platform.h lib/preprocessor.h lib/settings.h lib/standards.h lib/suppressions.h lib/templatesimplifier.h lib/token.h lib/tokenize.h lib/tokenlist.h lib/utils.h lib/vfvalue.h test/fixture.h test/helpers.h $(CXX) ${INCLUDE_FOR_TEST} $(CPPFLAGS) $(CXXFLAGS) -c -o $@ test/testtoken.cpp test/testtokenize.o: test/testtokenize.cpp externals/simplecpp/simplecpp.h lib/addoninfo.h lib/check.h lib/color.h lib/config.h lib/errorlogger.h lib/errortypes.h lib/library.h lib/mathlib.h lib/platform.h lib/preprocessor.h lib/settings.h lib/standards.h lib/suppressions.h lib/templatesimplifier.h lib/token.h lib/tokenize.h lib/tokenlist.h lib/utils.h lib/vfvalue.h test/fixture.h test/helpers.h @@ -861,19 +861,19 @@ test/testtokenlist.o: test/testtokenlist.cpp externals/simplecpp/simplecpp.h lib/addoninfo.h lib/check.h lib/color.h lib/config.h lib/errorlogger.h lib/errortypes.h lib/library.h lib/mathlib.h lib/platform.h lib/preprocessor.h lib/settings.h lib/standards.h lib/suppressions.h lib/templatesimplifier.h lib/token.h lib/tokenize.h lib/tokenlist.h lib/utils.h lib/vfvalue.h test/fixture.h test/helpers.h $(CXX) ${INCLUDE_FOR_TEST} $(CPPFLAGS) $(CXXFLAGS) -c -o $@ test/testtokenlist.cpp -test/testtokenrange.o: test/testtokenrange.cpp lib/addoninfo.h lib/check.h lib/color.h lib/config.h lib/errorlogger.h lib/errortypes.h lib/library.h lib/mathlib.h lib/platform.h lib/settings.h lib/sourcelocation.h lib/standards.h lib/suppressions.h lib/symboldatabase.h lib/templatesimplifier.h lib/token.h lib/tokenize.h lib/tokenlist.h lib/tokenrange.h lib/utils.h lib/vfvalue.h test/fixture.h test/helpers.h +test/testtokenrange.o: test/testtokenrange.cpp externals/simplecpp/simplecpp.h lib/addoninfo.h lib/check.h lib/color.h lib/config.h lib/errorlogger.h lib/errortypes.h lib/library.h lib/mathlib.h lib/platform.h lib/preprocessor.h lib/settings.h lib/sourcelocation.h lib/standards.h lib/suppressions.h lib/symboldatabase.h lib/templatesimplifier.h lib/token.h lib/tokenize.h lib/tokenlist.h lib/tokenrange.h lib/utils.h lib/vfvalue.h test/fixture.h test/helpers.h $(CXX) ${INCLUDE_FOR_TEST} $(CPPFLAGS) $(CXXFLAGS) -c -o $@ test/testtokenrange.cpp -test/testtype.o: test/testtype.cpp externals/simplecpp/simplecpp.h lib/addoninfo.h lib/check.h lib/checktype.h lib/color.h lib/config.h lib/errorlogger.h lib/errortypes.h lib/library.h lib/mathlib.h lib/platform.h lib/settings.h lib/standards.h lib/suppressions.h lib/tokenize.h lib/tokenlist.h lib/utils.h lib/vfvalue.h test/fixture.h test/helpers.h +test/testtype.o: test/testtype.cpp externals/simplecpp/simplecpp.h lib/addoninfo.h lib/check.h lib/checktype.h lib/color.h lib/config.h lib/errorlogger.h lib/errortypes.h lib/library.h lib/mathlib.h lib/platform.h lib/preprocessor.h lib/settings.h lib/standards.h lib/suppressions.h lib/tokenize.h lib/tokenlist.h lib/utils.h lib/vfvalue.h test/fixture.h test/helpers.h $(CXX) ${INCLUDE_FOR_TEST} $(CPPFLAGS) $(CXXFLAGS) -c -o $@ test/testtype.cpp -test/testuninitvar.o: test/testuninitvar.cpp lib/addoninfo.h lib/check.h lib/checkuninitvar.h lib/color.h lib/config.h lib/ctu.h lib/errorlogger.h lib/errortypes.h lib/library.h lib/mathlib.h lib/platform.h lib/settings.h lib/standards.h lib/suppressions.h lib/tokenize.h lib/tokenlist.h lib/utils.h lib/vfvalue.h test/fixture.h test/helpers.h +test/testuninitvar.o: test/testuninitvar.cpp externals/simplecpp/simplecpp.h lib/addoninfo.h lib/check.h lib/checkuninitvar.h lib/color.h lib/config.h lib/ctu.h lib/errorlogger.h lib/errortypes.h lib/library.h lib/mathlib.h lib/platform.h lib/preprocessor.h lib/settings.h lib/standards.h lib/suppressions.h lib/tokenize.h lib/tokenlist.h lib/utils.h lib/vfvalue.h test/fixture.h test/helpers.h $(CXX) ${INCLUDE_FOR_TEST} $(CPPFLAGS) $(CXXFLAGS) -c -o $@ test/testuninitvar.cpp -test/testunusedfunctions.o: test/testunusedfunctions.cpp lib/addoninfo.h lib/check.h lib/checkunusedfunctions.h lib/color.h lib/config.h lib/errorlogger.h lib/errortypes.h lib/library.h lib/mathlib.h lib/platform.h lib/settings.h lib/standards.h lib/suppressions.h lib/tokenize.h lib/tokenlist.h lib/utils.h test/fixture.h test/helpers.h +test/testunusedfunctions.o: test/testunusedfunctions.cpp externals/simplecpp/simplecpp.h lib/addoninfo.h lib/check.h lib/checkunusedfunctions.h lib/color.h lib/config.h lib/errorlogger.h lib/errortypes.h lib/library.h lib/mathlib.h lib/platform.h lib/preprocessor.h lib/settings.h lib/standards.h lib/suppressions.h lib/tokenize.h lib/tokenlist.h lib/utils.h test/fixture.h test/helpers.h $(CXX) ${INCLUDE_FOR_TEST} $(CPPFLAGS) $(CXXFLAGS) -c -o $@ test/testunusedfunctions.cpp -test/testunusedprivfunc.o: test/testunusedprivfunc.cpp lib/addoninfo.h lib/check.h lib/checkclass.h lib/color.h lib/config.h lib/errorlogger.h lib/errortypes.h lib/library.h lib/mathlib.h lib/platform.h lib/settings.h lib/sourcelocation.h lib/standards.h lib/suppressions.h lib/symboldatabase.h lib/templatesimplifier.h lib/token.h lib/tokenize.h lib/tokenlist.h lib/utils.h lib/vfvalue.h test/fixture.h test/helpers.h +test/testunusedprivfunc.o: test/testunusedprivfunc.cpp externals/simplecpp/simplecpp.h lib/addoninfo.h lib/check.h lib/checkclass.h lib/color.h lib/config.h lib/errorlogger.h lib/errortypes.h lib/library.h lib/mathlib.h lib/platform.h lib/preprocessor.h lib/settings.h lib/sourcelocation.h lib/standards.h lib/suppressions.h lib/symboldatabase.h lib/templatesimplifier.h lib/token.h lib/tokenize.h lib/tokenlist.h lib/utils.h lib/vfvalue.h test/fixture.h test/helpers.h $(CXX) ${INCLUDE_FOR_TEST} $(CPPFLAGS) $(CXXFLAGS) -c -o $@ test/testunusedprivfunc.cpp test/testunusedvar.o: test/testunusedvar.cpp externals/simplecpp/simplecpp.h lib/addoninfo.h lib/check.h lib/checkunusedvar.h lib/color.h lib/config.h lib/errorlogger.h lib/errortypes.h lib/library.h lib/mathlib.h lib/platform.h lib/preprocessor.h lib/settings.h lib/standards.h lib/suppressions.h lib/tokenize.h lib/tokenlist.h lib/utils.h test/fixture.h test/helpers.h @@ -882,13 +882,13 @@ test/testutils.o: test/testutils.cpp lib/addoninfo.h lib/check.h lib/color.h lib/config.h lib/errorlogger.h lib/errortypes.h lib/library.h lib/mathlib.h lib/platform.h lib/settings.h lib/standards.h lib/suppressions.h lib/utils.h test/fixture.h $(CXX) ${INCLUDE_FOR_TEST} $(CPPFLAGS) $(CXXFLAGS) -c -o $@ test/testutils.cpp -test/testvaarg.o: test/testvaarg.cpp lib/addoninfo.h lib/check.h lib/checkvaarg.h lib/color.h lib/config.h lib/errorlogger.h lib/errortypes.h lib/library.h lib/mathlib.h lib/platform.h lib/settings.h lib/standards.h lib/suppressions.h lib/tokenize.h lib/tokenlist.h lib/utils.h test/fixture.h test/helpers.h +test/testvaarg.o: test/testvaarg.cpp externals/simplecpp/simplecpp.h lib/addoninfo.h lib/check.h lib/checkvaarg.h lib/color.h lib/config.h lib/errorlogger.h lib/errortypes.h lib/library.h lib/mathlib.h lib/platform.h lib/preprocessor.h lib/settings.h lib/standards.h lib/suppressions.h lib/tokenize.h lib/tokenlist.h lib/utils.h test/fixture.h test/helpers.h $(CXX) ${INCLUDE_FOR_TEST} $(CPPFLAGS) $(CXXFLAGS) -c -o $@ test/testvaarg.cpp -test/testvalueflow.o: test/testvalueflow.cpp lib/addoninfo.h lib/check.h lib/color.h lib/config.h lib/errorlogger.h lib/errortypes.h lib/library.h lib/mathlib.h lib/platform.h lib/settings.h lib/standards.h lib/suppressions.h lib/templatesimplifier.h lib/token.h lib/tokenize.h lib/tokenlist.h lib/utils.h lib/vfvalue.h test/fixture.h test/helpers.h +test/testvalueflow.o: test/testvalueflow.cpp externals/simplecpp/simplecpp.h lib/addoninfo.h lib/check.h lib/color.h lib/config.h lib/errorlogger.h lib/errortypes.h lib/library.h lib/mathlib.h lib/platform.h lib/preprocessor.h lib/settings.h lib/standards.h lib/suppressions.h lib/templatesimplifier.h lib/token.h lib/tokenize.h lib/tokenlist.h lib/utils.h lib/vfvalue.h test/fixture.h test/helpers.h $(CXX) ${INCLUDE_FOR_TEST} $(CPPFLAGS) $(CXXFLAGS) -c -o $@ test/testvalueflow.cpp -test/testvarid.o: test/testvarid.cpp lib/addoninfo.h lib/check.h lib/color.h lib/config.h lib/errorlogger.h lib/errortypes.h lib/library.h lib/mathlib.h lib/platform.h lib/settings.h lib/standards.h lib/suppressions.h lib/templatesimplifier.h lib/token.h lib/tokenize.h lib/tokenlist.h lib/utils.h lib/vfvalue.h test/fixture.h test/helpers.h +test/testvarid.o: test/testvarid.cpp externals/simplecpp/simplecpp.h lib/addoninfo.h lib/check.h lib/color.h lib/config.h lib/errorlogger.h lib/errortypes.h lib/library.h lib/mathlib.h lib/platform.h lib/preprocessor.h lib/settings.h lib/standards.h lib/suppressions.h lib/templatesimplifier.h lib/token.h lib/tokenize.h lib/tokenlist.h lib/utils.h lib/vfvalue.h test/fixture.h test/helpers.h $(CXX) ${INCLUDE_FOR_TEST} $(CPPFLAGS) $(CXXFLAGS) -c -o $@ test/testvarid.cpp externals/simplecpp/simplecpp.o: externals/simplecpp/simplecpp.cpp externals/simplecpp/simplecpp.h diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cppcheck-2.14.1/cli/main.cpp new/cppcheck-2.14.2/cli/main.cpp --- old/cppcheck-2.14.1/cli/main.cpp 2024-05-26 17:58:01.000000000 +0200 +++ new/cppcheck-2.14.2/cli/main.cpp 2024-06-17 12:10:21.000000000 +0200 @@ -20,7 +20,7 @@ /** * * @mainpage Cppcheck - * @version 2.14.1 + * @version 2.14.2 * * @section overview_sec Overview * Cppcheck is a simple tool for static analysis of C/C++ code. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cppcheck-2.14.1/gui/erroritem.cpp new/cppcheck-2.14.2/gui/erroritem.cpp --- old/cppcheck-2.14.1/gui/erroritem.cpp 2024-05-26 17:58:01.000000000 +0200 +++ new/cppcheck-2.14.2/gui/erroritem.cpp 2024-06-17 12:10:21.000000000 +0200 @@ -51,12 +51,10 @@ , cwe(errmsg.cwe.id) , hash(errmsg.hash) , symbolNames(QString::fromStdString(errmsg.symbolNames())) + , remark(QString::fromStdString(errmsg.remark)) { - for (std::list<ErrorMessage::FileLocation>::const_iterator loc = errmsg.callStack.cbegin(); - loc != errmsg.callStack.cend(); - ++loc) { - errorPath << QErrorPathItem(*loc); - } + for (const auto& loc: errmsg.callStack) + errorPath << QErrorPathItem(loc); } QString ErrorItem::tool() const diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cppcheck-2.14.1/gui/erroritem.h new/cppcheck-2.14.2/gui/erroritem.h --- old/cppcheck-2.14.1/gui/erroritem.h 2024-05-26 17:58:01.000000000 +0200 +++ new/cppcheck-2.14.2/gui/erroritem.h 2024-06-17 12:10:21.000000000 +0200 @@ -91,6 +91,7 @@ unsigned long long hash; QList<QErrorPathItem> errorPath; QString symbolNames; + QString remark; // Special GUI properties QString sinceDate; @@ -122,6 +123,7 @@ QString message; QString sinceDate; QString tags; + QString remark; }; /// @} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cppcheck-2.14.1/gui/projectfiledialog.cpp new/cppcheck-2.14.2/gui/projectfiledialog.cpp --- old/cppcheck-2.14.1/gui/projectfiledialog.cpp 2024-05-26 17:58:01.000000000 +0200 +++ new/cppcheck-2.14.2/gui/projectfiledialog.cpp 2024-06-17 12:10:21.000000000 +0200 @@ -556,7 +556,6 @@ mUI->mBtnAddCheckPath->setEnabled(!importProject); mUI->mBtnEditCheckPath->setEnabled(!importProject); mUI->mBtnRemoveCheckPath->setEnabled(!importProject); - mUI->mEditDefines->setEnabled(!importProject); mUI->mEditUndefines->setEnabled(!importProject); mUI->mBtnAddInclude->setEnabled(!importProject); mUI->mBtnEditInclude->setEnabled(!importProject); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cppcheck-2.14.1/gui/resultstree.cpp new/cppcheck-2.14.2/gui/resultstree.cpp --- old/cppcheck-2.14.1/gui/resultstree.cpp 2024-05-26 17:58:01.000000000 +0200 +++ new/cppcheck-2.14.2/gui/resultstree.cpp 2024-06-17 12:10:21.000000000 +0200 @@ -78,6 +78,7 @@ static constexpr char SYMBOLNAMES[] = "symbolNames"; static constexpr char SUMMARY[] = "summary"; static constexpr char TAGS[] = "tags"; +static constexpr char REMARK[] = "remark"; // These must match column headers given in ResultsTree::translate() static constexpr int COLUMN_SINCE_DATE = 6; @@ -186,6 +187,7 @@ if (const ProjectFile *activeProject = ProjectFile::getActiveProject()) { line.tags = activeProject->getWarningTags(item.hash); } + line.remark = item.remark; //Create the base item for the error and ensure it has a proper //file item as a parent QStandardItem* fileItem = ensureFileItem(loc.file, item.file0, hide); @@ -214,6 +216,7 @@ data[SINCEDATE] = item.sinceDate; data[SYMBOLNAMES] = item.symbolNames; data[TAGS] = line.tags; + data[REMARK] = line.remark; data[HIDE] = hide; stditem->setData(QVariant(data)); @@ -1296,6 +1299,7 @@ item->file0 = data[FILE0].toString(); item->sinceDate = data[SINCEDATE].toString(); item->tags = data[TAGS].toString(); + item->remark = data[REMARK].toString(); if (error->rowCount() == 0) { QErrorPathItem e; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cppcheck-2.14.1/gui/xmlreportv2.cpp new/cppcheck-2.14.2/gui/xmlreportv2.cpp --- old/cppcheck-2.14.1/gui/xmlreportv2.cpp 2024-05-26 17:58:01.000000000 +0200 +++ new/cppcheck-2.14.2/gui/xmlreportv2.cpp 2024-06-17 12:10:21.000000000 +0200 @@ -49,6 +49,7 @@ static const QString FilenameAttribute = "file"; static const QString IncludedFromFilenameAttribute = "file0"; static const QString InconclusiveAttribute = "inconclusive"; +static const QString RemarkAttribute = "remark"; static const QString InfoAttribute = "info"; static const QString LineAttribute = "line"; static const QString ColumnAttribute = "column"; @@ -137,6 +138,8 @@ mXmlWriter->writeAttribute(VerboseAttribute, message); if (error.inconclusive) mXmlWriter->writeAttribute(InconclusiveAttribute, "true"); + if (!error.remark.isEmpty()) + mXmlWriter->writeAttribute(RemarkAttribute, error.remark); if (error.cwe > 0) mXmlWriter->writeAttribute(CWEAttribute, QString::number(error.cwe)); if (error.hash > 0) @@ -231,6 +234,8 @@ item.message = XmlReport::unquoteMessage(message); if (attribs.hasAttribute(QString(), InconclusiveAttribute)) item.inconclusive = true; + if (attribs.hasAttribute(QString(), RemarkAttribute)) + item.remark = attribs.value(QString(), RemarkAttribute).toString(); if (attribs.hasAttribute(QString(), CWEAttribute)) item.cwe = attribs.value(QString(), CWEAttribute).toInt(); if (attribs.hasAttribute(QString(), HashAttribute)) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cppcheck-2.14.1/lib/cppcheck.cpp new/cppcheck-2.14.2/lib/cppcheck.cpp --- old/cppcheck-2.14.1/lib/cppcheck.cpp 2024-05-26 17:58:01.000000000 +0200 +++ new/cppcheck-2.14.2/lib/cppcheck.cpp 2024-06-17 12:10:21.000000000 +0200 @@ -706,6 +706,7 @@ } // Parse comments and then remove them + mRemarkComments = preprocessor.getRemarkComments(tokens1); preprocessor.inlineSuppressions(tokens1, mSettings.supprs.nomsg); if (mSettings.dump || !mSettings.addons.empty()) { std::ostringstream oss; @@ -1613,7 +1614,26 @@ mExitCode = 1; } - mErrorLogger.reportErr(msg); + std::string remark; + if (!msg.callStack.empty()) { + for (const auto& r: mRemarkComments) { + if (r.file != msg.callStack.back().getfile(false)) + continue; + if (r.lineNumber != msg.callStack.back().line) + continue; + remark = r.str; + break; + } + } + + if (!remark.empty()) { + ErrorMessage msg2(msg); + msg2.remark = remark; + mErrorLogger.reportErr(msg2); + } else { + mErrorLogger.reportErr(msg); + } + // check if plistOutput should be populated and the current output file is open and the error is not suppressed if (!mSettings.plistOutput.empty() && mPlistFile.is_open() && !mSettings.supprs.nomsg.isSuppressed(errorMessage)) { // add error to plist output file diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cppcheck-2.14.1/lib/cppcheck.h new/cppcheck-2.14.2/lib/cppcheck.h --- old/cppcheck-2.14.1/lib/cppcheck.h 2024-05-26 17:58:01.000000000 +0200 +++ new/cppcheck-2.14.2/lib/cppcheck.h 2024-06-17 12:10:21.000000000 +0200 @@ -44,6 +44,7 @@ struct FileSettings; class CheckUnusedFunctions; class Tokenizer; +class RemarkComment; namespace simplecpp { class TokenList; } @@ -253,6 +254,8 @@ std::ofstream mPlistFile; std::unique_ptr<CheckUnusedFunctions> mUnusedFunctionsCheck; + + std::vector<RemarkComment> mRemarkComments; }; /// @} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cppcheck-2.14.1/lib/errorlogger.cpp new/cppcheck-2.14.2/lib/errorlogger.cpp --- old/cppcheck-2.14.1/lib/errorlogger.cpp 2024-05-26 17:58:01.000000000 +0200 +++ new/cppcheck-2.14.2/lib/errorlogger.cpp 2024-06-17 12:10:21.000000000 +0200 @@ -274,11 +274,9 @@ serializeString(oss, severityToString(severity)); serializeString(oss, std::to_string(cwe.id)); serializeString(oss, std::to_string(hash)); + serializeString(oss, fixInvalidChars(remark)); serializeString(oss, file0); - if (certainty == Certainty::inconclusive) { - const std::string text("inconclusive"); - serializeString(oss, text); - } + serializeString(oss, (certainty == Certainty::inconclusive) ? "1" : "0"); const std::string saneShortMessage = fixInvalidChars(mShortMessage); const std::string saneVerboseMessage = fixInvalidChars(mVerboseMessage); @@ -312,9 +310,9 @@ callStack.clear(); std::istringstream iss(data); - std::array<std::string, 7> results; + std::array<std::string, 9> results; std::size_t elem = 0; - while (iss.good() && elem < 7) { + while (iss.good() && elem < 9) { unsigned int len = 0; if (!(iss >> len)) throw InternalError(nullptr, "Internal Error: Deserialization of error message failed - invalid length"); @@ -332,11 +330,6 @@ if (!iss.good()) throw InternalError(nullptr, "Internal Error: Deserialization of error message failed - premature end of data"); - - if (temp == "inconclusive") { - certainty = Certainty::inconclusive; - continue; - } } results[elem++] = std::move(temp); @@ -345,7 +338,7 @@ if (!iss.good()) throw InternalError(nullptr, "Internal Error: Deserialization of error message failed - premature end of data"); - if (elem != 7) + if (elem != 9) throw InternalError(nullptr, "Internal Error: Deserialization of error message failed - insufficient elements"); id = std::move(results[0]); @@ -362,9 +355,12 @@ if (!strToInt(results[3], hash, &err)) throw InternalError(nullptr, "Internal Error: Deserialization of error message failed - invalid hash - " + err); } - file0 = std::move(results[4]); - mShortMessage = std::move(results[5]); - mVerboseMessage = std::move(results[6]); + remark = std::move(results[4]); + file0 = std::move(results[5]); + if (results[6] == "1") + certainty = Certainty::inconclusive; + mShortMessage = std::move(results[7]); + mVerboseMessage = std::move(results[8]); unsigned int stackSize = 0; if (!(iss >> stackSize)) @@ -496,6 +492,9 @@ if (!file0.empty()) printer.PushAttribute("file0", file0.c_str()); + if (!remark.empty()) + printer.PushAttribute("remark", fixInvalidChars(remark).c_str()); + for (std::list<FileLocation>::const_reverse_iterator it = callStack.crbegin(); it != callStack.crend(); ++it) { printer.OpenElement("location", false); printer.PushAttribute("file", it->getfile().c_str()); @@ -657,6 +656,7 @@ findAndReplace(result, "{severity}", severityToString(severity)); findAndReplace(result, "{cwe}", std::to_string(cwe.id)); findAndReplace(result, "{message}", verbose ? mVerboseMessage : mShortMessage); + findAndReplace(result, "{remark}", remark); if (!callStack.empty()) { if (result.find("{callstack}") != std::string::npos) findAndReplace(result, "{callstack}", ErrorLogger::callStackToString(callStack)); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cppcheck-2.14.1/lib/errorlogger.h new/cppcheck-2.14.2/lib/errorlogger.h --- old/cppcheck-2.14.1/lib/errorlogger.h 2024-05-26 17:58:01.000000000 +0200 +++ new/cppcheck-2.14.2/lib/errorlogger.h 2024-06-17 12:10:21.000000000 +0200 @@ -171,6 +171,9 @@ CWE cwe; Certainty certainty; + /** remark from REMARK comment */ + std::string remark; + /** Warning hash */ std::size_t hash; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cppcheck-2.14.1/lib/preprocessor.cpp new/cppcheck-2.14.2/lib/preprocessor.cpp --- old/cppcheck-2.14.1/lib/preprocessor.cpp 2024-05-26 17:58:01.000000000 +0200 +++ new/cppcheck-2.14.2/lib/preprocessor.cpp 2024-06-17 12:10:21.000000000 +0200 @@ -167,6 +167,19 @@ return true; } +static std::string getRelativeFilename(const simplecpp::Token* tok, const Settings &settings) { + std::string relativeFilename(tok->location.file()); + if (settings.relativePaths) { + for (const std::string & basePath : settings.basePaths) { + const std::string bp = basePath + "/"; + if (relativeFilename.compare(0,bp.size(),bp)==0) { + relativeFilename = relativeFilename.substr(bp.size()); + } + } + } + return Path::simplifyPath(relativeFilename); +} + static void addInlineSuppressions(const simplecpp::TokenList &tokens, const Settings &settings, SuppressionList &suppressions, std::list<BadInlineSuppression> &bad) { std::list<SuppressionList::Suppression> inlineSuppressionsBlockBegin; @@ -207,16 +220,7 @@ continue; // Relative filename - std::string relativeFilename(tok->location.file()); - if (settings.relativePaths) { - for (const std::string & basePath : settings.basePaths) { - const std::string bp = basePath + "/"; - if (relativeFilename.compare(0,bp.size(),bp)==0) { - relativeFilename = relativeFilename.substr(bp.size()); - } - } - } - relativeFilename = Path::simplifyPath(relativeFilename); + const std::string relativeFilename = getRelativeFilename(tok, settings); // Macro name std::string macroName; @@ -309,6 +313,17 @@ } } +std::vector<RemarkComment> Preprocessor::getRemarkComments(const simplecpp::TokenList &tokens) const +{ + std::vector<RemarkComment> ret; + addRemarkComments(tokens, ret); + for (std::map<std::string,simplecpp::TokenList*>::const_iterator it = mTokenLists.cbegin(); it != mTokenLists.cend(); ++it) { + if (it->second) + addRemarkComments(*it->second, ret); + } + return ret; +} + std::list<Directive> Preprocessor::createDirectives(const simplecpp::TokenList &tokens) const { // directive list.. @@ -1012,3 +1027,52 @@ tokenList->deleteToken(tok4->next); } } + + +void Preprocessor::addRemarkComments(const simplecpp::TokenList &tokens, std::vector<RemarkComment> &remarkComments) const +{ + for (const simplecpp::Token *tok = tokens.cfront(); tok; tok = tok->next) { + if (!tok->comment) + continue; + + const std::string& comment = tok->str(); + + // is it a remark comment? + const std::string::size_type pos1 = comment.find_first_not_of("/* \t"); + if (pos1 == std::string::npos) + continue; + const std::string::size_type pos2 = comment.find_first_of(": \t", pos1); + if (pos2 != pos1 + 6 || comment.compare(pos1, 6, "REMARK") != 0) + continue; + const std::string::size_type pos3 = comment.find_first_not_of(": \t", pos2); + if (pos3 == std::string::npos) + continue; + if (comment.compare(0,2,"/*") == 0 && pos3 + 2 >= tok->str().size()) + continue; + + const std::string::size_type pos4 = (comment.compare(0,2,"/*") == 0) ? comment.size()-2 : comment.size(); + const std::string remarkText = comment.substr(pos3, pos4-pos3); + + // Get remarked token + const simplecpp::Token* remarkedToken = nullptr; + for (const simplecpp::Token* after = tok->next; after; after = after->next) { + if (after->comment) + continue; + remarkedToken = after; + break; + } + for (const simplecpp::Token* prev = tok->previous; prev; prev = prev->previous) { + if (prev->comment) + continue; + if (sameline(prev, tok)) + remarkedToken = prev; + break; + } + + // Relative filename + const std::string relativeFilename = getRelativeFilename(remarkedToken, mSettings); + + // Add the suppressions. + remarkComments.emplace_back(relativeFilename, remarkedToken->location.line, remarkText); + } +} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cppcheck-2.14.1/lib/preprocessor.h new/cppcheck-2.14.2/lib/preprocessor.h --- old/cppcheck-2.14.1/lib/preprocessor.h 2024-05-26 17:58:01.000000000 +0200 +++ new/cppcheck-2.14.2/lib/preprocessor.h 2024-06-17 12:10:21.000000000 +0200 @@ -60,6 +60,24 @@ Directive(std::string _file, const int _linenr, const std::string &_str); }; +class CPPCHECKLIB RemarkComment { +public: + RemarkComment(std::string file, unsigned int lineNumber, std::string str) + : file(std::move(file)) + , lineNumber(lineNumber) + , str(std::move(str)) + {} + + /** name of file */ + std::string file; + + /** line number for the code that the remark comment is about */ + unsigned int lineNumber; + + /** remark text */ + std::string str; +}; + /// @addtogroup Core /// @{ @@ -96,6 +114,8 @@ std::set<std::string> getConfigs(const simplecpp::TokenList &tokens) const; + std::vector<RemarkComment> getRemarkComments(const simplecpp::TokenList &tokens) const; + void handleErrors(const simplecpp::OutputList &outputList, bool throwError); bool loadFiles(const simplecpp::TokenList &rawtokens, std::vector<std::string> &files); @@ -138,6 +158,8 @@ static bool hasErrors(const simplecpp::OutputList &outputList); + void addRemarkComments(const simplecpp::TokenList &tokens, std::vector<RemarkComment> &remarkComments) const; + const Settings& mSettings; ErrorLogger &mErrorLogger; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cppcheck-2.14.1/lib/token.h new/cppcheck-2.14.2/lib/token.h --- old/cppcheck-2.14.1/lib/token.h 2024-05-26 17:58:01.000000000 +0200 +++ new/cppcheck-2.14.2/lib/token.h 2024-06-17 12:10:21.000000000 +0200 @@ -121,6 +121,15 @@ }; CppcheckAttributes* mCppcheckAttributes{}; + // alignas expressions + std::unique_ptr<std::vector<std::string>> mAttributeAlignas; + void addAttributeAlignas(const std::string& a) { + if (!mAttributeAlignas) + mAttributeAlignas = std::unique_ptr<std::vector<std::string>>(new std::vector<std::string>()); + if (std::find(mAttributeAlignas->cbegin(), mAttributeAlignas->cend(), a) == mAttributeAlignas->cend()) + mAttributeAlignas->push_back(a); + } + // For memoization, to speed up parsing of huge arrays #8897 enum class Cpp11init { UNKNOWN, CPP11INIT, NOINIT } mCpp11init = Cpp11init::UNKNOWN; @@ -533,6 +542,15 @@ void isAttributeMaybeUnused(const bool value) { setFlag(fIsAttributeMaybeUnused, value); } + std::vector<std::string> getAttributeAlignas() const { + return mImpl->mAttributeAlignas ? *mImpl->mAttributeAlignas : std::vector<std::string>(); + } + bool hasAttributeAlignas() const { + return !!mImpl->mAttributeAlignas; + } + void addAttributeAlignas(const std::string& a) { + mImpl->addAttributeAlignas(a); + } void setCppcheckAttribute(TokenImpl::CppcheckAttributes::Type type, MathLib::bigint value) { mImpl->setCppcheckAttribute(type, value); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cppcheck-2.14.1/lib/tokenize.cpp new/cppcheck-2.14.2/lib/tokenize.cpp --- old/cppcheck-2.14.1/lib/tokenize.cpp 2024-05-26 17:58:01.000000000 +0200 +++ new/cppcheck-2.14.2/lib/tokenize.cpp 2024-06-17 12:10:21.000000000 +0200 @@ -6026,6 +6026,13 @@ outs += " isAttributeMaybeUnused=\"true\""; if (tok->isAttributeUnused()) outs += " isAttributeUnused=\"true\""; + if (tok->hasAttributeAlignas()) { + const std::vector<std::string>& a = tok->getAttributeAlignas(); + outs += " alignas=\"" + ErrorLogger::toxml(a[0]) + "\""; + if (a.size() > 1) + // we could write all alignas expressions but currently we only need 2 + outs += " alignas2=\"" + ErrorLogger::toxml(a[1]) + "\""; + } if (tok->link()) { outs += " link=\""; outs += id_string(tok->link()); @@ -9216,7 +9223,11 @@ void Tokenizer::simplifyCPPAttribute() { - if (!isCPP() || mSettings.standards.cpp < Standards::CPP11) + // According to cppreference alignas is a c21 feature however the macro is often available when compiling c11 + const bool hasAlignas = ((isCPP() && mSettings.standards.cpp >= Standards::CPP11) || (isC() && mSettings.standards.c >= Standards::C11)); + const bool hasCppAttribute = (isCPP() && mSettings.standards.cpp >= Standards::CPP11); + + if (!hasAlignas && !hasCppAttribute) return; for (Token *tok = list.front(); tok;) { @@ -9225,6 +9236,10 @@ continue; } if (isCPPAttribute(tok)) { + if (!hasCppAttribute) { + tok = skipCPPOrAlignAttribute(tok)->next(); + continue; + } if (Token::findsimplematch(tok->tokAt(2), "noreturn", tok->link())) { Token * head = skipCPPOrAlignAttribute(tok)->next(); while (isCPPAttribute(head) || isAlignAttribute(head)) @@ -9276,8 +9291,29 @@ } } } else { - if (Token::simpleMatch(tok, "alignas (")) { - // alignment requirements could be checked here + // alignas(expr) + + if (!hasAlignas) { + tok = skipCPPOrAlignAttribute(tok)->next(); + continue; + } + + // alignment requirements could be checked here + + Token* atok = nullptr; + if (Token::Match(tok->previous(), "%name%")) + atok = tok->previous(); + else { + atok = tok; + while (isCPPAttribute(atok) || isAlignAttribute(atok)) + atok = skipCPPOrAlignAttribute(atok)->next(); + } + if (atok) { + std::string a; + for (const Token* t = tok->tokAt(2); t && t->str() != ")"; t = t->next()) + a += " " + t->str(); + if (a.size() > 1) + atok->addAttributeAlignas(a.substr(1)); } } Token::eraseTokens(tok, skipCPPOrAlignAttribute(tok)->next()); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cppcheck-2.14.1/lib/version.h new/cppcheck-2.14.2/lib/version.h --- old/cppcheck-2.14.1/lib/version.h 2024-05-26 17:58:01.000000000 +0200 +++ new/cppcheck-2.14.2/lib/version.h 2024-06-17 12:10:21.000000000 +0200 @@ -7,7 +7,7 @@ #define CPPCHECK_MAJOR_VERSION 2 #define CPPCHECK_MINOR_VERSION 14 #define CPPCHECK_DEVMINOR_VERSION 14 -#define CPPCHECK_BUGFIX_VERSION 1 +#define CPPCHECK_BUGFIX_VERSION 2 #define STRINGIFY(x) STRING(x) #define STRING(VER) #VER diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cppcheck-2.14.1/man/manual.md new/cppcheck-2.14.2/man/manual.md --- old/cppcheck-2.14.1/man/manual.md 2024-05-26 17:58:01.000000000 +0200 +++ new/cppcheck-2.14.2/man/manual.md 2024-06-17 12:10:21.000000000 +0200 @@ -702,6 +702,10 @@ CWE ID for the problem; note that this attribute is only used when the CWE ID for the message is known +**remark** + +Optional attribute. The related remark/justification from a remark comment. + ## The `<location>` element All locations related to an error are listed with `<location>` elements. The primary location is listed first. @@ -848,6 +852,10 @@ Warning id +**{remark}** + +The remark text if a remark comment has been provided + **{code}** The real code @@ -900,6 +908,35 @@ Carriage return +# Justifications for warnings in the report + +You can add remark comments in the source code that justify why there is a warning/violation. + +Such a remark comment shall: + * start with REMARK. + * can either be added above the source code that generates the warning, or after the code on the same line. + +Example code: + + void foo(void) { + // REMARK Initialize x with 0 + int x = 0; + } + +In Cppcheck text output the remarks are not shown by default, you can use `--template` option `{remark}` to show remarks: + + $ ./cppcheck --enable=style --template="{file}:{line}: {message} [{id}]\\n{remark}" test1.c + Checking test1.c ... + test1.c:4: Variable 'x' is assigned a value that is never used. [unreadVariable] + Initialize x with 0 + +In xml output the comment text is provided in a "remark" attribute: + + $ ./cppcheck --enable=style --xml test1.c + .... + remark="Initialize x with 0" + .... + # Addons Addons are scripts that analyse Cppcheck dump files to check compatibility with secure coding standards and to locate issues. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cppcheck-2.14.1/releasenotes.txt new/cppcheck-2.14.2/releasenotes.txt --- old/cppcheck-2.14.1/releasenotes.txt 2024-05-26 17:58:01.000000000 +0200 +++ new/cppcheck-2.14.2/releasenotes.txt 2024-06-17 12:10:21.000000000 +0200 @@ -1,34 +1,4 @@ -Release Notes for Cppcheck 2.14 - -Summary: -- Fixed 23 "crash" tickets -- Fixed 69 "false positive" tickets -- Fixed 36 "improve check" tickets - -New checks: -- eraseIteratorOutOfBounds: warns when erase() is called on an iterator that is out of bounds -- returnByReference: warns when a large class member is returned by value from a getter function - -GUI: --Make it possible to suppress warnings in all files in a folder - -Changed interface: -- Fixed crash with '--rule-file=' if some data was missing. -- '--rule-file' will now bail out if a rule could not be added or a file contains unexpected data. -- Add option '--check-version', you can use it to pin the cppcheck version in a script. -- Added '--template=simple'. It is expands to '{file}:{line}:{column}: {severity}:{inconclusive:inconclusive:} {message} [{id}]' without any additional location details. -- Removed deprecated platform type 'Unspecified'. Please use 'unspecified' instead. -- Add --file-filter=- option that reads file filters from stdin. Added for a plugin. +Release Notes for Cppcheck 2.14.2 Other: -- Added CMake option 'EXTERNALS_AS_SYSTEM' to treat external includes as 'SYSTEM' ones. -- The minimum required compiler versions have been bumped to GCC 5.1 / Clang 3.5 / Visual Studio 2015 -- The minimum required CMake version has been bumped to 3.5 -- Using Visual Studio with CMake now checks if the CMake version is at least 3.13. This was always required but was not checked explicitly. -- Removed deprecated 'Makefile' option 'SRCDIR'. -- Added CMake option 'DISALLOW_THREAD_EXECUTOR' to control the inclusion of the executor which performs the analysis within a thread of the main process. -- Removed CMake option 'USE_THREADS' in favor of 'DISALLOW_THREAD_EXECUTOR'. -- misra-config will not be treated as a critical error anymore - -Safety critical: -- #12440 : Misra violations found but cppcheck exited with 0 even after specifying exit code +- Add "remark comments" that can be used to generate reports with justifications for warnings diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cppcheck-2.14.1/test/helpers.cpp new/cppcheck-2.14.2/test/helpers.cpp --- old/cppcheck-2.14.1/test/helpers.cpp 2024-05-26 17:58:01.000000000 +0200 +++ new/cppcheck-2.14.2/test/helpers.cpp 2024-06-17 12:10:21.000000000 +0200 @@ -181,3 +181,15 @@ std::list<Directive> directives = preprocessor.createDirectives(tokens1); tokenizer.setDirectives(std::move(directives)); } + +std::vector<RemarkComment> PreprocessorHelper::getRemarkComments(const char code[], ErrorLogger& errorLogger) +{ + std::vector<std::string> files{"test.cpp"}; + std::istringstream istr(code); + const simplecpp::TokenList tokens1(istr, files, files[0]); + + const Settings settings; + + const Preprocessor preprocessor(settings, errorLogger); + return preprocessor.getRemarkComments(tokens1); +} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cppcheck-2.14.1/test/helpers.h new/cppcheck-2.14.2/test/helpers.h --- old/cppcheck-2.14.1/test/helpers.h 2024-05-26 17:58:01.000000000 +0200 +++ new/cppcheck-2.14.2/test/helpers.h 2024-06-17 12:10:21.000000000 +0200 @@ -20,6 +20,7 @@ #define helpersH #include "config.h" +#include "preprocessor.h" #include "settings.h" #include "standards.h" #include "tokenize.h" @@ -156,6 +157,9 @@ static void preprocess(const char code[], std::vector<std::string> &files, Tokenizer& tokenizer, ErrorLogger& errorlogger); static void preprocess(const char code[], std::vector<std::string> &files, Tokenizer& tokenizer, ErrorLogger& errorlogger, const simplecpp::DUI& dui); + /** get remark comments */ + static std::vector<RemarkComment> getRemarkComments(const char code[], ErrorLogger& errorLogger); + private: static std::map<std::string, std::string> getcode(const Settings& settings, ErrorLogger& errorlogger, const char code[], std::set<std::string> cfgs, const std::string &filename = "file.c", SuppressionList *inlineSuppression = nullptr); }; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cppcheck-2.14.1/test/testerrorlogger.cpp new/cppcheck-2.14.2/test/testerrorlogger.cpp --- old/cppcheck-2.14.1/test/testerrorlogger.cpp 2024-05-26 17:58:01.000000000 +0200 +++ new/cppcheck-2.14.2/test/testerrorlogger.cpp 2024-06-17 12:10:21.000000000 +0200 @@ -50,6 +50,7 @@ TEST_CASE(CustomFormat2); TEST_CASE(CustomFormatLocations); TEST_CASE(ToXmlV2); + TEST_CASE(ToXmlV2RemarkComment); TEST_CASE(ToXmlV2Locations); TEST_CASE(ToXmlV2Encoding); TEST_CASE(FromXmlV2); @@ -62,6 +63,7 @@ TEST_CASE(DeserializeInvalidInput); TEST_CASE(SerializeSanitize); TEST_CASE(SerializeFileLocation); + TEST_CASE(SerializeAndDeserializeRemark); TEST_CASE(substituteTemplateFormatStatic); TEST_CASE(substituteTemplateLocationStatic); @@ -237,6 +239,12 @@ ASSERT_EQUALS(message, msg.toXML()); } + void ToXmlV2RemarkComment() const { + ErrorMessage msg({}, emptyString, Severity::warning, "", "id", Certainty::normal); + msg.remark = "remark"; + ASSERT_EQUALS(" <error id=\"id\" severity=\"warning\" msg=\"\" verbose=\"\" remark=\"remark\"/>", msg.toXML()); + } + void ToXmlV2Locations() const { std::list<ErrorMessage::FileLocation> locs = { fooCpp5, barCpp8_i }; ErrorMessage msg(std::move(locs), emptyString, Severity::error, "Programming error.\nVerbose error", "errorId", Certainty::normal); @@ -329,8 +337,9 @@ "5 error" "1 0" "1 0" + "0 " "8 test.cpp" - "12 inconclusive" + "1 1" "17 Programming error" "17 Programming error" "0 ", msg_str); @@ -373,6 +382,7 @@ "5 error" "7 invalid" // cwe "1 0" + "0 " "8 test.cpp" "17 Programming error" "17 Programming error" @@ -386,6 +396,8 @@ "5 error" "1 0" "7 invalid" // hash + "1 0" + "0 " "8 test.cpp" "17 Programming error" "17 Programming error" @@ -399,6 +411,8 @@ "5 error" "5 65536" // max +1 "1 0" + "1 0" + "0 " "8 test.cpp" "17 Programming error" "17 Programming error" @@ -418,7 +432,9 @@ "5 error" "1 0" "1 0" + "0 " "3 1.c" + "1 0" "33 Illegal character in \"foo\\001bar\"" "33 Illegal character in \"foo\\001bar\"" "0 ", msg_str); @@ -444,7 +460,8 @@ "1 0" "1 0" "0 " - "12 inconclusive" + "0 " + "1 1" "17 Programming error" "17 Programming error" "1 " @@ -459,6 +476,14 @@ ASSERT_EQUALS("abcd:/,", msg2.callStack.front().getinfo()); } + void SerializeAndDeserializeRemark() const { + ErrorMessage msg({}, emptyString, Severity::warning, emptyString, "id", Certainty::normal); + msg.remark = "some remark"; + ErrorMessage msg2; + ASSERT_NO_THROW(msg2.deserialize(msg.serialize())); + ASSERT_EQUALS("some remark", msg2.remark); + } + void substituteTemplateFormatStatic() const { { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cppcheck-2.14.1/test/testpreprocessor.cpp new/cppcheck-2.14.2/test/testpreprocessor.cpp --- old/cppcheck-2.14.1/test/testpreprocessor.cpp 2024-05-26 17:58:01.000000000 +0200 +++ new/cppcheck-2.14.2/test/testpreprocessor.cpp 2024-06-17 12:10:21.000000000 +0200 @@ -199,6 +199,11 @@ // inline suppression, missingInclude/missingIncludeSystem TEST_CASE(inline_suppressions); + // remark comment + TEST_CASE(remarkComment1); + TEST_CASE(remarkComment2); + TEST_CASE(remarkComment3); + // Using -D to predefine symbols TEST_CASE(predefine1); TEST_CASE(predefine2); @@ -1903,6 +1908,32 @@ ignore_errout(); // we are not interested in the output } + void remarkComment1() { + const char code[] = "// REMARK: assignment with 1\n" + "x=1;\n"; + const auto remarkComments = PreprocessorHelper::getRemarkComments(code, *this); + ASSERT_EQUALS(1, remarkComments.size()); + ASSERT_EQUALS(2, remarkComments[0].lineNumber); + ASSERT_EQUALS("assignment with 1", remarkComments[0].str); + } + + void remarkComment2() { + const char code[] = "x=1; ///REMARK assignment with 1\n"; + const auto remarkComments = PreprocessorHelper::getRemarkComments(code, *this); + ASSERT_EQUALS(1, remarkComments.size()); + ASSERT_EQUALS(1, remarkComments[0].lineNumber); + ASSERT_EQUALS("assignment with 1", remarkComments[0].str); + } + + void remarkComment3() { + const char code[] = "/** REMARK: assignment with 1 */\n" + "x=1;\n"; + const auto remarkComments = PreprocessorHelper::getRemarkComments(code, *this); + ASSERT_EQUALS(1, remarkComments.size()); + ASSERT_EQUALS(2, remarkComments[0].lineNumber); + ASSERT_EQUALS("assignment with 1 ", remarkComments[0].str); + } + void predefine1() { const std::string src("#if defined X || Y\n" "Fred & Wilma\n" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cppcheck-2.14.1/test/testsymboldatabase.cpp new/cppcheck-2.14.2/test/testsymboldatabase.cpp --- old/cppcheck-2.14.1/test/testsymboldatabase.cpp 2024-05-26 17:58:01.000000000 +0200 +++ new/cppcheck-2.14.2/test/testsymboldatabase.cpp 2024-06-17 12:10:21.000000000 +0200 @@ -1715,7 +1715,7 @@ ASSERT(db); ASSERT_EQUALS(2, db->scopeList.front().varlist.size()); const Variable *x1 = Token::findsimplematch(tokenizer.tokens(), "x")->variable(); - ASSERT(x1 && Token::simpleMatch(x1->typeStartToken(), "alignas ( 16 ) int x ;")); + ASSERT(x1 && Token::simpleMatch(x1->typeStartToken(), "int x ;")); } void memberVar1() { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cppcheck-2.14.1/test/testtokenize.cpp new/cppcheck-2.14.2/test/testtokenize.cpp --- old/cppcheck-2.14.1/test/testtokenize.cpp 2024-05-26 17:58:01.000000000 +0200 +++ new/cppcheck-2.14.2/test/testtokenize.cpp 2024-06-17 12:10:21.000000000 +0200 @@ -438,6 +438,8 @@ TEST_CASE(removeAlignas1); TEST_CASE(removeAlignas2); // Do not remove alignof in the same way + TEST_CASE(removeAlignas3); // remove alignas in C11 code + TEST_CASE(dumpAlignas); TEST_CASE(simplifyCoroutines); @@ -7764,6 +7766,27 @@ ASSERT_EQUALS(expected, tokenizeAndStringify(code)); } + void removeAlignas3() { + const char code[] = "alignas(16) int x;"; + const char expected[] = "int x ;"; + // According to cppreference alignas() is a C23 macro; but it is often available when compiling C11. + // Misra C has C11 examples with alignas. + // Microsoft provides alignas in C11. + ASSERT_EQUALS(expected, tokenizeAndStringify(code, true, Platform::Type::Native, false, Standards::CPP11)); + ASSERT_EQUALS(expected, tokenizeAndStringify(code, true, Platform::Type::Native, true, Standards::CPP11)); + } + + void dumpAlignas() { + Settings settings; + SimpleTokenizer tokenizer(settings, *this); + tokenizer.tokenize("int alignas(8) alignas(16) x;", false); + ASSERT(Token::simpleMatch(tokenizer.tokens(), "int x ;")); + std::ostringstream ostr; + tokenizer.dump(ostr); + const std::string dump = ostr.str(); + ASSERT(dump.find(" alignas=\"8\" alignas2=\"16\"") != std::string::npos); + } + void simplifyCoroutines() { const Settings settings = settingsBuilder().cpp(Standards::CPP20).build(); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cppcheck-2.14.1/win_installer/productInfo.wxi new/cppcheck-2.14.2/win_installer/productInfo.wxi --- old/cppcheck-2.14.1/win_installer/productInfo.wxi 2024-05-26 17:58:01.000000000 +0200 +++ new/cppcheck-2.14.2/win_installer/productInfo.wxi 2024-06-17 12:10:21.000000000 +0200 @@ -1,8 +1,8 @@ <?xml version="1.0" encoding="utf-8"?> <Include> - <?define ProductName = "Cppcheck $(var.Platform) 2.14.1" ?> + <?define ProductName = "Cppcheck $(var.Platform) 2.14.2" ?> <?define ProductNameShort = "Cppcheck" ?> - <?define ProductVersion = "2.14.1" ?> + <?define ProductVersion = "2.14.2" ?> <?define ProductManufacturer = "The Cppcheck team" ?> <?define ProductDescription = "Cppcheck is a tool for static analysis of C/C++ code" ?>
participants (1)
-
Source-Sync