std.cfg and windows.cfg: Added support for wcscat_s() and _tcscat_s().

This commit is contained in:
orbitcowboy 2018-05-30 16:24:25 +02:00
parent ef82477d11
commit 39feb150c0
3 changed files with 25 additions and 4 deletions

View File

@ -4690,7 +4690,8 @@ The obsolete function 'gets' is called. With 'gets' you'll get a buffer overrun
</arg> </arg>
</function> </function>
<!-- errno_t strcat_s(char *restrict dest, rsize_t destsz, const char *restrict src); // since C11--> <!-- errno_t strcat_s(char *restrict dest, rsize_t destsz, const char *restrict src); // since C11-->
<function name="strcat_s"> <!-- errno_t wcscat_s(wchar_t *restrict dest, rsize_t destsz, const wchar_t *restrict src); // since C11-->
<function name="strcat_s,wcscat_s">
<returnValue type="errno_t"/> <returnValue type="errno_t"/>
<noreturn>false</noreturn> <noreturn>false</noreturn>
<leak-ignore/> <leak-ignore/>

View File

@ -5309,7 +5309,7 @@ HFONT CreateFont(
</arg> </arg>
</function> </function>
<!-- errno_t _mbscat_s(unsigned char *strDestination, size_t numberOfElements, const unsigned char *strSource ); --> <!-- errno_t _mbscat_s(unsigned char *strDestination, size_t numberOfElements, const unsigned char *strSource ); -->
<function name="_mbscat_s"> <function name="_mbscat_s,_tcscat_s">
<returnValue type="errno_t"/> <returnValue type="errno_t"/>
<noreturn>false</noreturn> <noreturn>false</noreturn>
<leak-ignore/> <leak-ignore/>

View File

@ -3026,7 +3026,8 @@ void uninitvar_strncat(char *Ct, char *S, size_t N)
(void)strncat(Ct,S,N); (void)strncat(Ct,S,N);
} }
void uninitvar_strcat_s(char *Ct, size_t N, char *S) // errno_t strcat_s(char *restrict dest, rsize_t destsz, const char *restrict src); // since C11
errno_t uninitvar_strcat_s(char *Ct, size_t N, char *S)
{ {
char *ct; char *ct;
char *s; char *s;
@ -3041,7 +3042,26 @@ void uninitvar_strcat_s(char *Ct, size_t N, char *S)
(void)strcat_s(Ct,n,S); (void)strcat_s(Ct,n,S);
// no warning is expected for // no warning is expected for
(void)strcat_s(Ct,N,S); return strcat_s(Ct,N,S);
}
// errno_t wcscat_s(wchar_t *restrict dest, rsize_t destsz, const wchar_t *restrict src); // since C11
errno_t uninitvar_wcscat_s(wchar_t *Ct, rsize_t N, wchar_t *S)
{
wchar_t *ct;
wchar_t *s;
rsize_t n;
// cppcheck-suppress uninitvar
(void)wcscat_s(ct,n,s);
// cppcheck-suppress uninitvar
(void)wcscat_s(ct,N,S);
// cppcheck-suppress uninitvar
(void)wcscat_s(Ct,N,s);
// cppcheck-suppress uninitvar
(void)wcscat_s(Ct,n,S);
// no warning is expected for
return wcscat_s(Ct,N,S);
} }
void uninitvar_strncat_s(char *Ct, size_t N1, char *S, size_t N2) void uninitvar_strncat_s(char *Ct, size_t N1, char *S, size_t N2)