Fix compiler error

This commit is contained in:
Daniel Marjamäki 2019-07-23 13:14:08 +02:00
parent 681bd0a911
commit c8bc88e7e2
2 changed files with 1 additions and 6 deletions

View File

@ -181,11 +181,6 @@ bool CmdLineParser::parseFromArgs(int argc, const char* const argv[])
else if (std::strcmp(argv[i], "--inconclusive") == 0)
mSettings->inconclusive = true;
// Experimental: this flag says that all functions are "safe".
// todo: add proper configuration options
else if (std::strcmp(argv[i], "--all-functions-are-safe") == 0)
mSettings->allFunctionsAreSafe = true;
// Enforce language (--language=, -x)
else if (std::strncmp(argv[i], "--language=", 11) == 0 || std::strcmp(argv[i], "-x") == 0) {
std::string str;

View File

@ -3910,7 +3910,7 @@ private:
const char *code;
std::list<ValueFlow::Value> values;
Settings s;
s.allFunctionsAreSafe = true;
s.safeChecks.classes = s.safeChecks.externalFunctions = s.safeChecks.internalFunctions = true;
code = "short f(short x) {\n"
" return x + 0;\n"