posix.cfg: Added support for wcsnrtombs().
This commit is contained in:
parent
6b9ac6f7a8
commit
d42bab47ae
|
@ -14,6 +14,36 @@
|
|||
<not-bool/>
|
||||
</arg>
|
||||
</function>
|
||||
<!-- https://man7.org/linux/man-pages/man3/wcsnrtombs.3.html -->
|
||||
<!-- size_t wcsnrtombs(char *restrict dest, const wchar_t **restrict src, size_t nwc, size_t len, mbstate_t *restrict ps); -->
|
||||
<function name="wcsnrtombs">
|
||||
<use-retval/>
|
||||
<returnValue type="size_t"/>
|
||||
<noreturn>false</noreturn>
|
||||
<leak-ignore/>
|
||||
<arg nr="1" direction="out">
|
||||
<not-bool/>
|
||||
</arg>
|
||||
<arg nr="2" direction="in">
|
||||
<not-null/>
|
||||
<not-uninit/>
|
||||
<not-bool/>
|
||||
</arg>
|
||||
<arg nr="3" direction="in">
|
||||
<not-uninit/>
|
||||
<not-bool/>
|
||||
<valid>0:</valid>
|
||||
</arg>
|
||||
<arg nr="4" direction="in">
|
||||
<not-uninit/>
|
||||
<not-bool/>
|
||||
<valid>0:</valid>
|
||||
</arg>
|
||||
<arg nr="5" direction="in">
|
||||
<not-uninit/>
|
||||
<not-null/>
|
||||
</arg>
|
||||
</function>
|
||||
<!-- https://man7.org/linux/man-pages/man3/aio_read.3.html -->
|
||||
<!-- int aio_read(struct aiocb *aiocbp); -->
|
||||
<!-- https://man7.org/linux/man-pages/man3/aio_write.3.html -->
|
||||
|
|
|
@ -31,6 +31,17 @@
|
|||
#include <wchar.h>
|
||||
#include <string.h>
|
||||
|
||||
size_t nullPointer_wcsnrtombs(char *restrict dest, const wchar_t **restrict src, size_t nwc, size_t len, mbstate_t *restrict ps)
|
||||
{
|
||||
// It is allowed to set the first arg to NULL
|
||||
(void)wcsnrtombs(NULL,src,nwc,len,ps);
|
||||
// cppcheck-suppress nullPointer
|
||||
(void)wcsnrtombs(dest,NULL,nwc,len,ps);
|
||||
// cppcheck-suppress nullPointer
|
||||
(void)wcsnrtombs(dest,src,nwc,len,NULL);
|
||||
return wcsnrtombs(dest,src,nwc,len,ps);
|
||||
}
|
||||
|
||||
int nullPointer_wcsncasecmp(const wchar_t *s1, const wchar_t *s2, size_t n)
|
||||
{
|
||||
// cppcheck-suppress nullPointer
|
||||
|
|
Loading…
Reference in New Issue