Fix compiler errors. After removing the -std=posix.

This commit is contained in:
Daniel Marjamäki 2019-04-12 10:41:53 +02:00
parent b04d1815ed
commit 773d19b2d6
4 changed files with 3 additions and 12 deletions

View File

@ -103,7 +103,6 @@ private:
TEST_CASE(maxConfigsInvalid);
TEST_CASE(maxConfigsTooSmall);
TEST_CASE(reportProgressTest); // "Test" suffix to avoid hiding the parent's reportProgress
TEST_CASE(stdposix);
TEST_CASE(stdc99);
TEST_CASE(stdcpp11);
TEST_CASE(platform);
@ -694,14 +693,6 @@ private:
ASSERT(settings.reportProgress);
}
void stdposix() {
REDIRECT;
const char * const argv[] = {"cppcheck", "--std=posix", "file.cpp"};
settings.standards.posix = false;
ASSERT(defParser.parseFromArgs(3, argv));
ASSERT(settings.standards.posix);
}
void stdc99() {
REDIRECT;
const char * const argv[] = {"cppcheck", "--std=c99", "file.cpp"};

View File

@ -38,7 +38,7 @@ private:
settings.addEnabled("style");
settings.addEnabled("warning");
settings.addEnabled("portability");
settings.standards.posix = true;
settings.libraries.push_back("posix");
settings.standards.c = Standards::C11;
settings.standards.cpp = Standards::CPP11;
LOAD_LIB_2(settings.library, "std.cfg");

View File

@ -1789,7 +1789,7 @@ private:
void run() OVERRIDE {
settings.inconclusive = true;
settings.standards.posix = true;
settings.libraries.push_back("posix");
settings.addEnabled("warning");
LOAD_LIB_2(settings.library, "std.cfg");

View File

@ -300,7 +300,7 @@ private:
void checkposix(const char code[]) {
static Settings settings;
settings.addEnabled("warning");
settings.standards.posix = true;
settings.libraries.push_back("posix");
check(code,
nullptr, // filename