diff --git a/cfg/posix.cfg b/cfg/posix.cfg index d4a5e3156..47fbe9cd1 100644 --- a/cfg/posix.cfg +++ b/cfg/posix.cfg @@ -3906,6 +3906,7 @@ The function 'mktemp' is considered to be dangerous due to race conditions and s + @@ -3914,6 +3915,7 @@ The function 'mktemp' is considered to be dangerous due to race conditions and s + 0: diff --git a/test/cfg/posix.c b/test/cfg/posix.c index aed88f778..3f72c51fb 100644 --- a/test/cfg/posix.c +++ b/test/cfg/posix.c @@ -32,6 +32,15 @@ #include #include +int nullPointer_readlinkat(int dirfd, const char *pathname, char *buf, size_t bufsiz) +{ + // cppcheck-suppress nullPointer + (void) readlinkat(dirfd, NULL, buf, bufsiz); + // cppcheck-suppress nullPointer + (void) readlinkat(dirfd, pathname, NULL, bufsiz); + return readlinkat(dirfd, pathname, buf, bufsiz); +} + ssize_t nullPointer_recv(int sockfd, void *buf, size_t len, int flags) { // cppcheck-suppress nullPointer