We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f7130c3 commit 784214aCopy full SHA for 784214a
1 file changed
lib/checktype.cpp
@@ -383,7 +383,8 @@ void CheckType::checkLongCast()
383
const ValueType *type = tok->astOperand1()->valueType();
384
if (type && checkTypeCombination(*type, *retVt, *mSettings) &&
385
type->pointer == 0U &&
386
- type->originalTypeName.empty())
+ type->originalTypeName.empty() &&
387
+ !tok->astOperand1()->hasKnownIntValue())
388
ret = tok;
389
}
390
// All return statements must have problem otherwise no warning
0 commit comments