From e19c1adcf2fbe3ed7c2b3e4d288edf5c727cb252 Mon Sep 17 00:00:00 2001 From: Marc Lepage Date: Mon, 6 Dec 2021 20:52:07 -0500 Subject: [PATCH] Add missing variable definitions These static constexpr member variables were declared but not defined. In C++14 and lower, the definitions are required. Otherwise, undefined reference ensues. C++17 handles this but Matter is still using C++14. Not sure why this was working before... --- .../all-clusters-common/src/bridged-actions-stub.cpp | 2 ++ src/app/clusters/descriptor/descriptor.cpp | 2 ++ 2 files changed, 4 insertions(+) diff --git a/examples/all-clusters-app/all-clusters-common/src/bridged-actions-stub.cpp b/examples/all-clusters-app/all-clusters-common/src/bridged-actions-stub.cpp index 85fa653f256dac..caaad460a616b3 100644 --- a/examples/all-clusters-app/all-clusters-common/src/bridged-actions-stub.cpp +++ b/examples/all-clusters-app/all-clusters-common/src/bridged-actions-stub.cpp @@ -48,6 +48,8 @@ class BridgedActionsAttrAccess : public AttributeAccessInterface CHIP_ERROR ReadClusterRevision(EndpointId endpoint, AttributeValueEncoder & aEncoder); }; +constexpr uint16_t BridgedActionsAttrAccess::ClusterRevision; + CHIP_ERROR BridgedActionsAttrAccess::ReadActionListAttribute(EndpointId endpoint, AttributeValueEncoder & aEncoder) { // Just return an empty list diff --git a/src/app/clusters/descriptor/descriptor.cpp b/src/app/clusters/descriptor/descriptor.cpp index 2e87bf61519c5f..62dffe0331ec78 100644 --- a/src/app/clusters/descriptor/descriptor.cpp +++ b/src/app/clusters/descriptor/descriptor.cpp @@ -53,6 +53,8 @@ class DescriptorAttrAccess : public AttributeAccessInterface CHIP_ERROR ReadClusterRevision(EndpointId endpoint, AttributeValueEncoder & aEncoder); }; +constexpr uint16_t DescriptorAttrAccess::ClusterRevision; + CHIP_ERROR DescriptorAttrAccess::ReadPartsAttribute(EndpointId endpoint, AttributeValueEncoder & aEncoder) { CHIP_ERROR err = CHIP_NO_ERROR;