[lint] explicitly initialize failedAddresses (#9622)

Compiling with GCC 13.2.0, got the maybe-uninitialized error. This
commit fixes it by initializing the array.
This commit is contained in:
Yakun Xu
2023-11-20 15:22:14 -08:00
committed by GitHub
parent 6f3b4317d6
commit beea7bac68
+2 -2
View File
@@ -351,7 +351,7 @@ void MlrManager::HandleRegisterMulticastListenersResponse(otMessage *a
uint8_t status;
Error error;
Ip6::Address failedAddresses[Ip6AddressesTlv::kMaxAddresses];
Ip6::Address failedAddresses[Ip6AddressesTlv::kMaxAddresses]{};
uint8_t failedAddressNum = 0;
Callback<otIp6RegisterMulticastListenersCallback> callbackCopy = mRegisterMulticastListenersCallback;
@@ -447,7 +447,7 @@ void MlrManager::HandleMulticastListenerRegistrationResponse(Coap::Message
uint8_t status;
Error error;
Ip6::Address failedAddresses[Ip6AddressesTlv::kMaxAddresses];
Ip6::Address failedAddresses[Ip6AddressesTlv::kMaxAddresses]{};
uint8_t failedAddressNum = 0;
error = ParseMulticastListenerRegistrationResponse(aResult, aMessage, status, failedAddresses, failedAddressNum);