fixed some clang warnings (#2980)
This commit is contained in:
parent
765c1ace87
commit
fa8a836925
|
@ -47,6 +47,7 @@ elseif (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
|
|||
add_compile_options(-Wno-missing-braces)
|
||||
add_compile_options(-Wno-unused-function)
|
||||
add_compile_options_safe(-Wextra-semi-stmt)
|
||||
add_compile_options_safe(-Wcomma)
|
||||
|
||||
if(ENABLE_COVERAGE OR ENABLE_COVERAGE_XML)
|
||||
message(FATAL_ERROR "Do not use clang for generate code coverage. Use gcc.")
|
||||
|
|
|
@ -198,7 +198,7 @@ static std::string str(ExprEngine::ValuePtr val)
|
|||
case ExprEngine::ValueType::BailoutValue:
|
||||
typestr = "BailoutValue";
|
||||
break;
|
||||
};
|
||||
}
|
||||
|
||||
std::ostringstream ret;
|
||||
ret << val->name << "=" << typestr << "(" << val->getRange() << ")";
|
||||
|
@ -2520,7 +2520,7 @@ static std::string execute(const Token *start, const Token *end, Data &data)
|
|||
// This is intended for testing
|
||||
throw ExprEngineException(tok, "__CPPCHECK_BAILOUT__");
|
||||
|
||||
if (Token::simpleMatch(tok, "while (") && (tok->linkAt(1), ") ;") && tok->next()->astOperand1()->hasKnownIntValue() && tok->next()->astOperand1()->getKnownIntValue() == 0) {
|
||||
if (Token::simpleMatch(tok, "while (") && Token::simpleMatch(tok->linkAt(1), ") ;") && tok->next()->astOperand1()->hasKnownIntValue() && tok->next()->astOperand1()->getKnownIntValue() == 0) {
|
||||
tok = tok->tokAt(4);
|
||||
continue;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue