]> git.ipfire.org Git - thirdparty/ccache.git/commitdiff
Use ubuntu-18.04 instead of ubuntu-20.04 for Clang-Tidy
authorJoel Rosdahl <joel@rosdahl.net>
Mon, 28 Sep 2020 12:56:43 +0000 (14:56 +0200)
committerJoel Rosdahl <joel@rosdahl.net>
Mon, 28 Sep 2020 13:09:34 +0000 (15:09 +0200)
The ubuntu-20.04 VM has intermittent build errors that look like this:

  sudo apt-get install libzstd-dev clang-tidy
  [...]
  The following packages have unmet dependencies:
   clang-tidy : Depends: clang-tidy-10 (>= 10~) but it is not going to be installed
  E: Unable to correct problems, you have held broken packages.

Clang-Tidy 9 also found “function ... has a definition with different
parameter names” warnings that needed to be fixed as part of this.

As discussed in #670.

.github/workflows/build.yaml
src/Util.cpp
src/hashutil.cpp

index 12fa9770830d787042296dc72adb284f58f5fb6c..a6c89e3190ac261d6b4033f3e09b01b429bf0170 100644 (file)
@@ -152,7 +152,7 @@ jobs:
             apt_get: libzstd1-dev asciidoc xsltproc
 
           - name: Clang-Tidy
-            os: ubuntu-20.04
+            os: ubuntu-18.04
             CC: clang
             CXX: clang++
             RUN_TESTS: 0
index 24e4b4f283118a19c3045ca785ae5a6688d244b6..79350729057b7542332921afe34ab5e786595cbb 100644 (file)
@@ -496,14 +496,14 @@ fallocate(int fd, long new_size)
 
 void
 for_each_level_1_subdir(const std::string& cache_dir,
-                        const SubdirVisitor& subdir_visitor,
+                        const SubdirVisitor& visitor,
                         const ProgressReceiver& progress_receiver)
 {
   for (int i = 0; i <= 0xF; i++) {
     double progress = 1.0 * i / 16;
     progress_receiver(progress);
     std::string subdir_path = fmt::format("{}/{:x}", cache_dir, i);
-    subdir_visitor(subdir_path, [&](double inner_progress) {
+    visitor(subdir_path, [&](double inner_progress) {
       progress_receiver(progress + inner_progress / 16);
     });
   }
index 1ecc3ab4027ce116205e49245897f901e5c1e3bb..1b54561bd8c61dbba27636d3e05103f0e4a684cd 100644 (file)
@@ -506,10 +506,10 @@ hash_command_output(Hash& hash,
 
 bool
 hash_multicommand_output(Hash& hash,
-                         const std::string& commands,
+                         const std::string& command,
                          const std::string& compiler)
 {
-  for (const std::string& cmd : Util::split_into_strings(commands, ";")) {
+  for (const std::string& cmd : Util::split_into_strings(command, ";")) {
     if (!hash_command_output(hash, cmd, compiler)) {
       return false;
     }