From a16683053fc4b6a1fe69fb0fcc02483b0c951315 Mon Sep 17 00:00:00 2001 From: Miguel Luis Date: Thu, 29 Sep 2022 11:47:07 +0200 Subject: [PATCH] Issue #1352 - Fixed uninitialized variable warning when O2 and O3 gcc compiler optimizations are used --- src/mac/LoRaMacConfirmQueue.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/mac/LoRaMacConfirmQueue.c b/src/mac/LoRaMacConfirmQueue.c index 1b05754a9..cedd18b5d 100644 --- a/src/mac/LoRaMacConfirmQueue.c +++ b/src/mac/LoRaMacConfirmQueue.c @@ -283,6 +283,8 @@ void LoRaMacConfirmQueueHandleCb( MlmeConfirm_t* mlmeConfirm ) bool readyToHandle = false; MlmeConfirmQueue_t mlmeConfirmToStore; + memset1( ( uint8_t* ) &mlmeConfirmToStore, 0, sizeof( MlmeConfirmQueue_t ) ); + for( uint8_t i = 0; i < nbElements; i++ ) { mlmeConfirm->MlmeRequest = ConfirmQueueCtx.BufferStart->Request;