Added support for fputs() to std.cfg.
This commit is contained in:
parent
54e7f34f4a
commit
30006cf06f
|
@ -39,7 +39,12 @@
|
|||
<arg nr="1"><not-null/><not-uninit/><not-bool/><valid>0-</valid></arg>
|
||||
<arg nr="2"><not-null/><not-uninit/></arg>
|
||||
</function>
|
||||
|
||||
<function name="fputs">
|
||||
<noreturn>false</noreturn>
|
||||
<leak-ignore/>
|
||||
<arg nr="1"><not-null/><not-uninit/></arg>
|
||||
<arg nr="2"><not-null/><not-uninit/></arg>
|
||||
</function>
|
||||
<function name="isalnum"> <noreturn>false</noreturn> <leak-ignore/> <arg nr="1"><valid>0-255</valid></arg> </function>
|
||||
<function name="isalpha"> <noreturn>false</noreturn> <leak-ignore/> <arg nr="1"><valid>0-255</valid></arg> </function>
|
||||
<function name="isblank"> <noreturn>false</noreturn> <leak-ignore/> <arg nr="1"><valid>0-255</valid></arg> </function>
|
||||
|
|
|
@ -2417,6 +2417,9 @@ private:
|
|||
check("void f(char * p,FILE * q){ fputc (*p,q);if(!p||!q){}}");
|
||||
ASSERT_EQUALS(errpq,errout.str());
|
||||
|
||||
check("void f(char * p,FILE * q){ fputs (p,q);if(!p||!q){}}");
|
||||
ASSERT_EQUALS(errpq,errout.str());
|
||||
|
||||
check("void f(FILE * p,fpos_t * q){ fgetpos (p,q);if(!p||!q){}}");
|
||||
ASSERT_EQUALS(errpq,errout.str());
|
||||
|
||||
|
|
|
@ -3604,6 +3604,21 @@ private:
|
|||
" fputc (c, f);\n"
|
||||
"}");
|
||||
ASSERT_EQUALS("", errout.str());
|
||||
|
||||
|
||||
// fputs
|
||||
checkUninitVar("void f() {\n"
|
||||
" char *c;\n"
|
||||
" FILE *f;"
|
||||
" fputs (c, f);\n"
|
||||
"}");
|
||||
ASSERT_EQUALS("[test.cpp:3]: (error) Uninitialized variable: c\n"
|
||||
"[test.cpp:3]: (error) Uninitialized variable: f\n", errout.str());
|
||||
|
||||
checkUninitVar("void f(char *c, FILE *f) {\n"
|
||||
" fputs (c, f);\n"
|
||||
"}");
|
||||
ASSERT_EQUALS("", errout.str());
|
||||
}
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in New Issue