std.cfg: Added 'indirect' flag for destination argument of 'mbstrtowc' function.

This commit is contained in:
orbitcowboy 2019-11-13 14:34:02 +01:00
parent 7841430793
commit 177eed122a
2 changed files with 14 additions and 3 deletions

View File

@ -2362,7 +2362,9 @@
<returnValue type="size_t"/>
<noreturn>false</noreturn>
<leak-ignore/>
<arg nr="1" direction="out"/>
<arg nr="1" direction="out">
<not-uninit indirect="1"/>
</arg>
<arg nr="2" direction="in">
<not-null/>
<not-uninit/>

View File

@ -1651,14 +1651,23 @@ void uninitvar_mbstowcs(void)
(void)mbstowcs(ws,s,n);
}
void uninitvar_mbsrtowcs(void)
void uninitvar_mbsrtowcs(wchar_t* d, const char** s, size_t m, mbstate_t *p)
{
wchar_t* dest;
const char* src;
size_t max;
mbstate_t* ps;
// cppcheck-suppress uninitvar
(void)mbsrtowcs(dest,&src,max,ps);
(void)mbsrtowcs(dest,s,m,p);
// cppcheck-suppress uninitvar
(void)mbsrtowcs(dest,&src,m,p);
// cppcheck-suppress uninitvar
(void)mbsrtowcs(dest,s,max,p);
// cppcheck-suppress uninitvar
(void)mbsrtowcs(dest,s,m,ps);
// No warning is expected
(void)mbsrtowcs(d,s,m,p);
}
void uninitvar_wctob(void)