From 5477298f5662c851754cafe3d869c3644c5a9da7 Mon Sep 17 00:00:00 2001 From: Patryk Lipinski Date: Tue, 5 Mar 2024 10:24:27 +0100 Subject: [PATCH] [nrf noup] Fix the build warning in door-lock-server This fixes the uninitialized variable warning appearing when compiling the door lock app. Signed-off-by: Patryk Lipinski --- src/app/clusters/door-lock-server/door-lock-server.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/app/clusters/door-lock-server/door-lock-server.cpp b/src/app/clusters/door-lock-server/door-lock-server.cpp index 3912b022f9..1be72dd1f8 100644 --- a/src/app/clusters/door-lock-server/door-lock-server.cpp +++ b/src/app/clusters/door-lock-server/door-lock-server.cpp @@ -3362,8 +3362,8 @@ bool DoorLockServer::HandleRemoteLockOperation(chip::app::CommandHandler * comma EndpointId endpoint = commandPath.mEndpointId; OperationErrorEnum reason = OperationErrorEnum::kUnspecified; - Nullable pinUserIdx; // Will get set to non-null if we find a user for the PIN. - Optional pinCredIdx; // Will get set to a value if the PIN is one we know about. + Nullable pinUserIdx; // Will get set to non-null if we find a user for the PIN. + Optional pinCredIdx{ Optional::Missing() }; // Will get set to a value if the PIN is one we know about. bool success = false; bool sendEvent = true;