posix.cfg: Added support for wcswidth().
This commit is contained in:
parent
5be16c3113
commit
1067cb6e5d
|
@ -4580,6 +4580,24 @@ The function 'mktemp' is considered to be dangerous due to race conditions and s
|
||||||
<not-bool/>
|
<not-bool/>
|
||||||
</arg>
|
</arg>
|
||||||
</function>
|
</function>
|
||||||
|
<!-- https://man7.org/linux/man-pages/man3/wcswidth.3.html -->
|
||||||
|
<!-- int wcswidth(const wchar_t *s, size_t n); -->
|
||||||
|
<function name="wcswidth">
|
||||||
|
<returnValue type="int"/>
|
||||||
|
<use-retval/>
|
||||||
|
<noreturn>false</noreturn>
|
||||||
|
<leak-ignore/>
|
||||||
|
<arg nr="1" direction="in">
|
||||||
|
<not-null/>
|
||||||
|
<not-uninit/>
|
||||||
|
<not-bool/>
|
||||||
|
</arg>
|
||||||
|
<arg nr="2" direction="in">
|
||||||
|
<not-uninit/>
|
||||||
|
<not-bool/>
|
||||||
|
<valid>0:</valid>
|
||||||
|
</arg>
|
||||||
|
</function>
|
||||||
<!-- http://man7.org/linux/man-pages/man3/scandir.3.html -->
|
<!-- http://man7.org/linux/man-pages/man3/scandir.3.html -->
|
||||||
<!-- int scandir(const char *dirp,
|
<!-- int scandir(const char *dirp,
|
||||||
struct dirent ***namelist,
|
struct dirent ***namelist,
|
||||||
|
|
|
@ -27,9 +27,18 @@
|
||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
|
#define _XOPEN_SOURCE
|
||||||
#include <wchar.h>
|
#include <wchar.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
|
int nullPointer_wcswidth(const wchar_t *s, size_t n)
|
||||||
|
{
|
||||||
|
// cppcheck-suppress nullPointer
|
||||||
|
(void)wcswidth(NULL, n);
|
||||||
|
// No warning is expected
|
||||||
|
return wcswidth(s, n);
|
||||||
|
}
|
||||||
|
|
||||||
int nullPointer_aio_cancel(int fd, struct aiocb *aiocbp)
|
int nullPointer_aio_cancel(int fd, struct aiocb *aiocbp)
|
||||||
{
|
{
|
||||||
// No warning is expected
|
// No warning is expected
|
||||||
|
|
Loading…
Reference in New Issue