Fixed FP in posix.cfg and mkdir() for second parameter.
This commit is contained in:
parent
96d2666a6c
commit
ed54b93317
|
@ -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>
|
||||
|
|
|
@ -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());
|
||||
}
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in New Issue