]> git.ipfire.org Git - thirdparty/ccache.git/commitdiff
Fix most warnings from cppcheck 1.72
authorJoel Rosdahl <joel@rosdahl.net>
Sun, 4 Feb 2018 09:40:04 +0000 (10:40 +0100)
committerJoel Rosdahl <joel@rosdahl.net>
Sun, 4 Feb 2018 09:40:04 +0000 (10:40 +0100)
cppcheck-suppressions.txt
dev.mk.in
execute.c
lockfile.c

index 98310e241095a8af97d7562dfba5680822339367..6b1ce7f6e8f5a62c46507bdaed600683c207e4f4 100644 (file)
@@ -1,3 +1,3 @@
 ConfigurationNotChecked
 missingIncludeSystem
-unusedFunction:test/test_*
+unusedFunction:unittest/test_*
index 3254bd5a7415cb3a5a9a0b896aa7ad4051d041e4..6c348701efab6448bc871277d029f966c41a9513 100644 (file)
--- a/dev.mk.in
+++ b/dev.mk.in
@@ -157,7 +157,7 @@ check-syntax:
 .PHONY: cppcheck
 cppcheck:
        $(CPPCHECK) --suppressions-list=$(CPPCHECK_SUPPRESSIONS) \
-         --inline-suppr -q --enable=all \
+         --inline-suppr -q --enable=all --force \
          $(non_3pp_sources) main.c $(test_sources)
 
 .PHONY: uncrustify
index da3e6f09b8328655bc9d7d11e6ed122b10c0ba43..6579b3026010d9597d755bc4ead55057e166ebdd 100644 (file)
--- a/execute.c
+++ b/execute.c
@@ -79,7 +79,6 @@ win32argvtos(char *prefix, char **argv)
                }
                *ptr++ = '"';
                *ptr++ = ' ';
-               // cppcheck-suppress unreadVariable
        } while ((arg = argv[i++]));
        ptr[-1] = '\0';
 
index ce3dcf4aaa38d854d0b3287d8ae7ee1f4cc56ef6..9d1a49db2f3d499422d571853d9bed4e270ef0ff 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2010-2016 Joel Rosdahl
+// Copyright (C) 2010-2018 Joel Rosdahl
 //
 // This program is free software; you can redistribute it and/or modify it
 // under the terms of the GNU General Public License as published by the Free
@@ -119,7 +119,6 @@ lockfile_acquire(const char *path, unsigned staleness_limit)
                }
                free(content);
                content = x_readlink(lockfile);
-               // cppcheck-suppress nullPointer - false positive
                if (!content) {
                        if (errno == ENOENT) {
                                // The symlink was removed after the symlink() call above, so retry