std.cfg: Added more test for strncat().
This commit is contained in:
parent
a6f87e6b8a
commit
7f48127c0b
|
@ -3449,6 +3449,16 @@ void uninitvar_strncat(char *d, char *s, size_t n)
|
||||||
(void)strncat(d,s,n);
|
(void)strncat(d,s,n);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void nullPointer_strncat(char *d, char *s, size_t n)
|
||||||
|
{
|
||||||
|
// cppcheck-suppress nullPointer
|
||||||
|
(void)strncat(NULL,s,n);
|
||||||
|
// cppcheck-suppress nullPointer
|
||||||
|
(void)strncat(d,NULL,n);
|
||||||
|
// no warning is expected for
|
||||||
|
(void)strncat(d,s,n);
|
||||||
|
}
|
||||||
|
|
||||||
// errno_t strcat_s(char *restrict dest, rsize_t destsz, const char *restrict src); // since C11
|
// errno_t strcat_s(char *restrict dest, rsize_t destsz, const char *restrict src); // since C11
|
||||||
void uninitvar_strcat_s(char *Ct, size_t N, char *S)
|
void uninitvar_strcat_s(char *Ct, size_t N, char *S)
|
||||||
{
|
{
|
||||||
|
|
|
@ -1283,6 +1283,16 @@ void nullPointer_wmemcmp(const wchar_t* s1, const wchar_t* s2, size_t n)
|
||||||
(void)std::wmemcmp(s1,s2,n);
|
(void)std::wmemcmp(s1,s2,n);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void nullPointer_strncat(char *d, char *s, size_t n)
|
||||||
|
{
|
||||||
|
// cppcheck-suppress nullPointer
|
||||||
|
(void)std::strncat(NULL,s,n);
|
||||||
|
// cppcheck-suppress nullPointer
|
||||||
|
(void)std::strncat(d,NULL,n);
|
||||||
|
// no warning is expected for
|
||||||
|
(void)std::strncat(d,s,n);
|
||||||
|
}
|
||||||
|
|
||||||
void nullPointer_strncmp(const char *s1, const char *s2, size_t n)
|
void nullPointer_strncmp(const char *s1, const char *s2, size_t n)
|
||||||
{
|
{
|
||||||
// cppcheck-suppress nullPointer
|
// cppcheck-suppress nullPointer
|
||||||
|
|
Loading…
Reference in New Issue