summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoel Rosdahl <joel@rosdahl.net>2022-11-09 21:02:19 +0100
committerJoel Rosdahl <joel@rosdahl.net>2022-11-10 13:20:26 +0100
commitfb7ce2f8dd415461439683939da2e3cb5bebdebc (patch)
tree1eb8d3f156b1e2cc1f0fac6f3029d6b2a0565322
parentb35ce0b9bb27bcc7fe961540ebcf26414790be58 (diff)
downloadccache-fb7ce2f8dd415461439683939da2e3cb5bebdebc.tar.gz
refactor: Remove empty if clause
This is to please CodeQL's "Futile condition" check.
-rw-r--r--src/ccache.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/ccache.cpp b/src/ccache.cpp
index 20ce2e2a..c063a58f 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);