posix.cfg: utimes() is a wrapper for utime(), which is obsolescent. Set utimes() as obsolescent as well.
This commit is contained in:
parent
478aa6754b
commit
097438f308
|
@ -1695,6 +1695,7 @@ The function 'mktemp' is considered to be dangerous due to race conditions and s
|
|||
<not-bool/>
|
||||
<minsize type="value" value="2"/>
|
||||
</arg>
|
||||
<warn severity="style" reason="Obsolescent" alternatives="utimensat"/>
|
||||
</function>
|
||||
<!-- DIR *opendir(const char *name); -->
|
||||
<function name="opendir">
|
||||
|
|
|
@ -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:
|
||||
|
|
Loading…
Reference in New Issue