posix.cfg: Improved configuration of fseeko()/fseeko64().
This commit is contained in:
parent
2f17147900
commit
a7b7b46d76
|
@ -4483,8 +4483,9 @@ The function 'mktemp' is considered to be dangerous due to race conditions and s
|
||||||
<not-bool/>
|
<not-bool/>
|
||||||
</arg>
|
</arg>
|
||||||
</function>
|
</function>
|
||||||
<!-- int fseeko(FILE *stream, off_t offset, int whence); -->
|
<!-- int fseeko (FILE *stream, off_t offset , int whence); -->
|
||||||
<function name="fseeko">
|
<!-- int fseeko64(FILE *stream, off64_t offset, int whence); -->
|
||||||
|
<function name="fseeko,fseeko64">
|
||||||
<returnValue type="int"/>
|
<returnValue type="int"/>
|
||||||
<noreturn>false</noreturn>
|
<noreturn>false</noreturn>
|
||||||
<leak-ignore/>
|
<leak-ignore/>
|
||||||
|
@ -4499,6 +4500,7 @@ The function 'mktemp' is considered to be dangerous due to race conditions and s
|
||||||
<arg nr="3" direction="in">
|
<arg nr="3" direction="in">
|
||||||
<not-uninit/>
|
<not-uninit/>
|
||||||
<not-bool/>
|
<not-bool/>
|
||||||
|
<valid>0:2</valid>
|
||||||
</arg>
|
</arg>
|
||||||
</function>
|
</function>
|
||||||
<!-- off_t ftello(FILE *stream); -->
|
<!-- off_t ftello(FILE *stream); -->
|
||||||
|
|
|
@ -29,6 +29,23 @@
|
||||||
#include <wchar.h>
|
#include <wchar.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
|
void invalidFunctionArg_fseeko(FILE* stream, off_t offset, int origin)
|
||||||
|
{
|
||||||
|
// cppcheck-suppress invalidFunctionArg
|
||||||
|
(void)fseeko(stream, offset, -1);
|
||||||
|
// cppcheck-suppress invalidFunctionArg
|
||||||
|
(void)fseeko(stream, offset, 3);
|
||||||
|
// cppcheck-suppress invalidFunctionArg
|
||||||
|
(void)fseeko(stream, offset, 42+SEEK_SET);
|
||||||
|
// cppcheck-suppress invalidFunctionArg
|
||||||
|
(void)fseeko(stream, offset, SEEK_SET+42);
|
||||||
|
// No warning is expected for
|
||||||
|
(void)fseeko(stream, offset, origin);
|
||||||
|
(void)fseeko(stream, offset, SEEK_SET);
|
||||||
|
(void)fseeko(stream, offset, SEEK_CUR);
|
||||||
|
(void)fseeko(stream, offset, SEEK_END);
|
||||||
|
}
|
||||||
|
|
||||||
char * overlappingWriteFunction_stpcpy(char *src, char *dest)
|
char * overlappingWriteFunction_stpcpy(char *src, char *dest)
|
||||||
{
|
{
|
||||||
// No warning shall be shown:
|
// No warning shall be shown:
|
||||||
|
|
Loading…
Reference in New Issue