From d0ff2a022a0730cbbe0a3d2cd0a6f0d01c329962 Mon Sep 17 00:00:00 2001 From: orbitcowboy Date: Wed, 20 Apr 2022 17:32:26 +0200 Subject: [PATCH] posix.cfg: Added support for wcwidth(). --- cfg/posix.cfg | 12 ++++++++++++ test/cfg/posix.c | 9 +++++++++ 2 files changed, 21 insertions(+) diff --git a/cfg/posix.cfg b/cfg/posix.cfg index d6c53331e..55b8ff243 100644 --- a/cfg/posix.cfg +++ b/cfg/posix.cfg @@ -4729,6 +4729,18 @@ The function 'mktemp' is considered to be dangerous due to race conditions and s 0: + + + + + + false + + + + + + diff --git a/test/cfg/posix.c b/test/cfg/posix.c index 13ccc64ac..44a3525b2 100644 --- a/test/cfg/posix.c +++ b/test/cfg/posix.c @@ -31,6 +31,15 @@ #include #include +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