posix.cfg: Removed rename function as this is configured in std.cfg

This commit is contained in:
Daniel Marjamäki 2018-03-19 15:29:47 +01:00
parent 4e1ad40c87
commit 6b00ca33bd
2 changed files with 0 additions and 51 deletions

View File

@ -703,22 +703,6 @@ The function 'mktemp' is considered to be dangerous due to race conditions and s
<not-uninit/>
</arg>
</function>
<!-- int rename(const char *oldpath, const char *newpath); -->
<function name="rename">
<noreturn>false</noreturn>
<leak-ignore/>
<returnValue type="int"/>
<arg nr="1">
<not-null/>
<not-uninit/>
<strz/>
</arg>
<arg nr="2">
<not-null/>
<not-uninit/>
<strz/>
</arg>
</function>
<!-- int stat(const char *file_name, struct stat *buf); -->
<function name="stat">
<noreturn>false</noreturn>

View File

@ -1527,41 +1527,6 @@ void test__unlink__arg1__notuninit() {
unlink(x);
}
void test__rename__noreturn() {
int x = 1;
if (cond) { x=100; rename(arg1, arg2); }
// cppcheck-suppress shiftTooManyBits
x = 1 << x;
}
void test__rename__leakignore() {
char *p = malloc(10); *p=0;
rename(p, arg2);
// cppcheck-suppress memleak
}
void test__rename__arg1__notnull() {
// cppcheck-suppress nullPointer
rename(NULL, arg2);
}
void test__rename__arg1__notuninit() {
int x[10];
// cppcheck-suppress uninitvar
rename(x, arg2);
}
void test__rename__arg2__notnull() {
// cppcheck-suppress nullPointer
rename(arg1, NULL);
}
void test__rename__arg2__notuninit() {
int x[10];
// cppcheck-suppress uninitvar
rename(arg1, x);
}
void test__stat__noreturn() {
int x = 1;
if (cond) { x=100; stat(arg1, arg2); }