]>
git.ipfire.org Git - thirdparty/ccache.git/commit
fix: Fix sign-compare warning src/InodeCache.cpp on FreeBSD (#1331)
As on FreeBSD 13.2 statfs.f_bavail is signed, InodeCache.cpp cannot be compiled
but gets a sign-compare warning:
src/InodeCache.cpp:409:30: error: comparison of integers of different signs:
'long' and 'unsigned long' [-Werror,-Wsign-compare]
if (buf.f_bavail * 512 < k_min_fs_mib_left * 1024 * 1024) {
~~~~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
The problem is avoided by using static_cast to uint64_t.