posix.cfg: Added support for wcwidth().
This commit is contained in:
parent
4ddd7e562d
commit
d0ff2a022a
|
@ -4729,6 +4729,18 @@ 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/wcwidth.3.html -->
|
||||
<!-- int wcwidth(wchar_t c); -->
|
||||
<function name="wcwidth">
|
||||
<returnValue type="int"/>
|
||||
<use-retval/>
|
||||
<noreturn>false</noreturn>
|
||||
<leak-ignore/>
|
||||
<arg nr="1" direction="in">
|
||||
<not-uninit/>
|
||||
<not-bool/>
|
||||
</arg>
|
||||
</function>
|
||||
<!-- http://man7.org/linux/man-pages/man3/ffs.3.html -->
|
||||
<!-- int ffs(int i); -->
|
||||
<function name="ffs">
|
||||
|
|
|
@ -31,6 +31,15 @@
|
|||
#include <wchar.h>
|
||||
#include <string.h>
|
||||
|
||||
int uninitvar_wcwidth(const wchar_t c)
|
||||
{
|
||||
wchar_t wc;
|
||||
// cppcheck-suppress uninitvar
|
||||
(void)wcwidth(wc);
|
||||
// No warning is expected
|
||||
return wcwidth(c);
|
||||
}
|
||||
|
||||
int nullPointer_wcsnlen(const wchar_t *s, size_t n)
|
||||
{
|
||||
// cppcheck-suppress nullPointer
|
||||
|
|
Loading…
Reference in New Issue