Fixed FP in posix.cfg and mkdir() for second parameter.

This commit is contained in:
Martin Ettl 2014-04-18 21:46:32 +02:00
parent 96d2666a6c
commit ed54b93317
2 changed files with 10 additions and 1 deletions

View File

@ -16,7 +16,7 @@
<function name="mkdir">
<noreturn>false</noreturn>
<arg nr="1"><not-uninit/><not-null/></arg>
<arg nr="2"><not-uninit/><not-null/></arg>
<arg nr="2"><not-uninit/></arg>
<leak-ignore/>
</function>
<function name="rmdir"> <noreturn>false</noreturn> <arg nr="1"><not-uninit/><not-null/></arg> <leak-ignore/> </function>

View File

@ -2605,6 +2605,15 @@ private:
check("void f(){ isatty (0);}");
ASSERT_EQUALS("",errout.str());
check("void f(char *p){ mkdir (p, 0);}");
ASSERT_EQUALS("",errout.str());
check("void f(char *p){ int i = 0; mkdir (p, i);}");
ASSERT_EQUALS("",errout.str());
check("void f(char *p){ mkdir (p, *0);}");
ASSERT_EQUALS("[test.cpp:1]: (error) Null pointer dereference\n",errout.str());
}
};