parent
0a50d8e8f4
commit
e4a54a24db
|
@ -469,7 +469,7 @@ void CheckCondition::duplicateCondition()
|
|||
}
|
||||
}
|
||||
if (tok3->varId() > 0 &&
|
||||
isVariableChanged(scope.classDef->next(), cond2, tok3->varId(), false, mSettings, mTokenizer->isCPP())) {
|
||||
isVariableChanged(scope.classDef->next(), cond2, tok3->valueType()->pointer, tok3->varId(), false, mSettings, mTokenizer->isCPP())) {
|
||||
modified = true;
|
||||
return ChildrenToVisit::done;
|
||||
}
|
||||
|
|
|
@ -3829,6 +3829,15 @@ private:
|
|||
" if (b) {}\n"
|
||||
"}\n");
|
||||
ASSERT_EQUALS("", errout.str());
|
||||
|
||||
check("void f(int *i) {\n"
|
||||
" if (*i == 0) {\n"
|
||||
" *i = 1;\n"
|
||||
" }\n"
|
||||
" if (*i == 0) {\n"
|
||||
" }\n"
|
||||
"}\n");
|
||||
ASSERT_EQUALS("", errout.str());
|
||||
}
|
||||
|
||||
void checkInvalidTestForOverflow() {
|
||||
|
|
Loading…
Reference in New Issue