posix.cfg: Added support for wcsncasecmp().

This commit is contained in:
orbitcowboy 2022-04-22 08:07:20 +02:00
parent 0560a946a8
commit 478aa6754b
2 changed files with 31 additions and 0 deletions

View File

@ -1993,6 +1993,7 @@ The function 'mktemp' is considered to be dangerous due to race conditions and s
<not-bool/>
</arg>
</function>
<!-- https://man7.org/linux/man-pages/man3/strncasecmp.3.html -->
<!-- int strncasecmp(const char *s1, const char *s2, size_t n); -->
<function name="strncasecmp">
<pure/>
@ -2013,6 +2014,27 @@ The function 'mktemp' is considered to be dangerous due to race conditions and s
<valid>0:</valid>
</arg>
</function>
<!-- https://man7.org/linux/man-pages/man3/wcsncasecmp.3.html -->
<!-- int wcsncasecmp(const wchar_t *s1, const wchar_t *s2, size_t n) -->
<function name="wcsncasecmp">
<pure/>
<use-retval/>
<noreturn>false</noreturn>
<leak-ignore/>
<returnValue type="int"/>
<arg nr="1" direction="in">
<not-null/>
<not-uninit/>
</arg>
<arg nr="2" direction="in">
<not-null/>
<not-uninit/>
</arg>
<arg nr="3" direction="in">
<not-bool/>
<valid>0:</valid>
</arg>
</function>
<!-- ssize_t sendfile(int out_fd, int in_fd, off_t *offset, size_t count); -->
<function name="sendfile">
<leak-ignore/>

View File

@ -31,6 +31,15 @@
#include <wchar.h>
#include <string.h>
int nullPointer_wcsncasecmp(const wchar_t *s1, const wchar_t *s2, size_t n)
{
// cppcheck-suppress nullPointer
(void)wcsncasecmp(NULL,s2,n);
// cppcheck-suppress nullPointer
(void)wcsncasecmp(s1,NULL,n);
return wcsncasecmp(s1,s2,n);
}
int uninitvar_wcwidth(const wchar_t c)
{
wchar_t wc;