diff --git a/cfg/posix.cfg b/cfg/posix.cfg index afffdd2fa..1da97e5ad 100644 --- a/cfg/posix.cfg +++ b/cfg/posix.cfg @@ -3889,6 +3889,7 @@ The function 'mktemp' is considered to be dangerous due to race conditions and s false + diff --git a/test/cfg/posix.c b/test/cfg/posix.c index ac7e4c6ea..bae5685f1 100644 --- a/test/cfg/posix.c +++ b/test/cfg/posix.c @@ -29,6 +29,14 @@ #include #include +char * overlappingWriteFunction_stpcpy(char *src, char *dest) +{ + // No warning shall be shown: + (void) stpcpy(dest, src); + // cppcheck-suppress overlappingWriteFunction + return stpcpy(src, src); +} + void overlappingWriteFunction_bcopy(char *buf, const size_t count) { // No warning shall be shown: