diff --git a/cfg/posix.cfg b/cfg/posix.cfg index c17e0c153..75b7f587f 100644 --- a/cfg/posix.cfg +++ b/cfg/posix.cfg @@ -1695,6 +1695,7 @@ 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 97f7bd438..ae86317e9 100644 --- a/test/cfg/posix.c +++ b/test/cfg/posix.c @@ -226,6 +226,15 @@ void invalidFunctionArg_fseeko(FILE* stream, off_t offset, int origin) (void)fseeko(stream, offset, SEEK_END); } +int nullPointer_utimes(const char *path, const struct timeval times[2]) +{ + // cppcheck-suppress nullPointer + // cppcheck-suppress utimesCalled + (void)utimes(NULL, times); + // cppcheck-suppress utimesCalled + return utimes(path, times); +} + char * overlappingWriteFunction_stpcpy(char *src, char *dest) { // No warning shall be shown: