]> 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)
committerAmos Jeffries <yadij@users.noreply.github.com>
Mon, 13 Apr 2020 13:53:58 +0000 (01:53 +1200)
commitbcfd5a732c468da12498c2a229feba6bef0c3ea7
tree9ea0b0cda8c17feec06dac5149d08af8d78746da
parenta3ace74eef9de8071e503bf552ba442bb146dffc
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