From 1324a808b57b69374b7f3cd02a3ad589d4f2fb01 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Marjam=C3=A4ki?= Date: Fri, 22 Dec 2023 19:57:55 +0100 Subject: [PATCH 01/29] CI: fix --version tests (#5790) --- test/testcmdlineparser.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/testcmdlineparser.cpp b/test/testcmdlineparser.cpp index ba1c624feee..2cb87695e0f 100644 --- a/test/testcmdlineparser.cpp +++ b/test/testcmdlineparser.cpp @@ -410,7 +410,7 @@ class TestCmdlineParser : public TestFixture { REDIRECT; const char * const argv[] = {"cppcheck", "--version"}; ASSERT_EQUALS(CmdLineParser::Result::Exit, parser->parseFromArgs(2, argv)); - ASSERT_EQUALS("Cppcheck 2.13 dev\n", logger->str()); + ASSERT(logger->str().compare(0, 11, "Cppcheck 2.") == 0); } void versionWithCfg() { @@ -431,7 +431,7 @@ class TestCmdlineParser : public TestFixture { REDIRECT; const char * const argv[] = {"cppcheck", "--library=missing", "--version"}; ASSERT_EQUALS(CmdLineParser::Result::Exit, parser->parseFromArgs(3, argv)); - ASSERT_EQUALS("Cppcheck 2.13 dev\n", logger->str()); + ASSERT(logger->str().compare(0, 11, "Cppcheck 2.") == 0); } void versionWithInvalidCfg() { From c23521adda441d587a6e422b04f8dd1a6e44e6b7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Marjam=C3=A4ki?= Date: Fri, 22 Dec 2023 21:59:40 +0100 Subject: [PATCH 02/29] set version 2.13.0 (#5788) --- cli/main.cpp | 2 +- cmake/versions.cmake | 2 +- lib/version.h | 2 +- man/manual.md | 2 +- man/reference-cfg-format.md | 2 +- man/writing-addons.md | 2 +- win_installer/productInfo.wxi | 4 ++-- 7 files changed, 8 insertions(+), 8 deletions(-) diff --git a/cli/main.cpp b/cli/main.cpp index 7e076dfbcea..23aad4e85ce 100644 --- a/cli/main.cpp +++ b/cli/main.cpp @@ -20,7 +20,7 @@ /** * * @mainpage Cppcheck - * @version 2.12.99 + * @version 2.13.0 * * @section overview_sec Overview * Cppcheck is a simple tool for static analysis of C/C++ code. diff --git a/cmake/versions.cmake b/cmake/versions.cmake index cf2020d3fea..dfeb5d144d0 100644 --- a/cmake/versions.cmake +++ b/cmake/versions.cmake @@ -1,6 +1,6 @@ # Version for libraries CPP # Version string must have 3 "parts". https://sourceforge.net/p/cppcheck/discussion/development/thread/e57efb2b62/ -SET(VERSION "2.12.99") +SET(VERSION "2.13.0") STRING(REGEX MATCHALL "[0-9]+" VERSION_PARTS "${VERSION}") LIST(GET VERSION_PARTS 0 VERSION_MAJOR) LIST(GET VERSION_PARTS 1 VERSION_MINOR) diff --git a/lib/version.h b/lib/version.h index 85bb170338f..38f9406c0a6 100644 --- a/lib/version.h +++ b/lib/version.h @@ -5,7 +5,7 @@ #define versionH #define CPPCHECK_MAJOR_VERSION 2 -#define CPPCHECK_MINOR_VERSION 12 +#define CPPCHECK_MINOR_VERSION 13 #define CPPCHECK_DEVMINOR_VERSION 13 #define CPPCHECK_FIX_VERSION 0 diff --git a/man/manual.md b/man/manual.md index 819760925a7..3767f9a736e 100644 --- a/man/manual.md +++ b/man/manual.md @@ -1,6 +1,6 @@ --- title: Cppcheck manual -subtitle: Version 2.12.99 +subtitle: Version 2.13 author: Cppcheck team lang: en documentclass: report diff --git a/man/reference-cfg-format.md b/man/reference-cfg-format.md index 70ff8b95918..a330f003e51 100644 --- a/man/reference-cfg-format.md +++ b/man/reference-cfg-format.md @@ -1,6 +1,6 @@ --- title: Cppcheck .cfg format -subtitle: Version 2.12.99 +subtitle: Version 2.13 author: Cppcheck team lang: en documentclass: report diff --git a/man/writing-addons.md b/man/writing-addons.md index 63b5a2ca0d5..3016a4cb5c8 100644 --- a/man/writing-addons.md +++ b/man/writing-addons.md @@ -1,6 +1,6 @@ --- title: Writing addons -subtitle: Version 2.12.99 +subtitle: Version 2.13 author: Cppcheck team lang: en documentclass: report diff --git a/win_installer/productInfo.wxi b/win_installer/productInfo.wxi index 1147bf2e514..918f7dc3507 100644 --- a/win_installer/productInfo.wxi +++ b/win_installer/productInfo.wxi @@ -1,8 +1,8 @@ - + - + From fef1ede35adf67f7e70004849ea397c365d8b174 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Marjam=C3=A4ki?= Date: Fri, 22 Dec 2023 22:39:09 +0100 Subject: [PATCH 03/29] releasenotes: cleanup, list safety critical issues [ci skip] (#5791) --- releasenotes.txt | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/releasenotes.txt b/releasenotes.txt index 593f61498c8..e8c4cedd404 100644 --- a/releasenotes.txt +++ b/releasenotes.txt @@ -5,12 +5,6 @@ New checks: - returnImplicitInt for C functions without return type (previously reported as a debug message) - iterateByValue for iterating by value in a range-based for loop when a const reference could be used -Improved checking: -- - -GUI: -- - Changed interface: - Final report of active checkers is reported as a normal information message instead. @@ -44,3 +38,8 @@ Other: - Markup files will now be processed after the regular source files when using multiple threads/processes (some issues remain - see Trac #12167 for details). - Added file name to ValueFlow "--debug" output. - Fixed build when using "clang-cl" in CMake. + +Safety critical: +- #10866 unsafe handling of unconditional #error +- #12071 unsafe suppressions of critical errors +- #12079 missing "misra-config" warning, calling unknown function in condition From c05a3903704f81b4d1ab9dbff7503804d9288929 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Marjam=C3=A4ki?= Date: Fri, 22 Dec 2023 23:21:02 +0100 Subject: [PATCH 04/29] dmake: in run-dmake target run dmake with --release in a release Makefile (#5792) --- tools/dmake.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/dmake.cpp b/tools/dmake.cpp index 1ca4262c0e5..eee4b458ba3 100644 --- a/tools/dmake.cpp +++ b/tools/dmake.cpp @@ -674,7 +674,7 @@ int main(int argc, char **argv) fout << "dmake:\ttools/dmake.o cli/filelister.o $(libcppdir)/pathmatch.o $(libcppdir)/path.o $(libcppdir)/utils.o externals/simplecpp/simplecpp.o\n"; fout << "\t$(CXX) $(CXXFLAGS) -o $@ $^ $(LDFLAGS)\n\n"; fout << "run-dmake: dmake\n"; - fout << "\t./dmake\n\n"; + fout << "\t./dmake" << (release ? " --release" : "") << "\n\n"; // Make CI in release builds happy fout << "clean:\n"; fout << "\trm -f build/*.cpp build/*.o lib/*.o cli/*.o test/*.o tools/*.o externals/*/*.o testrunner dmake cppcheck cppcheck.exe cppcheck.1\n\n"; fout << "man:\tman/cppcheck.1\n\n"; From da29903ffcbde465b6c2b47e8dc38277743f47ec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Marjam=C3=A4ki?= Date: Fri, 22 Dec 2023 23:22:29 +0100 Subject: [PATCH 05/29] Makefile: run 'dmake --release' --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 92608b760a0..a73ade8692a 100644 --- a/Makefile +++ b/Makefile @@ -137,7 +137,7 @@ ifeq (clang++, $(findstring clang++,$(CXX))) CPPCHK_GLIBCXX_DEBUG= endif ifndef CXXFLAGS - CXXFLAGS=-pedantic -Wall -Wextra -Wcast-qual -Wfloat-equal -Wmissing-declarations -Wmissing-format-attribute -Wno-long-long -Wpacked -Wredundant-decls -Wundef -Wno-shadow -Wno-missing-field-initializers -Wno-missing-braces -Wno-sign-compare -Wno-multichar -Woverloaded-virtual $(CPPCHK_GLIBCXX_DEBUG) -g + CXXFLAGS=-std=c++0x -O2 -DNDEBUG -Wall -Wno-sign-compare -Wno-multichar endif ifeq (g++, $(findstring g++,$(CXX))) @@ -365,7 +365,7 @@ dmake: tools/dmake.o cli/filelister.o $(libcppdir)/pathmatch.o $(libcppdir)/path $(CXX) $(CXXFLAGS) -o $@ $^ $(LDFLAGS) run-dmake: dmake - ./dmake + ./dmake --release clean: rm -f build/*.cpp build/*.o lib/*.o cli/*.o test/*.o tools/*.o externals/*/*.o testrunner dmake cppcheck cppcheck.exe cppcheck.1 From 68f5963a68059c93f346457c183b82056b465a05 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Marjam=C3=A4ki?= Date: Fri, 12 Jan 2024 11:30:51 +0100 Subject: [PATCH 06/29] Fix #12341 (If --premium=safety is used then go to "safety mode". do not override this in cppcheck.cfg) (#5872) --- cli/cmdlineparser.cpp | 2 ++ lib/settings.cpp | 2 +- test/testcmdlineparser.cpp | 12 ++++++++++++ test/testsettings.cpp | 29 +++++++++++++++++++++++++++++ 4 files changed, 44 insertions(+), 1 deletion(-) diff --git a/cli/cmdlineparser.cpp b/cli/cmdlineparser.cpp index 82ef08a4179..a870c571726 100644 --- a/cli/cmdlineparser.cpp +++ b/cli/cmdlineparser.cpp @@ -889,6 +889,8 @@ CmdLineParser::Result CmdLineParser::parseFromArgs(int argc, const char* const a // Special Cppcheck Premium options else if (std::strncmp(argv[i], "--premium=", 10) == 0 && isCppcheckPremium()) { + if (std::strcmp(argv[i], "--premium=safety") == 0) + mSettings.safety = true; if (!mSettings.premiumArgs.empty()) mSettings.premiumArgs += " "; const std::string p(argv[i] + 10); diff --git a/lib/settings.cpp b/lib/settings.cpp index a58e75b2c21..393ce377732 100644 --- a/lib/settings.cpp +++ b/lib/settings.cpp @@ -125,7 +125,7 @@ std::string Settings::loadCppcheckCfg() const auto& v = it->second; if (!v.is()) return "'safety' is not a bool"; - safety = v.get(); + safety = safety || v.get(); } } diff --git a/test/testcmdlineparser.cpp b/test/testcmdlineparser.cpp index 2cb87695e0f..22bea9219bc 100644 --- a/test/testcmdlineparser.cpp +++ b/test/testcmdlineparser.cpp @@ -212,6 +212,7 @@ class TestCmdlineParser : public TestFixture { TEST_CASE(maxConfigsMissingCount); TEST_CASE(maxConfigsInvalid); TEST_CASE(maxConfigsTooSmall); + TEST_CASE(premiumSafety); TEST_CASE(reportProgress1); TEST_CASE(reportProgress2); TEST_CASE(reportProgress3); @@ -1185,6 +1186,17 @@ class TestCmdlineParser : public TestFixture { ASSERT_EQUALS("cppcheck: error: argument to '--max-configs=' must be greater than 0.\n", logger->str()); } + void premiumSafety() { + REDIRECT; + const char * const argv[] = {"cppcheck", "--premium=safety", "file.cpp"}; + settings->safety = false; + settings->cppcheckCfgProductName = "Cppcheck Premium 0.0.0"; + ASSERT_EQUALS(CmdLineParser::Result::Success, parser->parseFromArgs(3, argv)); + ASSERT_EQUALS(true, settings->safety); + settings->safety = false; + settings->cppcheckCfgProductName.clear(); + } + void reportProgress1() { REDIRECT; const char * const argv[] = {"cppcheck", "--report-progress", "file.cpp"}; diff --git a/test/testsettings.cpp b/test/testsettings.cpp index f09dfed1aa4..6c2b2de2d7c 100644 --- a/test/testsettings.cpp +++ b/test/testsettings.cpp @@ -30,6 +30,7 @@ class TestSettings : public TestFixture { void run() override { TEST_CASE(simpleEnableGroup); TEST_CASE(loadCppcheckCfg); + TEST_CASE(loadCppcheckCfgSafety); } void simpleEnableGroup() const { @@ -209,6 +210,34 @@ class TestSettings : public TestFixture { // TODO: test with FILESDIR } + + void loadCppcheckCfgSafety() const + { + // Test the "safety" flag + { + Settings s; + s.safety = false; + ScopedFile file("cppcheck.cfg", "{}"); + ASSERT_EQUALS("", s.loadCppcheckCfg()); + ASSERT_EQUALS(false, s.safety); + } + + { + Settings s; + s.safety = true; + ScopedFile file("cppcheck.cfg", "{\"safety\": false}"); + ASSERT_EQUALS("", s.loadCppcheckCfg()); + ASSERT_EQUALS(true, s.safety); + } + + { + Settings s; + s.safety = false; + ScopedFile file("cppcheck.cfg", "{\"safety\": true}"); + ASSERT_EQUALS("", s.loadCppcheckCfg()); + ASSERT_EQUALS(true, s.safety); + } + } }; REGISTER_TEST(TestSettings) From 36299b45306e52de646065bf9a22beb89e4a723b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Marjam=C3=A4ki?= Date: Fri, 12 Jan 2024 17:12:27 +0100 Subject: [PATCH 07/29] Fix #12344 (cmdline: better validation of premium options) (#5875) --- cli/cmdlineparser.cpp | 20 ++++++++++++++++++-- test/testcmdlineparser.cpp | 31 +++++++++++++++++++++++++++++++ 2 files changed, 49 insertions(+), 2 deletions(-) diff --git a/cli/cmdlineparser.cpp b/cli/cmdlineparser.cpp index a870c571726..6b6eac98329 100644 --- a/cli/cmdlineparser.cpp +++ b/cli/cmdlineparser.cpp @@ -889,11 +889,26 @@ CmdLineParser::Result CmdLineParser::parseFromArgs(int argc, const char* const a // Special Cppcheck Premium options else if (std::strncmp(argv[i], "--premium=", 10) == 0 && isCppcheckPremium()) { + const std::set valid{ + "autosar", + "cert-c-2016", + "cert-c++-2016", + "misra-c-2012", + "misra-c-2023", + "misra-c++-2008", + "misra-c++-2023", + "bughunting", + "safety"}; + if (std::strcmp(argv[i], "--premium=safety") == 0) mSettings.safety = true; if (!mSettings.premiumArgs.empty()) mSettings.premiumArgs += " "; const std::string p(argv[i] + 10); + if (!valid.count(p) && !startsWith(p, "cert-c-int-precision=")) { + mLogger.printError("invalid --premium option '" + p + "'."); + return Result::Fail; + } mSettings.premiumArgs += "--" + p; if (p == "misra-c-2012" || p == "misra-c-2023") mSettings.addons.emplace("misra"); @@ -1515,10 +1530,11 @@ void CmdLineParser::printHelp() const " * cert-c++-2016 Cert C++ 2016 checking\n" " * misra-c-2012 Misra C 2012\n" " * misra-c-2023 Misra C 2023\n" - " * misra-c++-2008 Misra C++ 2008 (partial)\n" + " * misra-c++-2008 Misra C++ 2008\n" " Other:\n" " * bughunting Soundy analysis\n" - " * cert-c-int-precision=BITS Integer precision to use in Cert C analysis.\n"; + " * cert-c-int-precision=BITS Integer precision to use in Cert C analysis.\n" + " * safety Safe mode\n"; } oss << diff --git a/test/testcmdlineparser.cpp b/test/testcmdlineparser.cpp index 22bea9219bc..678732b4f37 100644 --- a/test/testcmdlineparser.cpp +++ b/test/testcmdlineparser.cpp @@ -212,6 +212,7 @@ class TestCmdlineParser : public TestFixture { TEST_CASE(maxConfigsMissingCount); TEST_CASE(maxConfigsInvalid); TEST_CASE(maxConfigsTooSmall); + TEST_CASE(premiumOptions); TEST_CASE(premiumSafety); TEST_CASE(reportProgress1); TEST_CASE(reportProgress2); @@ -1186,6 +1187,36 @@ class TestCmdlineParser : public TestFixture { ASSERT_EQUALS("cppcheck: error: argument to '--max-configs=' must be greater than 0.\n", logger->str()); } + void premiumOptions() { + REDIRECT; + settings->cppcheckCfgProductName = "Cppcheck Premium 0.0.0"; + { + const char * const argv[] = {"cppcheck", "--premium=misra-c-2012", "file.c"}; + ASSERT_EQUALS(CmdLineParser::Result::Success, parser->parseFromArgs(3, argv)); + } + { + const char * const argv[] = {"cppcheck", "--premium=misra-c++-2023", "file.c"}; + ASSERT_EQUALS(CmdLineParser::Result::Success, parser->parseFromArgs(3, argv)); + } + { + const char * const argv[] = {"cppcheck", "--premium=cert-c++-2016", "file.c"}; + ASSERT_EQUALS(CmdLineParser::Result::Success, parser->parseFromArgs(3, argv)); + } + // invalid options + { + const char * const argv[] = {"cppcheck", "--premium=misra", "file.c"}; + ASSERT_EQUALS(CmdLineParser::Result::Fail, parser->parseFromArgs(3, argv)); + ASSERT_EQUALS("cppcheck: error: invalid --premium option 'misra'.\n", logger->str()); + } + { + const char * const argv[] = {"cppcheck", "--premium=cert", "file.c"}; + ASSERT_EQUALS(CmdLineParser::Result::Fail, parser->parseFromArgs(3, argv)); + ASSERT_EQUALS("cppcheck: error: invalid --premium option 'cert'.\n", logger->str()); + } + settings->cppcheckCfgProductName.clear(); + settings->premiumArgs.clear(); + } + void premiumSafety() { REDIRECT; const char * const argv[] = {"cppcheck", "--premium=safety", "file.cpp"}; From 17115d2f770d80563f5d2ea14845a650d4f150ec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Marjam=C3=A4ki?= Date: Fri, 12 Jan 2024 17:38:14 +0100 Subject: [PATCH 08/29] Fix #12342 (Show premium autosar/misra/cert style issues even if --enable is not used) (#5874) --- lib/cppcheck.cpp | 20 ++++++++++++++++++-- lib/cppcheck.h | 2 ++ test/testcppcheck.cpp | 26 ++++++++++++++++++++++++++ 3 files changed, 46 insertions(+), 2 deletions(-) diff --git a/lib/cppcheck.cpp b/lib/cppcheck.cpp index 9f912697db8..4b8807121f9 100644 --- a/lib/cppcheck.cpp +++ b/lib/cppcheck.cpp @@ -1465,8 +1465,12 @@ void CppCheck::executeAddons(const std::vector& files, const std::s continue; errmsg.severity = Severity::internal; } - else if (!mSettings.severity.isEnabled(errmsg.severity)) - continue; + else if (!mSettings.severity.isEnabled(errmsg.severity)) { + // Do not filter out premium misra/cert/autosar messages that has been + // explicitly enabled with a --premium option + if (!isPremiumCodingStandardId(errmsg.id)) + continue; + } errmsg.file0 = file0; reportErr(errmsg); @@ -1859,3 +1863,15 @@ void CppCheck::printTimerResults(SHOWTIME_MODES mode) { s_timerResults.showResults(mode); } + +bool CppCheck::isPremiumCodingStandardId(const std::string& id) const { + if (mSettings.premiumArgs.find("--misra") != std::string::npos) { + if (startsWith(id, "misra-") || startsWith(id, "premium-misra-")) + return true; + } + if (mSettings.premiumArgs.find("--cert") != std::string::npos && startsWith(id, "premium-cert-")) + return true; + if (mSettings.premiumArgs.find("--autosar") != std::string::npos && startsWith(id, "premium-autosar-")) + return true; + return false; +} diff --git a/lib/cppcheck.h b/lib/cppcheck.h index 8f31d5d75d9..f394330e29b 100644 --- a/lib/cppcheck.h +++ b/lib/cppcheck.h @@ -150,6 +150,8 @@ class CPPCHECKLIB CppCheck : ErrorLogger { static void resetTimerResults(); static void printTimerResults(SHOWTIME_MODES mode); + bool isPremiumCodingStandardId(const std::string& id) const; + private: #ifdef HAVE_RULES /** Are there "simple" rules */ diff --git a/test/testcppcheck.cpp b/test/testcppcheck.cpp index 1932397c460..48c93eebced 100644 --- a/test/testcppcheck.cpp +++ b/test/testcppcheck.cpp @@ -54,6 +54,7 @@ class TestCppcheck : public TestFixture { TEST_CASE(checkWithFS); TEST_CASE(suppress_error_library); TEST_CASE(unique_errors); + TEST_CASE(isPremiumCodingStandardId); } void getErrorMessages() const { @@ -179,6 +180,31 @@ class TestCppcheck : public TestFixture { ASSERT_EQUALS("nullPointer", it->id); } + void isPremiumCodingStandardId() const { + ErrorLogger2 errorLogger; + CppCheck cppcheck(errorLogger, false, {}); + + cppcheck.settings().premiumArgs = ""; + ASSERT_EQUALS(false, cppcheck.isPremiumCodingStandardId("misra-c2012-0.0")); + ASSERT_EQUALS(false, cppcheck.isPremiumCodingStandardId("misra-c2023-0.0")); + ASSERT_EQUALS(false, cppcheck.isPremiumCodingStandardId("premium-misra-c2012-0.0")); + ASSERT_EQUALS(false, cppcheck.isPremiumCodingStandardId("premium-misra-c2023-0.0")); + ASSERT_EQUALS(false, cppcheck.isPremiumCodingStandardId("premium-misra-c++2008-0.0.0")); + ASSERT_EQUALS(false, cppcheck.isPremiumCodingStandardId("premium-misra-c++2023-0.0.0")); + ASSERT_EQUALS(false, cppcheck.isPremiumCodingStandardId("premium-cert-int50-cpp")); + ASSERT_EQUALS(false, cppcheck.isPremiumCodingStandardId("premium-autosar-0-0-0")); + + cppcheck.settings().premiumArgs = "--misra-c-2012 --cert-c++-2016 --autosar"; + ASSERT_EQUALS(true, cppcheck.isPremiumCodingStandardId("misra-c2012-0.0")); + ASSERT_EQUALS(true, cppcheck.isPremiumCodingStandardId("misra-c2023-0.0")); + ASSERT_EQUALS(true, cppcheck.isPremiumCodingStandardId("premium-misra-c2012-0.0")); + ASSERT_EQUALS(true, cppcheck.isPremiumCodingStandardId("premium-misra-c2023-0.0")); + ASSERT_EQUALS(true, cppcheck.isPremiumCodingStandardId("premium-misra-c++2008-0.0.0")); + ASSERT_EQUALS(true, cppcheck.isPremiumCodingStandardId("premium-misra-c++2023-0.0.0")); + ASSERT_EQUALS(true, cppcheck.isPremiumCodingStandardId("premium-cert-int50-cpp")); + ASSERT_EQUALS(true, cppcheck.isPremiumCodingStandardId("premium-autosar-0-0-0")); + } + // TODO: test suppressions // TODO: test all with FS }; From a712e1ad5bcda3329232c3021001ea44f1b5999f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Marjam=C3=A4ki?= Date: Sat, 13 Jan 2024 15:21:29 +0100 Subject: [PATCH 09/29] Set version 2.13.1 --- cli/main.cpp | 2 +- cmake/versions.cmake | 2 +- lib/version.h | 2 +- win_installer/productInfo.wxi | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/cli/main.cpp b/cli/main.cpp index 23aad4e85ce..f2298262456 100644 --- a/cli/main.cpp +++ b/cli/main.cpp @@ -20,7 +20,7 @@ /** * * @mainpage Cppcheck - * @version 2.13.0 + * @version 2.13.1 * * @section overview_sec Overview * Cppcheck is a simple tool for static analysis of C/C++ code. diff --git a/cmake/versions.cmake b/cmake/versions.cmake index dfeb5d144d0..0e36a76a616 100644 --- a/cmake/versions.cmake +++ b/cmake/versions.cmake @@ -1,6 +1,6 @@ # Version for libraries CPP # Version string must have 3 "parts". https://sourceforge.net/p/cppcheck/discussion/development/thread/e57efb2b62/ -SET(VERSION "2.13.0") +SET(VERSION "2.13.1") STRING(REGEX MATCHALL "[0-9]+" VERSION_PARTS "${VERSION}") LIST(GET VERSION_PARTS 0 VERSION_MAJOR) LIST(GET VERSION_PARTS 1 VERSION_MINOR) diff --git a/lib/version.h b/lib/version.h index 38f9406c0a6..bee54eb3b15 100644 --- a/lib/version.h +++ b/lib/version.h @@ -7,7 +7,7 @@ #define CPPCHECK_MAJOR_VERSION 2 #define CPPCHECK_MINOR_VERSION 13 #define CPPCHECK_DEVMINOR_VERSION 13 -#define CPPCHECK_FIX_VERSION 0 +#define CPPCHECK_FIX_VERSION 1 #define STRINGIFY(x) STRING(x) #define STRING(VER) #VER diff --git a/win_installer/productInfo.wxi b/win_installer/productInfo.wxi index 918f7dc3507..20d790190e2 100644 --- a/win_installer/productInfo.wxi +++ b/win_installer/productInfo.wxi @@ -1,8 +1,8 @@ - + - + From 54d3e7c4c73cc30392ef047fcf8fa74e6a3e7f31 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Marjam=C3=A4ki?= Date: Sat, 13 Jan 2024 15:24:29 +0100 Subject: [PATCH 10/29] Update release notes for 2.13.1 --- releasenotes.txt | 47 +++++------------------------------------------ 1 file changed, 5 insertions(+), 42 deletions(-) diff --git a/releasenotes.txt b/releasenotes.txt index e8c4cedd404..921972cf8fa 100644 --- a/releasenotes.txt +++ b/releasenotes.txt @@ -1,45 +1,8 @@ -Release Notes for Cppcheck 2.13 +Release Notes for Cppcheck 2.13.1 -New checks: -- passedByValueCallback for functions which take a parameter by value but are used as callbacks (subset of passedByValue) -- returnImplicitInt for C functions without return type (previously reported as a debug message) -- iterateByValue for iterating by value in a range-based for loop when a const reference could be used - -Changed interface: -- Final report of active checkers is reported as a normal information message instead. - -Deprecations: -- "--showtime=top5" has been deprecated and will be removed in Cppcheck 2.14. Please use --showtime=top5_file or --showtime=top5_summary instead. -- Building with Qt5 has been deprecated (it went EOL in May 2023) and will be removed in a future version - please use Qt6 instead. - -Other: -- Windows builds now default to the `native` platform instead of `win32A` or `win64`. Please specify it explicitly if you depend on it. -- The undocumented and deprecated command-line options `--template