]> git.ipfire.org Git - thirdparty/squid.git/commit
Fix clang-6.0 build on FreeBSD 12 [-Wformat] (#577)
authorFrancesco Chemolli <kinkie@squid-cache.org>
Sat, 28 Mar 2020 14:09:19 +0000 (14:09 +0000)
committerSquid Anubis <squid-anubis@squid-cache.org>
Sat, 28 Mar 2020 21:51:19 +0000 (21:51 +0000)
commiteba422fc4bac2ca3a4232d78ca039cbf680aec4b
tree1ccdc6d5fc6f21f806f3e8a543199f22498ec469
parent3a8df7e95c02f074c624477180804185d8c77ee4
Fix clang-6.0 build on FreeBSD 12 [-Wformat] (#577)

Cast and print std::chrono:nanoseconds::count() as intmax_t because its
actual type might be larger than the 64 bytes expected by %PRId64.

The problem was not, technically, specific to clang or FreeBSD.

The error message says "long" because %PRId64 is %ld on platforms where
"long" is 64 bits:

    format specifies type 'long' but the argument has type [...]
    'long long' [-Wformat]
src/cache_cf.cc