From dd2e218bb4694c4699a456b20da5ad89e0da010e Mon Sep 17 00:00:00 2001 From: orbitcowboy Date: Mon, 25 Apr 2022 12:46:27 +0200 Subject: [PATCH] posix.cfg: Added some tests for ttyname_r(). --- test/cfg/posix.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/test/cfg/posix.c b/test/cfg/posix.c index a2782e65c..968eda836 100644 --- a/test/cfg/posix.c +++ b/test/cfg/posix.c @@ -31,6 +31,13 @@ #include #include +int nullPointer_ttyname_r(int fd, char *buf, size_t buflen) +{ + // cppcheck-suppress nullPointer + (void)ttyname_r(fd,NULL,buflen); + return ttyname_r(fd,buf,buflen); +} + size_t nullPointer_wcsnrtombs(char *restrict dest, const wchar_t **restrict src, size_t nwc, size_t len, mbstate_t *restrict ps) { // It is allowed to set the first arg to NULL