std.cfg: Improved configuration for fseek(). The 3rd argument is not allowed to be of Boolean type.

This commit is contained in:
orbitcowboy 2022-02-07 09:02:24 +01:00
parent f2a419653c
commit 2f17147900
2 changed files with 9 additions and 0 deletions

View File

@ -2186,6 +2186,7 @@
</arg>
<arg nr="3" direction="in">
<not-uninit/>
<not-bool/>
<valid>0:2</valid>
</arg>
</function>

View File

@ -1248,6 +1248,14 @@ void invalidFunctionArg_fseek(FILE* stream, long int offset, int origin)
(void)std::fseek(stream, offset, SEEK_END);
}
void invalidFunctionArgBool_fseek(FILE* stream, long int offset, int origin)
{
// cppcheck-suppress invalidFunctionArgBool
(void)std::fseek(stream, offset, true);
// cppcheck-suppress invalidFunctionArgBool
(void)std::fseek(stream, offset, false);
}
void uninitvar_fsetpos(void)
{
FILE* stream;