posix.cfg: Added support for pread().
This commit is contained in:
parent
942375741b
commit
bd1104d786
|
@ -2106,6 +2106,29 @@ The function 'mktemp' is considered to be dangerous due to race conditions and s
|
|||
<valid>0:</valid>
|
||||
</arg>
|
||||
</function>
|
||||
<!-- https://man7.org/linux/man-pages/man3/read.3p.html -->
|
||||
<!-- ssize_t pread(int fildes, void *buf, size_t nbyte, off_t offset); -->
|
||||
<function name="pread">
|
||||
<leak-ignore/>
|
||||
<returnValue type="ssize_t"/>
|
||||
<arg nr="1" direction="in">
|
||||
<not-uninit/>
|
||||
<not-bool/>
|
||||
<valid>0:</valid>
|
||||
</arg>
|
||||
<arg nr="2" direction="out">
|
||||
<minsize type="argvalue" arg="3"/>
|
||||
</arg>
|
||||
<arg nr="3" direction="in">
|
||||
<not-uninit/>
|
||||
<not-bool/>
|
||||
<valid>0:</valid>
|
||||
</arg>
|
||||
<arg nr="4" direction="in">
|
||||
<not-uninit/>
|
||||
<not-bool/>
|
||||
</arg>
|
||||
</function>
|
||||
<!-- ssize_t write(int fildes, const void *buf, size_t nbyte); -->
|
||||
<function name="write">
|
||||
<noreturn>false</noreturn>
|
||||
|
|
|
@ -31,6 +31,20 @@
|
|||
#include <wchar.h>
|
||||
#include <string.h>
|
||||
|
||||
ssize_t uninitvar_pread(int fd, void *buf, size_t nbyte, off_t offset)
|
||||
{
|
||||
int Fd;
|
||||
// cppcheck-suppress uninitvar
|
||||
(void)pread(Fd,buf,nbyte,offset);
|
||||
size_t Nbyte;
|
||||
// cppcheck-suppress uninitvar
|
||||
(void)pread(fd,buf,Nbyte,offset);
|
||||
off_t Offset;
|
||||
// cppcheck-suppress uninitvar
|
||||
(void)pread(fd,buf,nbyte,Offset);
|
||||
return pread(fd,buf,nbyte,offset);
|
||||
}
|
||||
|
||||
ssize_t nullPointer_pwrite(int fd, const void *buf, size_t nbyte, off_t offset)
|
||||
{
|
||||
// cppcheck-suppress nullPointer
|
||||
|
|
Loading…
Reference in New Issue