From 816ecc97ecd2ab4f6121dd25dde89d72f415c873 Mon Sep 17 00:00:00 2001 From: Arkadiusz Bokowy Date: Fri, 28 Jul 2023 16:09:14 +0200 Subject: [PATCH] Fix note message from gcc about uninitialized member (#28366) After change to c++17, on Tizen, we've got a note message from gcc about uninitialized member of ChipError class in a lambda function. This is a false positive report, but by initializing CHIP_ERROR variable we can get rid of it and get a clean build once again. --- .../clusters/access-control-server/access-control-server.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/clusters/access-control-server/access-control-server.cpp b/src/app/clusters/access-control-server/access-control-server.cpp index 3d73bd69b37589..81e3f5f1b92157 100644 --- a/src/app/clusters/access-control-server/access-control-server.cpp +++ b/src/app/clusters/access-control-server/access-control-server.cpp @@ -177,7 +177,7 @@ CHIP_ERROR AccessControlAttribute::ReadAcl(AttributeValueEncoder & aEncoder) { auto fabric = info.GetFabricIndex(); ReturnErrorOnFailure(GetAccessControl().Entries(fabric, iterator)); - CHIP_ERROR err; + CHIP_ERROR err = CHIP_NO_ERROR; while ((err = iterator.Next(entry)) == CHIP_NO_ERROR) { ReturnErrorOnFailure(encoder.Encode(encodableEntry));