diff --git a/test/cfg/posix.c b/test/cfg/posix.c index 3f72c51fb..0794d93ea 100644 --- a/test/cfg/posix.c +++ b/test/cfg/posix.c @@ -32,6 +32,15 @@ #include #include +ssize_t nullPointer_readlink(const char *path, char *buf, size_t bufsiz) +{ + // cppcheck-suppress nullPointer + (void)readlink(NULL, buf, bufsiz); + // cppcheck-suppress nullPointer + (void)readlink(path, NULL, bufsiz); + return readlink(path, buf, bufsiz); +} + int nullPointer_readlinkat(int dirfd, const char *pathname, char *buf, size_t bufsiz) { // cppcheck-suppress nullPointer