std.cfg: Improved cfg for 'mbstowcs'
This commit is contained in:
parent
aa5c42ffc5
commit
09eaa412b1
|
@ -2347,7 +2347,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/>
|
||||
|
|
|
@ -1642,13 +1642,21 @@ void uninitvar_mbsinit(void)
|
|||
(void)mbsinit(ps);
|
||||
}
|
||||
|
||||
void uninitvar_mbstowcs(void)
|
||||
void uninitvar_mbstowcs(wchar_t* d, const char* s, size_t m)
|
||||
{
|
||||
wchar_t *ws;
|
||||
char *s;
|
||||
size_t n;
|
||||
wchar_t *dest;
|
||||
char *src;
|
||||
size_t max;
|
||||
|
||||
// cppcheck-suppress uninitvar
|
||||
(void)mbstowcs(ws,s,n);
|
||||
(void)mbstowcs(dest,s,m);
|
||||
// cppcheck-suppress uninitvar
|
||||
(void)mbstowcs(d,src,m);
|
||||
// cppcheck-suppress uninitvar
|
||||
(void)mbstowcs(d,s,max);
|
||||
|
||||
// No warning is expected
|
||||
(void)mbstowcs(d,s,m);
|
||||
}
|
||||
|
||||
void uninitvar_mbsrtowcs(wchar_t* d, const char** s, size_t m, mbstate_t *p)
|
||||
|
@ -1657,6 +1665,7 @@ void uninitvar_mbsrtowcs(wchar_t* d, const char** s, size_t m, mbstate_t *p)
|
|||
const char* src;
|
||||
size_t max;
|
||||
mbstate_t* ps;
|
||||
|
||||
// cppcheck-suppress uninitvar
|
||||
(void)mbsrtowcs(dest,s,m,p);
|
||||
// cppcheck-suppress uninitvar
|
||||
|
|
Loading…
Reference in New Issue