#6569 Add strcasestr function to gnu.cfg
This commit is contained in:
parent
1b81a4cbf9
commit
95411414c4
15
cfg/gnu.cfg
15
cfg/gnu.cfg
|
@ -185,4 +185,19 @@
|
||||||
</arg>
|
</arg>
|
||||||
<arg nr="6"/>
|
<arg nr="6"/>
|
||||||
</function>
|
</function>
|
||||||
|
<!-- https://www.gnu.org/software/gnulib/manual/html_node/c_002dstrcasestr.html -->
|
||||||
|
<!-- size_t strcasestr(const char *s1, const char *s2); -->
|
||||||
|
<function name="strcasestr">
|
||||||
|
<use-retval/>
|
||||||
|
<noreturn>false</noreturn>
|
||||||
|
<leak-ignore/>
|
||||||
|
<arg nr="1">
|
||||||
|
<not-null/>
|
||||||
|
<not-uninit/>
|
||||||
|
</arg>
|
||||||
|
<arg nr="2">
|
||||||
|
<not-null/>
|
||||||
|
<not-uninit/>
|
||||||
|
</arg>
|
||||||
|
</function>
|
||||||
</def>
|
</def>
|
||||||
|
|
|
@ -18,4 +18,7 @@ void leakReturnValNotUsed() {
|
||||||
char* ptr2 = (char*)strndupa("test", 1);
|
char* ptr2 = (char*)strndupa("test", 1);
|
||||||
// cppcheck-suppress ignoredReturnValue
|
// cppcheck-suppress ignoredReturnValue
|
||||||
strndupa("test", 1);
|
strndupa("test", 1);
|
||||||
|
// cppcheck-suppress ignoredReturnValue
|
||||||
|
// cppcheck-suppress nullPointer
|
||||||
|
strcasestr("test", NULL);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue