Fixed #2533 (false positive: (error) Uninitialized variable: cBuffer)
This commit is contained in:
parent
398190460f
commit
39c68e12ce
|
@ -71,7 +71,6 @@ void CheckNullPointer::parseFunctionCall(const Token &tok, std::list<const Token
|
||||||
functionNames1.insert("strstr");
|
functionNames1.insert("strstr");
|
||||||
functionNames1.insert("fclose");
|
functionNames1.insert("fclose");
|
||||||
functionNames1.insert("feof");
|
functionNames1.insert("feof");
|
||||||
functionNames1.insert("fread");
|
|
||||||
functionNames1.insert("fwrite");
|
functionNames1.insert("fwrite");
|
||||||
functionNames1.insert("fseek");
|
functionNames1.insert("fseek");
|
||||||
functionNames1.insert("ftell");
|
functionNames1.insert("ftell");
|
||||||
|
|
|
@ -1412,6 +1412,12 @@ private:
|
||||||
" return cmd[0];\n"
|
" return cmd[0];\n"
|
||||||
"}\n");
|
"}\n");
|
||||||
ASSERT_EQUALS("", errout.str());
|
ASSERT_EQUALS("", errout.str());
|
||||||
|
|
||||||
|
checkUninitVar("char fn(FILE *f) {\n"
|
||||||
|
" char buf[10];\n"
|
||||||
|
" fread(buf, 1, 10, f);\n"
|
||||||
|
"}\n");
|
||||||
|
ASSERT_EQUALS("", errout.str());
|
||||||
}
|
}
|
||||||
|
|
||||||
void uninitvar_typeof()
|
void uninitvar_typeof()
|
||||||
|
|
Loading…
Reference in New Issue