Fixed #9347 (FP uninitvar for pointer passed to sscanf)
This commit is contained in:
parent
d1fce6b7ad
commit
15d7b9c83f
|
@ -5520,6 +5520,9 @@ static void valueFlowSubFunction(TokenList* tokenlist, ErrorLogger* errorLogger,
|
|||
// Don't forward lifetime values
|
||||
argvalues.remove_if(std::mem_fn(&ValueFlow::Value::isLifetimeValue));
|
||||
|
||||
// Don't forward <Uninit> values, this is handled by CTU. We also had a FP #9347
|
||||
argvalues.remove_if(std::mem_fn(&ValueFlow::Value::isUninitValue));
|
||||
|
||||
if (argvalues.empty())
|
||||
continue;
|
||||
|
||||
|
|
|
@ -4278,7 +4278,7 @@ private:
|
|||
" someType_t gVar;\n"
|
||||
" bar(&gVar);\n"
|
||||
"}\n");
|
||||
ASSERT_EQUALS("[test.cpp:9] -> [test.cpp:5]: (error) Uninitialized variable: flags\n", errout.str());
|
||||
TODO_ASSERT_EQUALS("[test.cpp:9] -> [test.cpp:5]: (error) Uninitialized variable: p->flags\n", "", errout.str());
|
||||
|
||||
valueFlowUninit("typedef struct \n"
|
||||
"{\n"
|
||||
|
|
Loading…
Reference in New Issue