]> git.ipfire.org Git - thirdparty/ccache.git/commitdiff
Fix log printing of before/after cleanup
authorAnders F Björklund <anders.f.bjorklund@gmail.com>
Fri, 30 Mar 2018 19:23:04 +0000 (21:23 +0200)
committerJoel Rosdahl <joel@rosdahl.net>
Mon, 23 Apr 2018 19:51:15 +0000 (21:51 +0200)
Seems like MinGW doesn't have the %z (size_t) printf format
So add some %f casting variant, so that it works everywhere.

src/cleanup.c

index c6273ecdf48e8ee03b63b344a5fa174b471976d4..1fc78e27f7a57c82707f1d198f6b64ed1b507d89 100644 (file)
@@ -173,13 +173,13 @@ clean_up_dir(struct conf *conf, const char *dir, float limit_multiple)
        traverse(dir, traverse_fn);
 
        // Clean the cache.
-       cc_log("Before cleanup: %lu KiB, %zu files",
+       cc_log("Before cleanup: %lu KiB, %.0f files",
               (unsigned long)cache_size / 1024,
-              files_in_cache);
+              (float)files_in_cache);
        bool cleaned = sort_and_clean();
-       cc_log("After cleanup: %lu KiB, %zu files",
+       cc_log("After cleanup: %lu KiB, %.0f files",
               (unsigned long)cache_size / 1024,
-              files_in_cache);
+              (float)files_in_cache);
 
        if (cleaned) {
                cc_log("Cleaned up cache directory %s", dir);