Skip to content

Commit d0d56cd

Browse files
authored
removed deprecated platform type Unspecified (#5903)
1 parent 309aa8a commit d0d56cd

3 files changed

Lines changed: 3 additions & 7 deletions

File tree

cli/cmdlineparser.cpp

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -944,11 +944,6 @@ CmdLineParser::Result CmdLineParser::parseFromArgs(int argc, const char* const a
944944

945945
// keep existing platform from command-line intact
946946
if (!platform.empty()) {
947-
if (platform == "Unspecified") {
948-
mLogger.printMessage("'Unspecified' is a deprecated platform type and will be removed in Cppcheck 2.14. Please use 'unspecified' instead.");
949-
platform = "unspecified";
950-
}
951-
952947
std::string errstr;
953948
const std::vector<std::string> paths = {projectFile, argv[0]};
954949
if (!mSettings.platform.set(platform, errstr, paths)) {

releasenotes.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,3 +21,4 @@ Other:
2121
- The minimum required CMake version has been bumped to 3.5
2222
- 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.
2323
- Added '--template=simple'. It is expands to '{file}:{line}:{column}: {severity}:{inconclusive:inconclusive:} {message} [{id}]' without any additional location details.
24+
- Removed deprecated platform type 'Unspecified'. Please use 'unspecified' instead.

test/cli/more-projects_test.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,8 +106,8 @@ def test_project_unspecified_platform(tmpdir):
106106
f.write("int x;")
107107

108108
ret, stdout, stderr = cppcheck(['--project=' + project_file, '--template=cppcheck1', '-q'])
109-
assert ret == 0, stdout
110-
assert stdout == "cppcheck: 'Unspecified' is a deprecated platform type and will be removed in Cppcheck 2.14. Please use 'unspecified' instead.\n"
109+
assert ret == 1, stdout
110+
assert stdout == "cppcheck: error: unrecognized platform: 'Unspecified'.\n"
111111
assert stderr == ''
112112

113113

0 commit comments

Comments
 (0)