From 35bb0027d0b6d2b1b2e54a289bb3e3f56def57d0 Mon Sep 17 00:00:00 2001 From: Jonathan Hui Date: Fri, 20 Mar 2020 14:49:54 -0700 Subject: [PATCH] [network-data] avoid comparison of narrow type with wide type in loop (#4724) --- src/core/thread/network_data_leader_ftd.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/core/thread/network_data_leader_ftd.cpp b/src/core/thread/network_data_leader_ftd.cpp index 7c6f8423f..cedf89957 100644 --- a/src/core/thread/network_data_leader_ftd.cpp +++ b/src/core/thread/network_data_leader_ftd.cpp @@ -309,7 +309,6 @@ void Leader::SendCommissioningGetResponse(const Coap::Message & aRequest, { otError error = OT_ERROR_NONE; Coap::Message *message; - uint8_t index; uint8_t * data = NULL; uint8_t length = 0; @@ -337,7 +336,7 @@ void Leader::SendCommissioningGetResponse(const Coap::Message & aRequest, } else { - for (index = 0; index < aLength; index++) + for (uint16_t index = 0; index < aLength; index++) { uint8_t type;