From: Joel Rosdahl Date: Wed, 9 Nov 2022 20:02:19 +0000 (+0100) Subject: refactor: Remove empty if clause X-Git-Tag: v4.7.4~18 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fb7ce2f8dd415461439683939da2e3cb5bebdebc;p=thirdparty%2Fccache.git refactor: Remove empty if clause This is to please CodeQL's "Futile condition" check. --- diff --git a/src/ccache.cpp b/src/ccache.cpp index 20ce2e2a7..c063a58fe 100644 --- a/src/ccache.cpp +++ b/src/ccache.cpp @@ -166,10 +166,11 @@ prepare_debug_path(const std::string& debug_dir, auto prefix = debug_dir.empty() ? output_obj : debug_dir + util::to_absolute_path_no_drive(output_obj); - if (!Util::create_dir(Util::dir_name(prefix))) { - // Ignore since we can't handle an error in another way in this context. The - // caller takes care of logging when trying to open the path for writing. - } + + // Ignore any error from create_dir since we can't handle an error in another + // way in this context. The caller takes care of logging when trying to open + // the path for writing. + Util::create_dir(Util::dir_name(prefix)); char timestamp[100]; const auto tm = Util::localtime(time_of_invocation);