From 9742c1e2aed70e208e3074d90b6b5e0a7a829f9e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Marjam=C3=A4ki?= Date: Fri, 14 Dec 2018 13:51:03 +0100 Subject: [PATCH] make checkcfg: Try to fix inline suppressions --- test/cfg/std.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/test/cfg/std.c b/test/cfg/std.c index bd9184e82..08adb2c11 100644 --- a/test/cfg/std.c +++ b/test/cfg/std.c @@ -118,11 +118,9 @@ void nullpointer(int value) fp = 0; // No FP fflush(0); - // No FP - // cppcheck-suppress redundantAssignment fp = freopen(0,"abc",stdin); fclose(fp); - fp = 0; + fp = NULL; // cppcheck-suppress nullPointer fputc(0,0); // cppcheck-suppress nullPointer @@ -249,14 +247,12 @@ void nullpointer(int value) void nullpointerMemchr1(char *p, char *s) { - // cppcheck-suppress uselessAssignmentPtrArg p = memchr(s, 'p', strlen(s)); (void)p; } void nullpointerMemchr2(char *p, char *s) { - // cppcheck-suppress uselessAssignmentPtrArg p = memchr(s, 0, strlen(s)); (void)p; } @@ -265,7 +261,6 @@ void nullPointer_memchr(char *p) { char *s = 0; // cppcheck-suppress nullPointer - // cppcheck-suppress uselessAssignmentPtrArg p = memchr(s, 0, strlen(s)); (void)p; }