windows.cfg: Added support for _mbscpy().

This commit is contained in:
orbitcowboy 2021-07-10 09:27:22 +02:00
parent c38a43c353
commit b68c5dee07
2 changed files with 21 additions and 1 deletions

View File

@ -2548,6 +2548,20 @@ HFONT CreateFont(
<not-null/>
<not-uninit/>
</arg>
</function>
<!-- unsigned char *_mbscpy(unsigned char *strDestination, const unsigned char *strSource); -->
<function name="_mbscpy">
<returnValue type="unsigned char *"/>
<noreturn>false</noreturn>
<leak-ignore/>
<not-overlapping-data ptr1-arg="1" ptr2-arg="2" strlen-arg="2"/>
<arg nr="1" direction="out">
<not-null/>
</arg>
<arg nr="2" direction="in">
<not-null/>
<not-uninit/>
</arg>
</function>
<!-- errno_t wcscpy_s(wchar_t *strDestination, size_t numberOfElements, const wchar_t *strSource);
errno_t _mbscpy_s(unsigned char *strDestination, size_t numberOfElements, const unsigned char *strSource); -->

View File

@ -12,6 +12,13 @@
#include <stdlib.h>
#include <time.h>
unsigned char * overlappingWriteFunction__mbscpy(unsigned char *src, unsigned char *dest)
{
// No warning shall be shown:
(void)_mbscpy(dest, src);
// cppcheck-suppress overlappingWriteFunction
return _mbscpy(src, src);
}
SYSTEM_INFO uninitvar_GetSystemInfo(char * envstr)
{
@ -21,7 +28,6 @@ SYSTEM_INFO uninitvar_GetSystemInfo(char * envstr)
return SystemInfo;
}
void uninitvar__putenv(char * envstr)
{
// No warning is expected