Fix warning in cluster.cpp

Former-commit-id: e5e33f8cb7b4c928884a934184cbf81b916b3c03
This commit is contained in:
John Sully 2020-04-16 20:01:13 -04:00
parent 158868ed92
commit e5a1f84582

View File

@ -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)"); 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<uint32_t*>(node->slots)[iw]; uint32_t wordCur = reinterpret_cast<uint32_t*>(node->slots)[iw];
if (iw != ((CLUSTER_SLOTS/sizeof(uint32_t)/8)-1)) if (iw != ((CLUSTER_SLOTS/sizeof(uint32_t)/8)-1))
@ -4259,7 +4259,7 @@ void clusterReplyMultiBulkSlots(client *c) {
unsigned ibitStartLoop = iw*sizeof(uint32_t)*8; 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 i;
int bit = (int)(wordCur & 1); int bit = (int)(wordCur & 1);
wordCur >>= 1; wordCur >>= 1;