std.cfg: Added more test cases.

This commit is contained in:
Martin Ettl 2015-08-16 14:49:35 +02:00
parent 2665fb9481
commit 58d7b8a3f2
3 changed files with 27 additions and 23 deletions

View File

@ -484,31 +484,9 @@
</arg> </arg>
</function> </function>
<!-- int atoi(const char *s); --> <!-- int atoi(const char *s); -->
<function name="atoi">
<use-retval/>
<pure/>
<noreturn>false</noreturn>
<leak-ignore/>
<arg nr="1">
<not-null/>
<not-uninit/>
<strz/>
</arg>
</function>
<!-- long int atol(const char *s); --> <!-- long int atol(const char *s); -->
<function name="atol">
<use-retval/>
<pure/>
<noreturn>false</noreturn>
<leak-ignore/>
<arg nr="1">
<not-null/>
<not-uninit/>
<strz/>
</arg>
</function>
<!-- long long int atoll(const char *s); --> <!-- long long int atoll(const char *s); -->
<function name="atoll"> <function name="atoi,atol,atoll,std::atoi,std::atol,std::atoll">
<use-retval/> <use-retval/>
<pure/> <pure/>
<noreturn>false</noreturn> <noreturn>false</noreturn>

View File

@ -793,6 +793,19 @@ void uninitvar_atan2(void)
(void)atan2l(ld1,ld2); (void)atan2l(ld1,ld2);
} }
void uninitvar_atol(void)
{
char * c;
// cppcheck-suppress uninitvar
(void)atoi(c);
// cppcheck-suppress uninitvar
(void)atol(c);
// cppcheck-suppress uninitvar
(void)atoll(c);
}
void ignoreretrn(void) void ignoreretrn(void)
{ {
char szNumbers[] = "2001 60c0c0 -1101110100110100100000 0x6fffff"; char szNumbers[] = "2001 60c0c0 -1101110100110100100000 0x6fffff";

View File

@ -341,3 +341,16 @@ void uninitvar_atan2(void)
// cppcheck-suppress uninitvar // cppcheck-suppress uninitvar
(void)std::atan2(ld1,ld2); (void)std::atan2(ld1,ld2);
} }
void uninitvar_atol(void)
{
char * c;
// cppcheck-suppress uninitvar
(void)std::atoi(c);
// cppcheck-suppress uninitvar
(void)std::atol(c);
// cppcheck-suppress uninitvar
(void)std::atoll(c);
}