From e5a1f845823c5830a5a91d9c074d3a0ec1ff77b9 Mon Sep 17 00:00:00 2001 From: John Sully Date: Thu, 16 Apr 2020 20:01:13 -0400 Subject: [PATCH] Fix warning in cluster.cpp Former-commit-id: e5e33f8cb7b4c928884a934184cbf81b916b3c03 --- src/cluster.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/cluster.cpp b/src/cluster.cpp index 181516437..aa366c6ef 100644 --- a/src/cluster.cpp +++ b/src/cluster.cpp @@ -4246,7 +4246,7 @@ void clusterReplyMultiBulkSlots(client *c) { static_assert((CLUSTER_SLOTS % (sizeof(uint32_t)*8)) == 0, "code below assumes the bitfield is a multiple of sizeof(unsinged)"); - for (unsigned iw = 0; iw < (CLUSTER_SLOTS/sizeof(uint32_t)/8); ++iw) + for (int iw = 0; iw < (CLUSTER_SLOTS/(int)sizeof(uint32_t)/8); ++iw) { uint32_t wordCur = reinterpret_cast(node->slots)[iw]; if (iw != ((CLUSTER_SLOTS/sizeof(uint32_t)/8)-1)) @@ -4259,7 +4259,7 @@ void clusterReplyMultiBulkSlots(client *c) { unsigned ibitStartLoop = iw*sizeof(uint32_t)*8; - for (unsigned j = ibitStartLoop; j < (iw+1)*sizeof(uint32_t)*8; j++) { + for (int j = ibitStartLoop; j < (iw+1)*(int)sizeof(uint32_t)*8; j++) { int i; int bit = (int)(wordCur & 1); wordCur >>= 1;