Verification; callbacks in executeCast
This commit is contained in:
parent
9723b28385
commit
29b599b0e5
|
@ -1124,11 +1124,15 @@ static ExprEngine::ValuePtr executeCast(const Token *tok, Data &data)
|
|||
return std::make_shared<ExprEngine::ArrayValue>(data.getNewSymbolName(), bufferSize, range, true, nullPointer, uninitPointer);
|
||||
}
|
||||
|
||||
if (val)
|
||||
if (val) {
|
||||
// TODO: Cast this..
|
||||
call(data.callbacks, tok, val, &data);
|
||||
return val;
|
||||
}
|
||||
|
||||
return getValueRangeFromValueType(data.getNewSymbolName(), tok->valueType(), *data.settings);
|
||||
val = getValueRangeFromValueType(data.getNewSymbolName(), tok->valueType(), *data.settings);
|
||||
call(data.callbacks, tok, val, &data);
|
||||
return val;
|
||||
}
|
||||
|
||||
static ExprEngine::ValuePtr executeDot(const Token *tok, Data &data)
|
||||
|
|
|
@ -9,7 +9,7 @@ void pointer2(int *p) {
|
|||
return 100000 / p[32];
|
||||
}
|
||||
|
||||
void float(float f) {
|
||||
void float1(float f) {
|
||||
// cppcheck-suppress verificationDivByZero
|
||||
return 100000 / (int)f;
|
||||
}
|
||||
|
@ -19,7 +19,7 @@ void stdmap(std::map<int,int> &data) {
|
|||
return 100000 / data[43];
|
||||
}
|
||||
|
||||
struct S { int x };
|
||||
struct S { int x; };
|
||||
void struct1(struct S *s) {
|
||||
// cppcheck-suppress verificationDivByZero
|
||||
return 100000 / s->x;
|
||||
|
|
Loading…
Reference in New Issue