From a9edb724f98b4aea88e32eaa29589f038009c3b2 Mon Sep 17 00:00:00 2001 From: Boris Zbarsky Date: Thu, 25 Jan 2024 22:45:34 -0500 Subject: [PATCH] Allow attribute-storage to compile even if GENERATED_CLUSTERS is not defined. (#31693) This can happen in configurations without any fixed endpoints at all (all endpoints are dynamic). --- src/app/util/attribute-storage.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/app/util/attribute-storage.cpp b/src/app/util/attribute-storage.cpp index ea4c3cc0071b80..1faf74aeba6966 100644 --- a/src/app/util/attribute-storage.cpp +++ b/src/app/util/attribute-storage.cpp @@ -123,8 +123,10 @@ constexpr const chip::EventId generatedEvents[] = GENERATED_EVENTS; constexpr const EmberAfAttributeMetadata generatedAttributes[] = GENERATED_ATTRIBUTES; #define ZAP_ATTRIBUTE_INDEX(index) (&generatedAttributes[index]) +#ifdef GENERATED_CLUSTERS constexpr const EmberAfCluster generatedClusters[] = GENERATED_CLUSTERS; #define ZAP_CLUSTER_INDEX(index) (&generatedClusters[index]) +#endif constexpr const EmberAfEndpointType generatedEmberAfEndpointTypes[] = GENERATED_ENDPOINT_TYPES; constexpr const EmberAfDeviceType fixedDeviceTypeList[] = FIXED_DEVICE_TYPES;