Skip to content

Commit a6f87e6

Browse files
committed
std.cfg: Added more test for strcmp().
1 parent e06169c commit a6f87e6

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

test/cfg/std.c

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3252,6 +3252,15 @@ void uninitvar_wcschr(void)
32523252
(void)wcschr(cs,c);
32533253
}
32543254

3255+
void nullPointer_strcmp(char *s1, char *s2)
3256+
{
3257+
// cppcheck-suppress nullPointer
3258+
(void)strcmp(NULL,s2);
3259+
// cppcheck-suppress nullPointer
3260+
(void)strcmp(s1,NULL);
3261+
(void)strcmp(s1,s2);
3262+
}
3263+
32553264
void uninitvar_strcmp(char *s1, char *s2)
32563265
{
32573266
char *str1;

0 commit comments

Comments
 (0)