From 14be611a7ece62fdd81631cb256b0896caa345f3 Mon Sep 17 00:00:00 2001 From: Alexander Mai Date: Sat, 29 Apr 2017 17:57:16 +0200 Subject: [PATCH] Correct configuration to allow NULL as 2nd argument to read/write. Whether it's a legal value depends on the 3rd argument --- cfg/posix.cfg | 2 -- test/cfg/posix.c | 6 ++++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/cfg/posix.cfg b/cfg/posix.cfg index 9da8742e7..034d9610a 100644 --- a/cfg/posix.cfg +++ b/cfg/posix.cfg @@ -1059,7 +1059,6 @@ The function 'mktemp' is considered to be dangerous due to race conditions and s - @@ -1076,7 +1075,6 @@ The function 'mktemp' is considered to be dangerous due to race conditions and s - diff --git a/test/cfg/posix.c b/test/cfg/posix.c index 4c76d7b40..5c5c21e89 100644 --- a/test/cfg/posix.c +++ b/test/cfg/posix.c @@ -56,10 +56,12 @@ void nullPointer(char *p, int fd) // cppcheck-suppress nullPointer // cppcheck-suppress utimeCalled utime(NULL, NULL); - // cppcheck-suppress nullPointer + // not implemented yet: cppcheck-suppress nullPointer read(fd,NULL,42); - // cppcheck-suppress nullPointer + read(fd,NULL,0); + // not implemented yet: cppcheck-suppress nullPointer write(fd,NULL,42); + write(fd,NULL,0); } void memleak_getaddrinfo()