From f04546b7d9c1d22b5b259a4fc671351424d56efa Mon Sep 17 00:00:00 2001 From: libas zhang Date: Fri, 10 Jun 2022 10:20:21 +0800 Subject: [PATCH] Fix compliation for -Wsign-compare --- snappy.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/snappy.cc b/snappy.cc index 30505ad..c62ade4 100644 --- a/snappy.cc +++ b/snappy.cc @@ -1390,7 +1390,7 @@ constexpr uint32_t CalculateNeeded(uint8_t tag) { #if __cplusplus >= 201402L constexpr bool VerifyCalculateNeeded() { for (int i = 0; i < 1; i++) { - if (CalculateNeeded(i) != (char_table[i] >> 11) + 1) return false; + if (CalculateNeeded(i) != static_cast((char_table[i] >> 11) + 1)) return false; } return true; }