From 7ae2c1bf1dcc95f82fad42a4f606c5d983ce03bc Mon Sep 17 00:00:00 2001 From: Andrei Litvin Date: Wed, 2 Oct 2024 13:54:53 -0400 Subject: [PATCH] Fix cast --- .../codegen-data-model-provider/CodegenDataModelProvider.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/app/codegen-data-model-provider/CodegenDataModelProvider.cpp b/src/app/codegen-data-model-provider/CodegenDataModelProvider.cpp index 31a7523462e5b0..3fa1c3b4324b0c 100644 --- a/src/app/codegen-data-model-provider/CodegenDataModelProvider.cpp +++ b/src/app/codegen-data-model-provider/CodegenDataModelProvider.cpp @@ -338,7 +338,8 @@ unsigned FindNextDeviceTypeIndex(Span types, const Data } } - return types.size(); + // cast should be safe as we know we do not have that many types + return static_cast(types.size()); } const ConcreteCommandPath kInvalidCommandPath(kInvalidEndpointId, kInvalidClusterId, kInvalidCommandId);