From 665b11ceb28a333e5cbc8cc138cafd3577c44004 Mon Sep 17 00:00:00 2001 From: Michael Spang Date: Fri, 29 Apr 2022 02:23:22 -0400 Subject: [PATCH] Fix clang warnings -Wmissing-braces (#17867) ../../third_party/connectedhomeip/src/platform/nxp/k32w/k32w0/BLEManagerImpl.cpp:789:63: error: suggest braces around initialization of subobject [-Werror,-Wmissing-braces] gapAdStructure_t adv_data[BLEKW_ADV_MAX_NO] = { 0 }; ^ {} ../../third_party/connectedhomeip/src/platform/nxp/k32w/k32w0/BLEManagerImpl.cpp:790:63: error: suggest braces around initialization of subobject [-Werror,-Wmissing-braces] gapAdStructure_t scan_rsp_data[BLEKW_SCAN_RSP_MAX_NO] = { 0 }; ^ {} 2 errors generated. --- src/platform/nxp/k32w/k32w0/BLEManagerImpl.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/platform/nxp/k32w/k32w0/BLEManagerImpl.cpp b/src/platform/nxp/k32w/k32w0/BLEManagerImpl.cpp index 06f35303f42975..bba089c98572b8 100644 --- a/src/platform/nxp/k32w/k32w0/BLEManagerImpl.cpp +++ b/src/platform/nxp/k32w/k32w0/BLEManagerImpl.cpp @@ -786,8 +786,8 @@ CHIP_ERROR BLEManagerImpl::ConfigureAdvertisingData(void) uint16_t discriminator; uint16_t advInterval = 0; gapAdvertisingData_t adv = { 0 }; - gapAdStructure_t adv_data[BLEKW_ADV_MAX_NO] = { 0 }; - gapAdStructure_t scan_rsp_data[BLEKW_SCAN_RSP_MAX_NO] = { 0 }; + gapAdStructure_t adv_data[BLEKW_ADV_MAX_NO] = { { 0 } }; + gapAdStructure_t scan_rsp_data[BLEKW_SCAN_RSP_MAX_NO] = { { 0 } }; uint8_t advPayload[BLEKW_MAX_ADV_DATA_LEN] = { 0 }; gapScanResponseData_t scanRsp = { 0 }; gapAdvertisingParameters_t adv_params = { 0 };