Fixed FP invalidFunctionArgStr, found a daca@home: ftp://ftp.de.debian.org/debian/pool/main/h/haskell-hs-bibutils/haskell-hs-bibutils_6.10.0.0.orig.tar.gz
This commit is contained in:
parent
72342de0da
commit
4e9565b4e6
28
cfg/std.cfg
28
cfg/std.cfg
|
@ -5119,32 +5119,8 @@ The obsolete function 'gets' is called. With 'gets' you'll get a buffer overrun
|
|||
</arg>
|
||||
</function>
|
||||
<!-- int strncmp(const char *s1, const char *s2, size_t n); -->
|
||||
<function name="strncmp,std::strncmp">
|
||||
<use-retval/>
|
||||
<pure/>
|
||||
<returnValue type="int"/>
|
||||
<noreturn>false</noreturn>
|
||||
<leak-ignore/>
|
||||
<arg nr="1" direction="in">
|
||||
<not-null/>
|
||||
<not-uninit/>
|
||||
<strz/>
|
||||
<minsize type="argvalue" arg="3"/>
|
||||
</arg>
|
||||
<arg nr="2" direction="in">
|
||||
<not-null/>
|
||||
<not-uninit/>
|
||||
<strz/>
|
||||
<minsize type="argvalue" arg="3"/>
|
||||
</arg>
|
||||
<arg nr="3" direction="in">
|
||||
<not-uninit/>
|
||||
<not-bool/>
|
||||
<valid>0:</valid>
|
||||
</arg>
|
||||
</function>
|
||||
<!-- int wcsncmp(const wchar_t* wcs1, const wchar_t* wcs2, size_t num); -->
|
||||
<function name="wcsncmp,std::wcsncmp">
|
||||
<function name="strncmp,std::strncmp,wcsncmp,std::wcsncmp">
|
||||
<use-retval/>
|
||||
<pure/>
|
||||
<returnValue type="int"/>
|
||||
|
@ -5153,10 +5129,12 @@ The obsolete function 'gets' is called. With 'gets' you'll get a buffer overrun
|
|||
<arg nr="1" direction="in">
|
||||
<not-null/>
|
||||
<not-uninit/>
|
||||
<minsize type="argvalue" arg="3"/>
|
||||
</arg>
|
||||
<arg nr="2" direction="in">
|
||||
<not-null/>
|
||||
<not-uninit/>
|
||||
<minsize type="argvalue" arg="3"/>
|
||||
</arg>
|
||||
<arg nr="3" direction="in">
|
||||
<not-uninit/>
|
||||
|
|
|
@ -29,6 +29,12 @@
|
|||
#include <inttypes.h>
|
||||
#include <float.h>
|
||||
|
||||
int invalidFunctionArgStr_strncmp( const char *p )
|
||||
{
|
||||
// No warning is expected for:
|
||||
const char emdash[3] = { -42, -43, -44 };
|
||||
return strncmp( p, emdash, 3 );
|
||||
}
|
||||
|
||||
float invalidFunctionArg_float_remquo (float x, float y, int* quo )
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue