Fixed Ticket 1001 - std.cfg: Invalid parameters for fseek()
This commit is contained in:
parent
974dd5d49f
commit
fa776051e9
|
@ -2186,6 +2186,7 @@
|
||||||
</arg>
|
</arg>
|
||||||
<arg nr="3" direction="in">
|
<arg nr="3" direction="in">
|
||||||
<not-uninit/>
|
<not-uninit/>
|
||||||
|
<valid>0:2</valid>
|
||||||
</arg>
|
</arg>
|
||||||
</function>
|
</function>
|
||||||
<!-- int fsetpos(FILE *stream, const fpos_t *ptr); -->
|
<!-- int fsetpos(FILE *stream, const fpos_t *ptr); -->
|
||||||
|
|
|
@ -1231,6 +1231,23 @@ void uninitvar_fseek(void)
|
||||||
(void)std::fseek(stream,offset,origin);
|
(void)std::fseek(stream,offset,origin);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void invalidFunctionArg_fseek(FILE* stream, long int offset, int origin)
|
||||||
|
{
|
||||||
|
// cppcheck-suppress invalidFunctionArg
|
||||||
|
(void)std::fseek(stream, offset, -1);
|
||||||
|
// cppcheck-suppress invalidFunctionArg
|
||||||
|
(void)std::fseek(stream, offset, 3);
|
||||||
|
// cppcheck-suppress invalidFunctionArg
|
||||||
|
(void)std::fseek(stream, offset, 42+SEEK_SET);
|
||||||
|
// cppcheck-suppress invalidFunctionArg
|
||||||
|
(void)std::fseek(stream, offset, SEEK_SET+42);
|
||||||
|
// No warning is expected for
|
||||||
|
(void)std::fseek(stream, offset, origin);
|
||||||
|
(void)std::fseek(stream, offset, SEEK_SET);
|
||||||
|
(void)std::fseek(stream, offset, SEEK_CUR);
|
||||||
|
(void)std::fseek(stream, offset, SEEK_END);
|
||||||
|
}
|
||||||
|
|
||||||
void uninitvar_fsetpos(void)
|
void uninitvar_fsetpos(void)
|
||||||
{
|
{
|
||||||
FILE* stream;
|
FILE* stream;
|
||||||
|
|
Loading…
Reference in New Issue