test std.cfg: Improved strlen() tests.

This commit is contained in:
orbitcowboy 2019-11-14 16:45:27 +01:00
parent ea92695e54
commit dbbb7f544a
1 changed files with 9 additions and 1 deletions

View File

@ -3136,11 +3136,19 @@ void uninitvar_strftime(void)
(void)strfxtime(s,max,fmt,px);
}
void uninitvar_strlen(void)
void uninitvar_strlen(const char *str)
{
char *s;
// cppcheck-suppress uninitvar
(void)strlen(s);
const char x;
const char *xPtr = &x;
// cppcheck-suppress uninitvar
(void)strlen(xPtr);
// No waring is expected
(void)strlen(str);
}
void uninitvar_wcslen(void)