diff --git a/src/app/util/attribute-storage.cpp b/src/app/util/attribute-storage.cpp index 1d7b65e802735c..a3803a8cfbd58c 100644 --- a/src/app/util/attribute-storage.cpp +++ b/src/app/util/attribute-storage.cpp @@ -107,6 +107,9 @@ void emberAfEndpointConfigure(void) { uint16_t ep; + static_assert(FIXED_ENDPOINT_COUNT <= std::numeric_limits::max(), + "FIXED_ENDPOINT_COUNT must not exceed the size of the endpoint data type"); + #if !defined(EMBER_SCRIPTED_TEST) uint16_t fixedEndpoints[] = FIXED_ENDPOINT_ARRAY; uint16_t fixedDeviceTypeListLengths[] = FIXED_DEVICE_TYPE_LENGTHS;