Skip to content

Commit 5d26d62

Browse files
committed
posix.cfg: Added more test for wcpncpy().
1 parent 097438f commit 5d26d62

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

test/cfg/posix.c

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -226,6 +226,15 @@ void invalidFunctionArg_fseeko(FILE* stream, off_t offset, int origin)
226226
(void)fseeko(stream, offset, SEEK_END);
227227
}
228228

229+
wchar_t *nullPointer_wcpncpy(wchar_t *dest, const wchar_t *src, size_t n)
230+
{
231+
// cppcheck-suppress nullPointer
232+
(void)wcpncpy(NULL, src, n);
233+
// cppcheck-suppress nullPointer
234+
(void)wcpncpy(dest, NULL, n);
235+
return wcpncpy(dest, src, n);
236+
}
237+
229238
int nullPointer_utimes(const char *path, const struct timeval times[2])
230239
{
231240
// cppcheck-suppress nullPointer

0 commit comments

Comments
 (0)