#6116 False positive uninitvar - first argument to wcstombs(). Correct stf.cfg
This commit is contained in:
parent
a4ff30301a
commit
f94e208862
|
@ -197,14 +197,12 @@
|
|||
<function name="mbstowcs">
|
||||
<noreturn>false</noreturn>
|
||||
<leak-ignore/>
|
||||
<arg nr="1"><not-uninit/></arg>
|
||||
<arg nr="2"><not-null/><not-uninit/></arg>
|
||||
<arg nr="3"><not-uninit/></arg>
|
||||
</function>
|
||||
<function name="wcstombs">
|
||||
<noreturn>false</noreturn>
|
||||
<leak-ignore/>
|
||||
<arg nr="1"><not-uninit/></arg>
|
||||
<arg nr="2"><not-null/><not-uninit/></arg>
|
||||
<arg nr="3"><not-uninit/></arg>
|
||||
</function>
|
||||
|
|
|
@ -3711,6 +3711,18 @@ private:
|
|||
" putchar (*c);\n"
|
||||
"}");
|
||||
ASSERT_EQUALS("", errout.str());
|
||||
|
||||
// #6116 False positive uninitvar - first argument to wcstombs()
|
||||
checkUninitVar("void f( wchar_t *wstr) {\n"
|
||||
" char buf[10];\n"
|
||||
" wcstombs (buf, wstr, 3);\n"
|
||||
"}");
|
||||
ASSERT_EQUALS("", errout.str());
|
||||
checkUninitVar("void f( char *str) {\n"
|
||||
" wchar_t wbuf[10];\n"
|
||||
" mbstowcs (wbuf, str, 3);\n"
|
||||
"}");
|
||||
ASSERT_EQUALS("", errout.str());
|
||||
}
|
||||
|
||||
void checkDeadPointer(const char code[]) {
|
||||
|
|
Loading…
Reference in New Issue