From bca644de1a1057218fcf3e4646a58b7c47011593 Mon Sep 17 00:00:00 2001 From: Jamaika1 Date: Sun, 15 Sep 2024 08:35:43 +0200 Subject: [PATCH] Added integer uint32_t ``` snappy.cc:1693:28: warning: comparison of integer expressions of different signedness: 'uint32_t' {aka 'unsigned int'} and 'int' [-Wsign-compare] 1693 | if (CalculateNeeded(i) != (char_table[i] >> 11) + 1) return false; | ~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~ ``` --- snappy.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/snappy.cc b/snappy.cc index 877b65a..f53f102 100644 --- a/snappy.cc +++ b/snappy.cc @@ -1690,7 +1690,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) != (uint32_t)(char_table[i] >> 11) + 1) return false; } return true; }