windows.cfg: Added support for _mbscat_s().

This commit is contained in:
orbitcowboy 2018-05-28 21:52:44 +02:00
parent 601b3f888d
commit 53c53db312
2 changed files with 50 additions and 0 deletions

View File

@ -5308,6 +5308,26 @@ HFONT CreateFont(
<not-uninit/> <not-uninit/>
</arg> </arg>
</function> </function>
<!-- errno_t _mbscat_s(unsigned char *strDestination, size_t numberOfElements, const unsigned char *strSource ); -->
<function name="_mbscat_s">
<returnValue type="errno_t"/>
<noreturn>false</noreturn>
<leak-ignore/>
<arg nr="1">
<not-null/>
<not-uninit/>
<strz/>
<minsize type="argvalue" arg="2"/>
</arg>
<arg nr="2">
<not-uninit/>
<valid>0:</valid>
</arg>
<arg nr="3">
<not-null/>
<not-uninit/>
</arg>
</function>
<!-- Intrinsic __noop https://docs.microsoft.com/en-us/cpp/intrinsics/noop --> <!-- Intrinsic __noop https://docs.microsoft.com/en-us/cpp/intrinsics/noop -->
<function name="__noop"> <function name="__noop">
<noreturn>false</noreturn> <noreturn>false</noreturn>

View File

@ -793,3 +793,33 @@ unsigned char * nullPointer_mbscat(unsigned char *strDestination, const unsigned
// no warning shall be shown for // no warning shall be shown for
return _mbscat(strDestination,strSource); return _mbscat(strDestination,strSource);
} }
// errno_t _mbscat_s(unsigned char *strDestination, size_t numberOfElements, const unsigned char *strSource );
error_t uninitvar_mbscat_s(unsigned char *strDestination, size_t numberOfElements, const unsigned char *strSource)
{
unsigned char *uninit_strDestination;
size_t uninit_numberOfElements;
unsigned char *uninit_strSource;
// cppcheck-suppress uninitvar
(void)_mbscat_s(uninit_strDestination, numberOfElements, strSource);
// cppcheck-suppress uninitvar
(void)_mbscat_s(strDestination, uninit_numberOfElements, strSource);
// cppcheck-suppress uninitvar
(void)_mbscat_s(strDestination, numberOfElements, uninit_strSource);
// no warning shall be shown for
return _mbscat_s(strDestination, numberOfElements, strSource);
}
// errno_t _mbscat_s(unsigned char *strDestination, size_t numberOfElements, const unsigned char *strSource );
error_t nullPointer_mbscat_s(unsigned char *strDestination, size_t numberOfElements, const unsigned char *strSource)
{
// cppcheck-suppress nullPointer
(void)_mbscat_s(0, numberOfElements, strSource);
// cppcheck-suppress nullPointer
(void)_mbscat_s(strDestination, numberOfElements, 0);
// no warning shall be shown for
return _mbscat_s(strDestination, numberOfElements, strSource);
}