From 308df19a6c0a9ce3fb37db10b47fa3aa7eb1889c Mon Sep 17 00:00:00 2001 From: Boris Zbarsky Date: Fri, 3 Feb 2023 16:37:54 -0500 Subject: [PATCH] Remove unnecessary cast from endpoint-config. (#24848) * Remove unnecessary cast from endpoint-config. The cast would have just covered up issues if any came up. This way we know our types match up. * Regenerate generated code. --- .../outputs/all-clusters-app/app-templates/endpoint_config.h | 2 +- .../tests/outputs/lighting-app/app-templates/endpoint_config.h | 2 +- src/app/zap-templates/templates/app/endpoint_config.zapt | 2 +- .../darwin/controller-clusters/zap-generated/endpoint_config.h | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/tools/zap/tests/outputs/all-clusters-app/app-templates/endpoint_config.h b/scripts/tools/zap/tests/outputs/all-clusters-app/app-templates/endpoint_config.h index b3770733b83476..4004a32947a321 100644 --- a/scripts/tools/zap/tests/outputs/all-clusters-app/app-templates/endpoint_config.h +++ b/scripts/tools/zap/tests/outputs/all-clusters-app/app-templates/endpoint_config.h @@ -1489,7 +1489,7 @@ // This is an array of EmberAfCluster structures. #define ZAP_ATTRIBUTE_INDEX(index) (&generatedAttributes[index]) -#define ZAP_GENERATED_COMMANDS_INDEX(index) ((chip::CommandId *) (&generatedCommands[index])) +#define ZAP_GENERATED_COMMANDS_INDEX(index) (&generatedCommands[index]) // Cluster function static arrays #define GENERATED_FUNCTION_ARRAYS \ diff --git a/scripts/tools/zap/tests/outputs/lighting-app/app-templates/endpoint_config.h b/scripts/tools/zap/tests/outputs/lighting-app/app-templates/endpoint_config.h index 2b26cf124fbd63..492a6faf116f7c 100644 --- a/scripts/tools/zap/tests/outputs/lighting-app/app-templates/endpoint_config.h +++ b/scripts/tools/zap/tests/outputs/lighting-app/app-templates/endpoint_config.h @@ -546,7 +546,7 @@ // This is an array of EmberAfCluster structures. #define ZAP_ATTRIBUTE_INDEX(index) (&generatedAttributes[index]) -#define ZAP_GENERATED_COMMANDS_INDEX(index) ((chip::CommandId *) (&generatedCommands[index])) +#define ZAP_GENERATED_COMMANDS_INDEX(index) (&generatedCommands[index]) // Cluster function static arrays #define GENERATED_FUNCTION_ARRAYS \ diff --git a/src/app/zap-templates/templates/app/endpoint_config.zapt b/src/app/zap-templates/templates/app/endpoint_config.zapt index 77b20560ca6ff5..3f8938766fcba2 100644 --- a/src/app/zap-templates/templates/app/endpoint_config.zapt +++ b/src/app/zap-templates/templates/app/endpoint_config.zapt @@ -37,7 +37,7 @@ // This is an array of EmberAfCluster structures. #define ZAP_ATTRIBUTE_INDEX(index) (&generatedAttributes[index]) -#define ZAP_GENERATED_COMMANDS_INDEX(index) ((chip::CommandId *) (&generatedCommands[index])) +#define ZAP_GENERATED_COMMANDS_INDEX(index) (&generatedCommands[index]) // Cluster function static arrays #define GENERATED_FUNCTION_ARRAYS {{chip_endpoint_generated_functions}} diff --git a/zzz_generated/darwin/controller-clusters/zap-generated/endpoint_config.h b/zzz_generated/darwin/controller-clusters/zap-generated/endpoint_config.h index 4729fa584a8793..84caf2ac66d2b8 100644 --- a/zzz_generated/darwin/controller-clusters/zap-generated/endpoint_config.h +++ b/zzz_generated/darwin/controller-clusters/zap-generated/endpoint_config.h @@ -69,7 +69,7 @@ // This is an array of EmberAfCluster structures. #define ZAP_ATTRIBUTE_INDEX(index) (&generatedAttributes[index]) -#define ZAP_GENERATED_COMMANDS_INDEX(index) ((chip::CommandId *) (&generatedCommands[index])) +#define ZAP_GENERATED_COMMANDS_INDEX(index) (&generatedCommands[index]) // Cluster function static arrays #define GENERATED_FUNCTION_ARRAYS