Skip to content

Commit 773d19b

Browse files
committed
Fix compiler errors. After removing the -std=posix.
1 parent b04d181 commit 773d19b

4 files changed

Lines changed: 3 additions & 12 deletions

File tree

test/testcmdlineparser.cpp

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,6 @@ class TestCmdlineParser : public TestFixture {
103103
TEST_CASE(maxConfigsInvalid);
104104
TEST_CASE(maxConfigsTooSmall);
105105
TEST_CASE(reportProgressTest); // "Test" suffix to avoid hiding the parent's reportProgress
106-
TEST_CASE(stdposix);
107106
TEST_CASE(stdc99);
108107
TEST_CASE(stdcpp11);
109108
TEST_CASE(platform);
@@ -694,14 +693,6 @@ class TestCmdlineParser : public TestFixture {
694693
ASSERT(settings.reportProgress);
695694
}
696695

697-
void stdposix() {
698-
REDIRECT;
699-
const char * const argv[] = {"cppcheck", "--std=posix", "file.cpp"};
700-
settings.standards.posix = false;
701-
ASSERT(defParser.parseFromArgs(3, argv));
702-
ASSERT(settings.standards.posix);
703-
}
704-
705696
void stdc99() {
706697
REDIRECT;
707698
const char * const argv[] = {"cppcheck", "--std=c99", "file.cpp"};

test/testfunctions.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ class TestFunctions : public TestFixture {
3838
settings.addEnabled("style");
3939
settings.addEnabled("warning");
4040
settings.addEnabled("portability");
41-
settings.standards.posix = true;
41+
settings.libraries.push_back("posix");
4242
settings.standards.c = Standards::C11;
4343
settings.standards.cpp = Standards::CPP11;
4444
LOAD_LIB_2(settings.library, "std.cfg");

test/testmemleak.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1789,7 +1789,7 @@ class TestMemleakNoVar : public TestFixture {
17891789

17901790
void run() OVERRIDE {
17911791
settings.inconclusive = true;
1792-
settings.standards.posix = true;
1792+
settings.libraries.push_back("posix");
17931793
settings.addEnabled("warning");
17941794

17951795
LOAD_LIB_2(settings.library, "std.cfg");

test/testother.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -300,7 +300,7 @@ class TestOther : public TestFixture {
300300
void checkposix(const char code[]) {
301301
static Settings settings;
302302
settings.addEnabled("warning");
303-
settings.standards.posix = true;
303+
settings.libraries.push_back("posix");
304304

305305
check(code,
306306
nullptr, // filename

0 commit comments

Comments
 (0)