std.cfg: Added more test for strncmp() and wmemcmp().
This commit is contained in:
parent
f53ad2391a
commit
e06169cf8d
|
@ -414,12 +414,6 @@ void nullPointer_memcmp(char *p)
|
|||
(void)memcmp(p, 0, 123);
|
||||
}
|
||||
|
||||
void nullPointer_wmemcmp(wchar_t *p)
|
||||
{
|
||||
// cppcheck-suppress nullPointer
|
||||
(void)wmemcmp(p, 0, 123);
|
||||
}
|
||||
|
||||
void nullPointer_vsnprintf(const char * format, ...)
|
||||
{
|
||||
va_list args;
|
||||
|
@ -3616,6 +3610,24 @@ void bufferAccessOutOfBounds_strncmp(void)
|
|||
(void)strncmp(dest,src,3);
|
||||
}
|
||||
|
||||
void nullPointer_wmemcmp(const wchar_t* s1, const wchar_t* s2, size_t n)
|
||||
{
|
||||
// cppcheck-suppress nullPointer
|
||||
(void)wmemcmp(NULL,s2,n);
|
||||
// cppcheck-suppress nullPointer
|
||||
(void)wmemcmp(s1,NULL,n);
|
||||
(void)wmemcmp(s1,s2,n);
|
||||
}
|
||||
|
||||
void nullPointer_strncmp(const char *s1, const char *s2, size_t n)
|
||||
{
|
||||
// cppcheck-suppress nullPointer
|
||||
(void)strncmp(NULL,s2,n);
|
||||
// cppcheck-suppress nullPointer
|
||||
(void)strncmp(s1,NULL,n);
|
||||
(void)strncmp(s1,s2,n);
|
||||
}
|
||||
|
||||
void uninitvar_wcsxfrm(void)
|
||||
{
|
||||
wchar_t *ds;
|
||||
|
|
|
@ -1274,6 +1274,24 @@ wchar_t* nullPointer_fgetws(wchar_t* buffer, int n, FILE* stream)
|
|||
return std::fgetws(buffer, n, stream);
|
||||
}
|
||||
|
||||
void nullPointer_wmemcmp(const wchar_t* s1, const wchar_t* s2, size_t n)
|
||||
{
|
||||
// cppcheck-suppress nullPointer
|
||||
(void)std::wmemcmp(NULL,s2,n);
|
||||
// cppcheck-suppress nullPointer
|
||||
(void)std::wmemcmp(s1,NULL,n);
|
||||
(void)std::wmemcmp(s1,s2,n);
|
||||
}
|
||||
|
||||
void nullPointer_strncmp(const char *s1, const char *s2, size_t n)
|
||||
{
|
||||
// cppcheck-suppress nullPointer
|
||||
(void)std::strncmp(NULL,s2,n);
|
||||
// cppcheck-suppress nullPointer
|
||||
(void)std::strncmp(s1,NULL,n);
|
||||
(void)std::strncmp(s1,s2,n);
|
||||
}
|
||||
|
||||
char* nullPointer_fgets(char *buffer, int n, FILE *stream)
|
||||
{
|
||||
// cppcheck-suppress nullPointer
|
||||
|
@ -3537,12 +3555,6 @@ void nullPointer_memcmp(char *p)
|
|||
(void)std::memcmp(p, 0, 123);
|
||||
}
|
||||
|
||||
void nullPointer_wmemcmp(wchar_t *p)
|
||||
{
|
||||
// cppcheck-suppress nullPointer
|
||||
(void)std::wmemcmp(p, 0, 123);
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////
|
||||
// <algorithm>
|
||||
///////////////////////////////////////////////////////////////////////
|
||||
|
|
Loading…
Reference in New Issue