posix.cfg: Ensure null pointer input is correctly handled for strncasecmp().
This commit is contained in:
parent
f3fc5892e1
commit
a8a821a9c7
|
@ -216,6 +216,16 @@ char * overlappingWriteFunction_stpcpy(char *src, char *dest)
|
||||||
return stpcpy(src, src);
|
return stpcpy(src, src);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int nullPointer_strncasecmp(char *a, char *b, size_t n)
|
||||||
|
{
|
||||||
|
// No warning shall be shown:
|
||||||
|
(void) strncasecmp(a, b, n);
|
||||||
|
// cppcheck-suppress nullPointer
|
||||||
|
(void) strncasecmp(a, NULL, n);
|
||||||
|
// cppcheck-suppress nullPointer
|
||||||
|
return strncasecmp(NULL, b, n);
|
||||||
|
}
|
||||||
|
|
||||||
char * nullPointer_stpcpy(char *src, char *dest)
|
char * nullPointer_stpcpy(char *src, char *dest)
|
||||||
{
|
{
|
||||||
// No warning shall be shown:
|
// No warning shall be shown:
|
||||||
|
|
Loading…
Reference in New Issue