posix: remove function 'remove' that is also configured in std.cfg
This commit is contained in:
parent
3af7aef3f0
commit
7202787435
|
@ -2933,16 +2933,6 @@ The function 'mktemp' is considered to be dangerous due to race conditions and s
|
||||||
</arg>
|
</arg>
|
||||||
<arg nr="2"/>
|
<arg nr="2"/>
|
||||||
</function>
|
</function>
|
||||||
<!-- int remove(const char *pathname); -->
|
|
||||||
<function name="remove">
|
|
||||||
<returnValue type="int"/>
|
|
||||||
<noreturn>false</noreturn>
|
|
||||||
<leak-ignore/>
|
|
||||||
<arg nr="1">
|
|
||||||
<not-uninit/>
|
|
||||||
<not-null/>
|
|
||||||
</arg>
|
|
||||||
</function>
|
|
||||||
<!-- int fileno(FILE *stream);-->
|
<!-- int fileno(FILE *stream);-->
|
||||||
<function name="fileno">
|
<function name="fileno">
|
||||||
<returnValue type="int"/>
|
<returnValue type="int"/>
|
||||||
|
|
|
@ -5906,30 +5906,6 @@ void test__realpath__arg1__notuninit() {
|
||||||
realpath(x, arg2);
|
realpath(x, arg2);
|
||||||
}
|
}
|
||||||
|
|
||||||
void test__remove__noreturn() {
|
|
||||||
int x = 1;
|
|
||||||
if (cond) { x=100; remove(arg1); }
|
|
||||||
// cppcheck-suppress shiftTooManyBits
|
|
||||||
x = 1 << x;
|
|
||||||
}
|
|
||||||
|
|
||||||
void test__remove__leakignore() {
|
|
||||||
char *p = malloc(10); *p=0;
|
|
||||||
remove(p);
|
|
||||||
// cppcheck-suppress memleak
|
|
||||||
}
|
|
||||||
|
|
||||||
void test__remove__arg1__notnull() {
|
|
||||||
// cppcheck-suppress nullPointer
|
|
||||||
remove(NULL);
|
|
||||||
}
|
|
||||||
|
|
||||||
void test__remove__arg1__notuninit() {
|
|
||||||
int x[10];
|
|
||||||
// cppcheck-suppress uninitvar
|
|
||||||
remove(x);
|
|
||||||
}
|
|
||||||
|
|
||||||
void test__fileno__noreturn() {
|
void test__fileno__noreturn() {
|
||||||
int x = 1;
|
int x = 1;
|
||||||
if (cond) { x=100; result = fileno(arg1); }
|
if (cond) { x=100; result = fileno(arg1); }
|
||||||
|
|
Loading…
Reference in New Issue