windows.cfg: Added support for _strncpy_s_l().

This commit is contained in:
orbitcowboy 2018-06-04 16:58:09 +02:00
parent bdb372f929
commit 74b18d7fd9
2 changed files with 60 additions and 0 deletions

View File

@ -3805,6 +3805,31 @@ HFONT CreateFont(
<not-uninit/>
</arg>
</function>
<!-- errno_t _strncpy_s_l(char *strDest, size_t numberOfElements, const char *strSource, size_t count, _locale_t locale); -->
<function name="_strncpy_s_l">
<noreturn>false</noreturn>
<returnValue type="errno_t"/>
<leak-ignore/>
<arg nr="1">
<not-null/>
<minsize type="argvalue" arg="2"/>
</arg>
<arg nr="2">
<not-uninit/>
<valid>0:</valid>
</arg>
<arg nr="3">
<not-null/>
<not-uninit/>
<minsize type="argvalue" arg="4"/>
</arg>
<arg nr="4">
<not-uninit/>
</arg>
<arg nr="5">
<not-uninit/>
</arg>
</function>
<!-- errno_t _localtime32_s( struct tm* _tm, const __time32_t *time);
errno_t _localtime64_s( struct tm* _tm, const __time64_t *time); -->
<function name="_localtime32_s,_localtime64_s">

View File

@ -823,3 +823,38 @@ error_t nullPointer_mbscat_s(unsigned char *strDestination, size_t numberOfEleme
// no warning shall be shown for
return _mbscat_s(strDestination, numberOfElements, strSource);
}
// errno_t _strncpy_s_l(char *strDest, size_t numberOfElements, const char *strSource, size_t count, _locale_t locale);
error_t uninitvar__strncpy_s_l(char *strDest, size_t numberOfElements, const char *strSource, size_t count, _locale_t locale)
{
size_t uninit_numberOfElements;
const char *uninit_strSource;
size_t uninit_count;
_locale_t uninit_locale;
// cppcheck-suppress uninitvar
(void)_strncpy_s_l(strDest, uninit_numberOfElements, strSource, count, locale);
// cppcheck-suppress uninitvar
(void)_strncpy_s_l(strDest, numberOfElements, uninit_strSource, count, locale);
// cppcheck-suppress uninitvar
(void)_strncpy_s_l(strDest, numberOfElements, strSource, count, locale);
// cppcheck-suppress uninitvar
(void)_strncpy_s_l(strDest, numberOfElements, strSource, uninit_count, locale);
// cppcheck-suppress uninitvar
(void)_strncpy_s_l(strDest, numberOfElements, strSource, uninit_count, uninit_locale);
// no warning shall be shown for
return _strncpy_s_l(strDest, numberOfElements, strSource, count, locale);
}
// errno_t _strncpy_s_l(char *strDest, size_t numberOfElements, const char *strSource, size_t count, _locale_t locale);
error_t nullPointer__strncpy_s_l(char *strDest, size_t numberOfElements, const char *strSource, size_t count, _locale_t locale)
{
// cppcheck-suppress nullPointer
(void)_strncpy_s_l(0, numberOfElements, strSource, count, locale);
// cppcheck-suppress nullPointer
(void)_strncpy_s_l(strDest, numberOfElements, 0, count, locale);
// no warning shall be shown for
return _strncpy_s_l(strDest, numberOfElements, strSource, count, locale);
}