std.cfg: Added invalidFunctionArg cfg for strchr().
This commit is contained in:
parent
60ce95c1ec
commit
58b3d75b62
|
@ -4546,6 +4546,7 @@ The obsolete function 'gets' is called. With 'gets' you'll get a buffer overrun
|
|||
</arg>
|
||||
<arg nr="2">
|
||||
<not-uninit/>
|
||||
<valid>0:255</valid>
|
||||
</arg>
|
||||
</function>
|
||||
<!-- wchar_t wcschr(const wchar_t *cs, wchar_t c); -->
|
||||
|
|
|
@ -2901,6 +2901,19 @@ void uninitvar_strchr(void)
|
|||
(void)strchr(cs,c);
|
||||
}
|
||||
|
||||
void invalidFunctionArg_strchr(char *cs, int c)
|
||||
{
|
||||
// cppcheck-suppress invalidFunctionArg
|
||||
(void)strchr(cs,-1);
|
||||
|
||||
// No warning shall be issued for
|
||||
(void)strchr(cs, 0);
|
||||
(void)strchr(cs, 255);
|
||||
|
||||
// cppcheck-suppress invalidFunctionArg
|
||||
(void)strchr(cs, 256);
|
||||
}
|
||||
|
||||
void uninitvar_wcschr(void)
|
||||
{
|
||||
wchar_t *cs;
|
||||
|
|
Loading…
Reference in New Issue