Merge pull request #237 from scriptum/rpg-posix-additions
Library: add mk[sd]temp to Posix
This commit is contained in:
commit
57a3fe59cd
|
@ -4,6 +4,10 @@
|
|||
<function name="_exit"> <noreturn>true</noreturn> </function>
|
||||
<function name="closedir"> <noreturn>false</noreturn> <arg nr="1"><not-bool/><not-uninit/><not-null/></arg> </function>
|
||||
|
||||
<function name="mkstemp"> <noreturn>false</noreturn> <arg nr="1"><not-uninit/><not-null/></arg> <leak-ignore/> </function>
|
||||
<function name="mkdtemp"> <noreturn>false</noreturn> <arg nr="1"><not-uninit/><not-null/></arg> <leak-ignore/> </function>
|
||||
<function name="mktemp"> <noreturn>false</noreturn> <arg nr="1"><not-uninit/><not-null/></arg> <leak-ignore/> </function>
|
||||
|
||||
<resource>
|
||||
<dealloc>close</dealloc>
|
||||
<alloc init="true">socket</alloc>
|
||||
|
|
|
@ -4248,6 +4248,14 @@ private:
|
|||
ASSERT_EQUALS("[test.cpp:5]: (error) Resource leak: leak1\n"
|
||||
"[test.cpp:5]: (error) Resource leak: leak2\n"
|
||||
"[test.cpp:5]: (error) Resource leak: leak3\n", errout.str());
|
||||
|
||||
check("void f(char *a) {\n"
|
||||
" char *s = g_strdup(a);\n"
|
||||
" mkstemp(s);\n"
|
||||
" mkdtemp(s);\n"
|
||||
" mktemp(s);\n"
|
||||
"}");
|
||||
ASSERT_EQUALS("[test.cpp:6]: (error) Memory leak: s\n", errout.str());
|
||||
}
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in New Issue