From: Joel Rosdahl Date: Sun, 19 Aug 2018 06:50:19 +0000 (+0200) Subject: Fix “clang analyze” false positive X-Git-Tag: v3.5~42 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6bf4382fefc32ee0c213a2e1671ea3fc6311c70a;p=thirdparty%2Fccache.git Fix “clang analyze” false positive --- diff --git a/src/ccache.c b/src/ccache.c index e3b8886ff..f363e948a 100644 --- a/src/ccache.c +++ b/src/ccache.c @@ -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;