windows.cfg: Added support for _mbscat().
This commit is contained in:
parent
36f7585798
commit
75e28e46c5
|
@ -5295,6 +5295,19 @@ HFONT CreateFont(
|
|||
<not-uninit/>
|
||||
</arg>
|
||||
</function>
|
||||
<!-- unsigned char *_mbscat(unsigned char *strDestination, const unsigned char *strSource); -->
|
||||
<function name="_mbscat">
|
||||
<returnValue type="unsigned char *"/>
|
||||
<noreturn>false</noreturn>
|
||||
<leak-ignore/>
|
||||
<arg nr="1">
|
||||
<not-null/>
|
||||
</arg>
|
||||
<arg nr="2">
|
||||
<not-null/>
|
||||
<not-uninit/>
|
||||
</arg>
|
||||
</function>
|
||||
<!-- Intrinsic __noop https://docs.microsoft.com/en-us/cpp/intrinsics/noop -->
|
||||
<function name="__noop">
|
||||
<noreturn>false</noreturn>
|
||||
|
|
|
@ -2861,7 +2861,7 @@ void bufferAccessOutOfBounds_strcat(char *dest, const char * const source)
|
|||
const char * const srcstr3 = "123";
|
||||
const char * const srcstr4 = "1234";
|
||||
// @todo #8599 cppcheck-suppress bufferAccessOutOfBounds
|
||||
(void)strcat(buf4,srcstr4); // off by one issue: strcat is appends \0' at the end
|
||||
(void)strcat(buf4,srcstr4); // off by one issue: strcat is appends \0' at the end
|
||||
|
||||
// no warning shall be shown for
|
||||
(void)strcat(dest,source);
|
||||
|
|
|
@ -765,3 +765,31 @@ HANDLE test_CreateThread(LPSECURITY_ATTRIBUTES lpThreadAttributes,
|
|||
// no warning shall be shown for
|
||||
return CreateThread(lpThreadAttributes, dwStackSize, lpStartAddress, lpParameter, dwCreationFlags, lpThreadId);
|
||||
}
|
||||
|
||||
// unsigned char *_mbscat(unsigned char *strDestination, const unsigned char *strSource);
|
||||
unsigned char * uninitvar_mbscat(unsigned char *strDestination, const unsigned char *strSource)
|
||||
{
|
||||
unsigned char *uninit_deststr;
|
||||
unsigned char *uninit_srcstr;
|
||||
// cppcheck-suppress uninitvar
|
||||
(void)_mbscat(uninit_deststr,uninit_srcstr);
|
||||
// cppcheck-suppress uninitvar
|
||||
(void)_mbscat(strDestination,uninit_srcstr);
|
||||
// cppcheck-suppress uninitvar
|
||||
(void)_mbscat(uninit_deststr,uninit_deststr);
|
||||
|
||||
// no warning shall be shown for
|
||||
return _mbscat(strDestination,strSource);
|
||||
}
|
||||
|
||||
// unsigned char *_mbscat(unsigned char *strDestination, const unsigned char *strSource);
|
||||
unsigned char * nullPointer_mbscat(unsigned char *strDestination, const unsigned char *strSource)
|
||||
{
|
||||
// cppcheck-suppress nullPointer
|
||||
(void)_mbscat(0,strSource);
|
||||
// cppcheck-suppress nullPointer
|
||||
(void)_mbscat(strDestination,0);
|
||||
|
||||
// no warning shall be shown for
|
||||
return _mbscat(strDestination,strSource);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue