posix.cfg: Added support for readdir().

This commit is contained in:
orbitcowboy 2014-12-09 21:37:00 +01:00 committed by PKEuS
parent 520424324d
commit def3491829
2 changed files with 11 additions and 0 deletions

View File

@ -169,6 +169,14 @@
<not-uninit/>
</arg>
</function>
<function name="readdir">
<noreturn>false</noreturn>
<arg nr="1">
<not-null/>
<not-uninit/>
</arg>
<leak-ignore/>
</function>
<function name="rand_r">
<noreturn>false</noreturn>
<leak-ignore/>

View File

@ -2665,6 +2665,9 @@ private:
" strdup(x);\n"
"}");
ASSERT_EQUALS("[test.cpp:4]: (error) Possible null pointer dereference: x\n", errout.str());
check("DIR* f(){ DIR *dirp = 0; return readdir (dirp);}");
ASSERT_EQUALS("[test.cpp:1]: (error) Possible null pointer dereference: dirp\n",errout.str());
}
};