CheckOther::invalidPointerCast: Incorrect interpretation of settings
This commit is contained in:
parent
bba968f766
commit
353b885948
|
@ -422,7 +422,7 @@ static std::string analyzeType(const Token* tok)
|
|||
|
||||
void CheckOther::invalidPointerCast()
|
||||
{
|
||||
if (!_settings->isEnabled("warning") && !_settings->isEnabled("portability"))
|
||||
if (!_settings->isEnabled("portability"))
|
||||
return;
|
||||
|
||||
const SymbolDatabase* const symbolDatabase = _tokenizer->getSymbolDatabase();
|
||||
|
@ -481,7 +481,7 @@ void CheckOther::invalidPointerCast()
|
|||
|
||||
std::string fromType = analyzeType(fromTok);
|
||||
std::string toType = analyzeType(toTok);
|
||||
if (fromType != toType && !fromType.empty() && !toType.empty() && _settings->isEnabled("portability") && (toTok->str() != "char" || _settings->inconclusive))
|
||||
if (fromType != toType && !fromType.empty() && !toType.empty() && (toTok->str() != "char" || _settings->inconclusive))
|
||||
invalidPointerCastError(tok, fromType, toType, toTok->str() == "char");
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue