diff --git a/cli/cmdlineparser.cpp b/cli/cmdlineparser.cpp index 7da11321fa7..b1c2d3ac5b9 100644 --- a/cli/cmdlineparser.cpp +++ b/cli/cmdlineparser.cpp @@ -1106,10 +1106,14 @@ CmdLineParser::Result CmdLineParser::parseFromArgs(int argc, const char* const a // TODO: remove // these are loaded via external files and thus have Settings::PlatformFile set instead. // override the type so they behave like the regular platforms. - if (platform == "unix32-unsigned") + if (platform == "unix32-unsigned") { mSettings.platform.type = Platform::Type::Unix32; - else if (platform == "unix64-unsigned") + mLogger.printMessage("The platform 'unix32-unsigned' has been deprecated and will be removed in Cppcheck 2.19. Please use '--platform=unix32 --funsigned-char' instead"); + } + else if (platform == "unix64-unsigned") { mSettings.platform.type = Platform::Type::Unix64; + mLogger.printMessage("The platform 'unix64-unsigned' has been deprecated and will be removed in Cppcheck 2.19. Please use '--platform=unix64 --funsigned-char' instead"); + } } // Write results in results.plist diff --git a/releasenotes.txt b/releasenotes.txt index 792d2dcbc8c..806f9efca44 100644 --- a/releasenotes.txt +++ b/releasenotes.txt @@ -14,6 +14,8 @@ Changed interface: Deprecations: - Support for building with Qt 5 will be removed in Cppcheck 2.19. +- The platform 'unix32-unsigned' has been deprecated and will be removed in Cppcheck 2.19. Please use '--platform=unix32 --funsigned-char' instead. +- The platform 'unix64-unsigned' has been deprecated and will be removed in Cppcheck 2.19. Please use '--platform=unix64 --funsigned-char' instead. - Other: diff --git a/test/testcmdlineparser.cpp b/test/testcmdlineparser.cpp index 349d690e4f5..a22a20f2d73 100644 --- a/test/testcmdlineparser.cpp +++ b/test/testcmdlineparser.cpp @@ -1676,6 +1676,7 @@ class TestCmdlineParser : public TestFixture { ASSERT(settings->platform.set(Platform::Type::Unspecified)); ASSERT_EQUALS_ENUM(CmdLineParser::Result::Success, parseFromArgs(argv)); ASSERT_EQUALS(Platform::Type::Unix32, settings->platform.type); + ASSERT_EQUALS("cppcheck: The platform 'unix32-unsigned' has been deprecated and will be removed in Cppcheck 2.19. Please use '--platform=unix32 --funsigned-char' instead\n", logger->str()); } void platformUnix64() { @@ -1692,6 +1693,7 @@ class TestCmdlineParser : public TestFixture { ASSERT(settings->platform.set(Platform::Type::Unspecified)); ASSERT_EQUALS_ENUM(CmdLineParser::Result::Success, parseFromArgs(argv)); ASSERT_EQUALS(Platform::Type::Unix64, settings->platform.type); + ASSERT_EQUALS("cppcheck: The platform 'unix64-unsigned' has been deprecated and will be removed in Cppcheck 2.19. Please use '--platform=unix64 --funsigned-char' instead\n", logger->str()); } void platformNative() {