From 5a8efdfedb038f8b0b081ac652b88c45abc6ea22 Mon Sep 17 00:00:00 2001 From: Joel Rosdahl Date: Sun, 4 Oct 2015 13:56:22 +0200 Subject: [PATCH] Use correct data types for stats_set_sizes parameters --- NEWS.txt | 3 +++ ccache.h | 2 +- stats.c | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/NEWS.txt b/NEWS.txt index 7d21063f5..7687a962d 100644 --- a/NEWS.txt +++ b/NEWS.txt @@ -21,6 +21,9 @@ Bug fixes - The correct compression level is now used if compression is requested. +- Fixed a bug where cache cleanup could be run too early for caches larger than + 64 GiB on 32-bit systems. + ccache 3.2.3 ------------ diff --git a/ccache.h b/ccache.h index ef18b25cb..0015c5019 100644 --- a/ccache.h +++ b/ccache.h @@ -186,7 +186,7 @@ void stats_summary(struct conf *conf); void stats_update_size(uint64_t size, unsigned files); void stats_get_obsolete_limits(const char *dir, unsigned *maxfiles, uint64_t *maxsize); -void stats_set_sizes(const char *dir, size_t num_files, size_t total_size); +void stats_set_sizes(const char *dir, unsigned num_files, uint64_t total_size); void stats_read(const char *path, struct counters *counters); void stats_write(const char *path, struct counters *counters); diff --git a/stats.c b/stats.c index d6f428eea..2d35ec9e8 100644 --- a/stats.c +++ b/stats.c @@ -391,7 +391,7 @@ stats_get_obsolete_limits(const char *dir, unsigned *maxfiles, /* set the per directory sizes */ void -stats_set_sizes(const char *dir, size_t num_files, size_t total_size) +stats_set_sizes(const char *dir, unsigned num_files, uint64_t total_size) { struct counters *counters = counters_init(STATS_END); char *statsfile; -- 2.47.2