posix.cfg: erand48/nrand48/jrand48 fixed argument direction (#5253)

This commit is contained in:
Tobias 2023-07-27 07:50:46 +02:00 committed by GitHub
parent 265759dfa4
commit f10851dc37
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 3 deletions

View File

@ -2197,7 +2197,7 @@ The function 'mktemp' is considered to be dangerous due to race conditions and s
<leak-ignore/>
<use-retval/>
<returnValue type="long int"/>
<arg nr="1" direction="in">
<arg nr="1" direction="inout">
<not-null/>
<not-uninit/>
<not-bool/>
@ -2209,7 +2209,7 @@ The function 'mktemp' is considered to be dangerous due to race conditions and s
<leak-ignore/>
<use-retval/>
<returnValue type="long int"/>
<arg nr="1" direction="in">
<arg nr="1" direction="inout">
<not-null/>
<not-uninit/>
<not-bool/>
@ -2221,7 +2221,7 @@ The function 'mktemp' is considered to be dangerous due to race conditions and s
<leak-ignore/>
<use-retval/>
<returnValue type="double"/>
<arg nr="1" direction="in">
<arg nr="1" direction="inout">
<not-null/>
<not-uninit/>
<not-bool/>

View File

@ -330,6 +330,13 @@ double nullPointer_erand48(unsigned short xsubi[3])
return erand48(xsubi);
}
struct non_const_parameter_erand48_struct { unsigned short xsubi[3]; };
// No warning is expected that dat can be const
double non_const_parameter_erand48(struct non_const_parameter_erand48_struct *dat)
{
return erand48(dat->xsubi);
}
unsigned short *nullPointer_seed48(unsigned short seed16v[3])
{
// cppcheck-suppress nullPointer