From 5d26d626987b4030883fcb207a902cc5eecde021 Mon Sep 17 00:00:00 2001 From: orbitcowboy Date: Fri, 22 Apr 2022 08:23:17 +0200 Subject: [PATCH] posix.cfg: Added more test for wcpncpy(). --- test/cfg/posix.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/test/cfg/posix.c b/test/cfg/posix.c index ae86317e9..cfd1bdcee 100644 --- a/test/cfg/posix.c +++ b/test/cfg/posix.c @@ -226,6 +226,15 @@ void invalidFunctionArg_fseeko(FILE* stream, off_t offset, int origin) (void)fseeko(stream, offset, SEEK_END); } +wchar_t *nullPointer_wcpncpy(wchar_t *dest, const wchar_t *src, size_t n) +{ + // cppcheck-suppress nullPointer + (void)wcpncpy(NULL, src, n); + // cppcheck-suppress nullPointer + (void)wcpncpy(dest, NULL, n); + return wcpncpy(dest, src, n); +} + int nullPointer_utimes(const char *path, const struct timeval times[2]) { // cppcheck-suppress nullPointer