diff --git a/src/util/cache.cpp b/src/util/cache.cpp index 021efc19b5e..21c699fb422 100644 --- a/src/util/cache.cpp +++ b/src/util/cache.cpp @@ -15,10 +15,10 @@ cache_key_t cacheKeyFromMessageDigest(const QByteArray& messageDigest) { // SP 800-107 // 5 Hash function Usage // 5.1 Truncated Message Digest - const auto significantByteCount = math_min( - messageDigest.size(), - static_cast(sizeof(cache_key_t))); - for (auto i = 0; i < significantByteCount; ++i) { + const size_t significantByteCount = math_min( + static_cast(messageDigest.size()), + sizeof(cache_key_t)); + for (size_t i = 0; i < significantByteCount; ++i) { // Only 8 bits are relevant and we don't want the sign // extension of a (signed) char during the conversion. const cache_key_t nextByte =