std.cfg and windows.cfg: Improved support for <use-retval/> for functions like ftell(), [f]get[w]c().

This commit is contained in:
orbitcowboy 2016-11-26 21:31:15 +01:00
parent 8a0f856e95
commit 55ae961ac2
3 changed files with 11 additions and 4 deletions

View File

@ -832,6 +832,7 @@
<function name="fgetc,std::fgetc">
<noreturn>false</noreturn>
<leak-ignore/>
<use-retval/>
<arg nr="1">
<not-null/>
<not-uninit/>
@ -841,6 +842,7 @@
<function name="fgetwc,std::fgetwc">
<noreturn>false</noreturn>
<leak-ignore/>
<use-retval/>
<arg nr="1">
<not-null/>
<not-uninit/>
@ -1408,6 +1410,7 @@
<function name="getc,std::getc">
<noreturn>false</noreturn>
<leak-ignore/>
<use-retval/>
<arg nr="1">
<not-null/>
<not-uninit/>
@ -1417,6 +1420,7 @@
<function name="getwc,std::getwc">
<noreturn>false</noreturn>
<leak-ignore/>
<use-retval/>
<arg nr="1">
<not-null/>
<not-uninit/>

View File

@ -2095,10 +2095,13 @@ HFONT CreateFont(
<not-uninit/>
</arg>
</function>
<!-- __int64 _ftelli64(FILE *stream); -->
<function name="_ftelli64">
<!-- __int64 _ftelli64(FILE *stream);
long _ftell_nolock(FILE *stream);
__int64 _ftelli64_nolock(FILE *stream); -->
<function name="_ftelli64,_ftell_nolock,_ftelli64_nolock">
<noreturn>false</noreturn>
<leak-ignore/>
<use-retval/>
<arg nr="1">
<not-null/>
<not-uninit/>

View File

@ -78,7 +78,7 @@ void nullpointer(int value)
// cppcheck-suppress nullPointer
feof(0);
// cppcheck-suppress nullPointer
fgetc(0);
(void)fgetc(0);
// cppcheck-suppress nullPointer
fclose(0);
// cppcheck-suppress ignoredReturnValue
@ -265,7 +265,7 @@ void uninit_fgetc(void)
{
FILE *fp;
// cppcheck-suppress uninitvar
fgetc(fp);
(void)fgetc(fp);
}
void uninit_fgetpos(void)