]> git.ipfire.org Git - thirdparty/ccache.git/commitdiff
Fix “clang analyze” false positive
authorJoel Rosdahl <joel@rosdahl.net>
Sun, 19 Aug 2018 06:50:19 +0000 (08:50 +0200)
committerJoel Rosdahl <joel@rosdahl.net>
Sun, 19 Aug 2018 06:50:19 +0000 (08:50 +0200)
src/ccache.c

index e3b8886ff03c22dd25f31e9980cd71fcac5b6fd3..f363e948a6a247b106530c4935ff122a13dcd2e1 100644 (file)
@@ -781,10 +781,7 @@ process_preprocessed_file(struct mdfour *hash, const char *path, bool pump)
                included_files = create_hashtable(1000, hash_from_string, strings_equal);
        }
 
-       char *cwd = NULL;
-       if (!conf->hash_dir) {
-               cwd = gnu_getcwd();
-       }
+       char *cwd = gnu_getcwd();
 
        // Bytes between p and q are pending to be hashed.
        char *p = data;