diff --git a/src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc.mm b/src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc.mm index fce01e91d98b8c..5b962d84d79889 100644 --- a/src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc.mm +++ b/src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc.mm @@ -2753,12 +2753,11 @@ static void CallbackFn(void * context, uint16_t count, uint16_t * entries) CHIPApplicationLauncherApplicationLauncherListAttributeCallbackBridge * callback = reinterpret_cast(context); if (callback && callback->mQueue) { - id values[count]; + id array = [NSMutableArray arrayWithCapacity:count]; for (uint16_t i = 0; i < count; i++) { - values[i] = [NSNumber numberWithUnsignedShort:entries[i]]; + array[i] = [NSNumber numberWithUnsignedShort:entries[i]]; } - id array = [NSArray arrayWithObjects:values count:count]; dispatch_async(callback->mQueue, ^{ callback->mHandler(nil, @ { @"value" : array }); callback->Cancel(); @@ -2789,15 +2788,14 @@ static void CallbackFn(void * context, uint16_t count, _AudioOutputInfo * entrie CHIPAudioOutputAudioOutputListAttributeCallbackBridge * callback = reinterpret_cast(context); if (callback && callback->mQueue) { - id values[count]; + id array = [NSMutableArray arrayWithCapacity:count]; for (uint16_t i = 0; i < count; i++) { - values[i] = [[NSDictionary alloc] initWithObjectsAndKeys:[NSNumber numberWithUnsignedChar:entries[i].index], - @"index", [NSNumber numberWithUnsignedChar:entries[i].outputType], @"outputType", - [NSData dataWithBytes:entries[i].name.data() length:entries[i].name.size()], - @"name", nil]; + array[i] = [[NSDictionary alloc] initWithObjectsAndKeys:[NSNumber numberWithUnsignedChar:entries[i].index], + @"index", [NSNumber numberWithUnsignedChar:entries[i].outputType], @"outputType", + [NSData dataWithBytes:entries[i].name.data() length:entries[i].name.size()], + @"name", nil]; } - id array = [NSArray arrayWithObjects:values count:count]; dispatch_async(callback->mQueue, ^{ callback->mHandler(nil, @ { @"value" : array }); callback->Cancel(); @@ -2828,12 +2826,11 @@ static void CallbackFn(void * context, uint16_t count, chip::ByteSpan * entries) CHIPContentLauncherAcceptsHeaderListAttributeCallbackBridge * callback = reinterpret_cast(context); if (callback && callback->mQueue) { - id values[count]; + id array = [NSMutableArray arrayWithCapacity:count]; for (uint16_t i = 0; i < count; i++) { - values[i] = [NSData dataWithBytes:entries[i].data() length:entries[i].size()]; + array[i] = [NSData dataWithBytes:entries[i].data() length:entries[i].size()]; } - id array = [NSArray arrayWithObjects:values count:count]; dispatch_async(callback->mQueue, ^{ callback->mHandler(nil, @ { @"value" : array }); callback->Cancel(); @@ -2864,12 +2861,11 @@ static void CallbackFn(void * context, uint16_t count, uint8_t * entries) CHIPContentLauncherSupportedStreamingTypesAttributeCallbackBridge * callback = reinterpret_cast(context); if (callback && callback->mQueue) { - id values[count]; + id array = [NSMutableArray arrayWithCapacity:count]; for (uint16_t i = 0; i < count; i++) { - values[i] = [NSNumber numberWithUnsignedChar:entries[i]]; + array[i] = [NSNumber numberWithUnsignedChar:entries[i]]; } - id array = [NSArray arrayWithObjects:values count:count]; dispatch_async(callback->mQueue, ^{ callback->mHandler(nil, @ { @"value" : array }); callback->Cancel(); @@ -2899,13 +2895,12 @@ static void CallbackFn(void * context, uint16_t count, _DeviceType * entries) CHIPDescriptorDeviceListAttributeCallbackBridge * callback = reinterpret_cast(context); if (callback && callback->mQueue) { - id values[count]; + id array = [NSMutableArray arrayWithCapacity:count]; for (uint16_t i = 0; i < count; i++) { - values[i] = [[NSDictionary alloc] initWithObjectsAndKeys:[NSNumber numberWithUnsignedLong:entries[i].type], @"type", - [NSNumber numberWithUnsignedShort:entries[i].revision], @"revision", nil]; + array[i] = [[NSDictionary alloc] initWithObjectsAndKeys:[NSNumber numberWithUnsignedLong:entries[i].type], @"type", + [NSNumber numberWithUnsignedShort:entries[i].revision], @"revision", nil]; } - id array = [NSArray arrayWithObjects:values count:count]; dispatch_async(callback->mQueue, ^{ callback->mHandler(nil, @ { @"value" : array }); callback->Cancel(); @@ -2935,12 +2930,11 @@ static void CallbackFn(void * context, uint16_t count, chip::ClusterId * entries CHIPDescriptorServerListAttributeCallbackBridge * callback = reinterpret_cast(context); if (callback && callback->mQueue) { - id values[count]; + id array = [NSMutableArray arrayWithCapacity:count]; for (uint16_t i = 0; i < count; i++) { - values[i] = [NSNumber numberWithUnsignedLong:entries[i]]; + array[i] = [NSNumber numberWithUnsignedLong:entries[i]]; } - id array = [NSArray arrayWithObjects:values count:count]; dispatch_async(callback->mQueue, ^{ callback->mHandler(nil, @ { @"value" : array }); callback->Cancel(); @@ -2970,12 +2964,11 @@ static void CallbackFn(void * context, uint16_t count, chip::ClusterId * entries CHIPDescriptorClientListAttributeCallbackBridge * callback = reinterpret_cast(context); if (callback && callback->mQueue) { - id values[count]; + id array = [NSMutableArray arrayWithCapacity:count]; for (uint16_t i = 0; i < count; i++) { - values[i] = [NSNumber numberWithUnsignedLong:entries[i]]; + array[i] = [NSNumber numberWithUnsignedLong:entries[i]]; } - id array = [NSArray arrayWithObjects:values count:count]; dispatch_async(callback->mQueue, ^{ callback->mHandler(nil, @ { @"value" : array }); callback->Cancel(); @@ -3005,12 +2998,11 @@ static void CallbackFn(void * context, uint16_t count, chip::EndpointId * entrie CHIPDescriptorPartsListAttributeCallbackBridge * callback = reinterpret_cast(context); if (callback && callback->mQueue) { - id values[count]; + id array = [NSMutableArray arrayWithCapacity:count]; for (uint16_t i = 0; i < count; i++) { - values[i] = [NSNumber numberWithUnsignedShort:entries[i]]; + array[i] = [NSNumber numberWithUnsignedShort:entries[i]]; } - id array = [NSArray arrayWithObjects:values count:count]; dispatch_async(callback->mQueue, ^{ callback->mHandler(nil, @ { @"value" : array }); callback->Cancel(); @@ -3040,14 +3032,13 @@ static void CallbackFn(void * context, uint16_t count, _LabelStruct * entries) CHIPFixedLabelLabelListAttributeCallbackBridge * callback = reinterpret_cast(context); if (callback && callback->mQueue) { - id values[count]; + id array = [NSMutableArray arrayWithCapacity:count]; for (uint16_t i = 0; i < count; i++) { - values[i] = [[NSDictionary alloc] + array[i] = [[NSDictionary alloc] initWithObjectsAndKeys:[NSData dataWithBytes:entries[i].label.data() length:entries[i].label.size()], @"label", [NSData dataWithBytes:entries[i].value.data() length:entries[i].value.size()], @"value", nil]; } - id array = [NSArray arrayWithObjects:values count:count]; dispatch_async(callback->mQueue, ^{ callback->mHandler(nil, @ { @"value" : array }); callback->Cancel(); @@ -3078,14 +3069,13 @@ static void CallbackFn(void * context, uint16_t count, _BasicCommissioningInfoTy CHIPGeneralCommissioningBasicCommissioningInfoListAttributeCallbackBridge * callback = reinterpret_cast(context); if (callback && callback->mQueue) { - id values[count]; + id array = [NSMutableArray arrayWithCapacity:count]; for (uint16_t i = 0; i < count; i++) { - values[i] = [[NSDictionary alloc] + array[i] = [[NSDictionary alloc] initWithObjectsAndKeys:[NSNumber numberWithUnsignedLong:entries[i].FailSafeExpiryLengthMs], @"FailSafeExpiryLengthMs", nil]; } - id array = [NSArray arrayWithObjects:values count:count]; dispatch_async(callback->mQueue, ^{ callback->mHandler(nil, @ { @"value" : array }); callback->Cancel(); @@ -3116,9 +3106,9 @@ static void CallbackFn(void * context, uint16_t count, _NetworkInterfaceType * e CHIPGeneralDiagnosticsNetworkInterfacesAttributeCallbackBridge * callback = reinterpret_cast(context); if (callback && callback->mQueue) { - id values[count]; + id array = [NSMutableArray arrayWithCapacity:count]; for (uint16_t i = 0; i < count; i++) { - values[i] = [[NSDictionary alloc] + array[i] = [[NSDictionary alloc] initWithObjectsAndKeys:[NSData dataWithBytes:entries[i].Name.data() length:entries[i].Name.size()], @"Name", [NSNumber numberWithBool:entries[i].FabricConnected], @"FabricConnected", [NSNumber numberWithBool:entries[i].OffPremiseServicesReachableIPv4], @"OffPremiseServicesReachableIPv4", @@ -3127,7 +3117,6 @@ static void CallbackFn(void * context, uint16_t count, _NetworkInterfaceType * e @"HardwareAddress", [NSNumber numberWithUnsignedChar:entries[i].Type], @"Type", nil]; } - id array = [NSArray arrayWithObjects:values count:count]; dispatch_async(callback->mQueue, ^{ callback->mHandler(nil, @ { @"value" : array }); callback->Cancel(); @@ -3158,15 +3147,14 @@ static void CallbackFn(void * context, uint16_t count, _GroupState * entries) CHIPGroupKeyManagementGroupsAttributeCallbackBridge * callback = reinterpret_cast(context); if (callback && callback->mQueue) { - id values[count]; + id array = [NSMutableArray arrayWithCapacity:count]; for (uint16_t i = 0; i < count; i++) { - values[i] = [[NSDictionary alloc] initWithObjectsAndKeys:[NSNumber numberWithUnsignedShort:entries[i].VendorId], - @"VendorId", [NSNumber numberWithUnsignedShort:entries[i].VendorGroupId], - @"VendorGroupId", [NSNumber numberWithUnsignedShort:entries[i].GroupKeySetIndex], - @"GroupKeySetIndex", nil]; + array[i] = [[NSDictionary alloc] initWithObjectsAndKeys:[NSNumber numberWithUnsignedShort:entries[i].VendorId], + @"VendorId", [NSNumber numberWithUnsignedShort:entries[i].VendorGroupId], + @"VendorGroupId", [NSNumber numberWithUnsignedShort:entries[i].GroupKeySetIndex], + @"GroupKeySetIndex", nil]; } - id array = [NSArray arrayWithObjects:values count:count]; dispatch_async(callback->mQueue, ^{ callback->mHandler(nil, @ { @"value" : array }); callback->Cancel(); @@ -3197,9 +3185,9 @@ static void CallbackFn(void * context, uint16_t count, _GroupKey * entries) CHIPGroupKeyManagementGroupKeysAttributeCallbackBridge * callback = reinterpret_cast(context); if (callback && callback->mQueue) { - id values[count]; + id array = [NSMutableArray arrayWithCapacity:count]; for (uint16_t i = 0; i < count; i++) { - values[i] = [[NSDictionary alloc] + array[i] = [[NSDictionary alloc] initWithObjectsAndKeys:[NSNumber numberWithUnsignedShort:entries[i].VendorId], @"VendorId", [NSNumber numberWithUnsignedShort:entries[i].GroupKeyIndex], @"GroupKeyIndex", [NSData dataWithBytes:entries[i].GroupKeyRoot.data() length:entries[i].GroupKeyRoot.size()], @"GroupKeyRoot", @@ -3207,7 +3195,6 @@ static void CallbackFn(void * context, uint16_t count, _GroupKey * entries) [NSNumber numberWithUnsignedChar:entries[i].GroupKeySecurityPolicy], @"GroupKeySecurityPolicy", nil]; } - id array = [NSArray arrayWithObjects:values count:count]; dispatch_async(callback->mQueue, ^{ callback->mHandler(nil, @ { @"value" : array }); callback->Cancel(); @@ -3238,16 +3225,15 @@ static void CallbackFn(void * context, uint16_t count, _MediaInputInfo * entries CHIPMediaInputMediaInputListAttributeCallbackBridge * callback = reinterpret_cast(context); if (callback && callback->mQueue) { - id values[count]; + id array = [NSMutableArray arrayWithCapacity:count]; for (uint16_t i = 0; i < count; i++) { - values[i] = [[NSDictionary alloc] + array[i] = [[NSDictionary alloc] initWithObjectsAndKeys:[NSNumber numberWithUnsignedChar:entries[i].index], @"index", [NSNumber numberWithUnsignedChar:entries[i].inputType], @"inputType", [NSData dataWithBytes:entries[i].name.data() length:entries[i].name.size()], @"name", [NSData dataWithBytes:entries[i].description.data() length:entries[i].description.size()], @"description", nil]; } - id array = [NSArray arrayWithObjects:values count:count]; dispatch_async(callback->mQueue, ^{ callback->mHandler(nil, @ { @"value" : array }); callback->Cancel(); @@ -3278,9 +3264,9 @@ static void CallbackFn(void * context, uint16_t count, _FabricDescriptor * entri CHIPOperationalCredentialsFabricsListAttributeCallbackBridge * callback = reinterpret_cast(context); if (callback && callback->mQueue) { - id values[count]; + id array = [NSMutableArray arrayWithCapacity:count]; for (uint16_t i = 0; i < count; i++) { - values[i] = [[NSDictionary alloc] + array[i] = [[NSDictionary alloc] initWithObjectsAndKeys:[NSNumber numberWithUnsignedChar:entries[i].FabricIndex], @"FabricIndex", [NSData dataWithBytes:entries[i].RootPublicKey.data() length:entries[i].RootPublicKey.size()], @"RootPublicKey", [NSNumber numberWithUnsignedShort:entries[i].VendorId], @"VendorId", @@ -3289,7 +3275,6 @@ static void CallbackFn(void * context, uint16_t count, _FabricDescriptor * entri [NSData dataWithBytes:entries[i].Label.data() length:entries[i].Label.size()], @"Label", nil]; } - id array = [NSArray arrayWithObjects:values count:count]; dispatch_async(callback->mQueue, ^{ callback->mHandler(nil, @ { @"value" : array }); callback->Cancel(); @@ -3319,9 +3304,9 @@ static void CallbackFn(void * context, uint16_t count, _TvChannelInfo * entries) CHIPTvChannelTvChannelListAttributeCallbackBridge * callback = reinterpret_cast(context); if (callback && callback->mQueue) { - id values[count]; + id array = [NSMutableArray arrayWithCapacity:count]; for (uint16_t i = 0; i < count; i++) { - values[i] = [[NSDictionary alloc] + array[i] = [[NSDictionary alloc] initWithObjectsAndKeys:[NSNumber numberWithUnsignedShort:entries[i].majorNumber], @"majorNumber", [NSNumber numberWithUnsignedShort:entries[i].minorNumber], @"minorNumber", [NSData dataWithBytes:entries[i].name.data() length:entries[i].name.size()], @"name", @@ -3330,7 +3315,6 @@ static void CallbackFn(void * context, uint16_t count, _TvChannelInfo * entries) @"affiliateCallSign", nil]; } - id array = [NSArray arrayWithObjects:values count:count]; dispatch_async(callback->mQueue, ^{ callback->mHandler(nil, @ { @"value" : array }); callback->Cancel(); @@ -3361,14 +3345,13 @@ static void CallbackFn(void * context, uint16_t count, _NavigateTargetTargetInfo CHIPTargetNavigatorTargetNavigatorListAttributeCallbackBridge * callback = reinterpret_cast(context); if (callback && callback->mQueue) { - id values[count]; + id array = [NSMutableArray arrayWithCapacity:count]; for (uint16_t i = 0; i < count; i++) { - values[i] = [[NSDictionary alloc] + array[i] = [[NSDictionary alloc] initWithObjectsAndKeys:[NSNumber numberWithUnsignedChar:entries[i].identifier], @"identifier", [NSData dataWithBytes:entries[i].name.data() length:entries[i].name.size()], @"name", nil]; } - id array = [NSArray arrayWithObjects:values count:count]; dispatch_async(callback->mQueue, ^{ callback->mHandler(nil, @ { @"value" : array }); callback->Cancel(); @@ -3398,12 +3381,11 @@ static void CallbackFn(void * context, uint16_t count, uint8_t * entries) CHIPTestClusterListInt8uAttributeCallbackBridge * callback = reinterpret_cast(context); if (callback && callback->mQueue) { - id values[count]; + id array = [NSMutableArray arrayWithCapacity:count]; for (uint16_t i = 0; i < count; i++) { - values[i] = [NSNumber numberWithUnsignedChar:entries[i]]; + array[i] = [NSNumber numberWithUnsignedChar:entries[i]]; } - id array = [NSArray arrayWithObjects:values count:count]; dispatch_async(callback->mQueue, ^{ callback->mHandler(nil, @ { @"value" : array }); callback->Cancel(); @@ -3434,12 +3416,11 @@ static void CallbackFn(void * context, uint16_t count, chip::ByteSpan * entries) CHIPTestClusterListOctetStringAttributeCallbackBridge * callback = reinterpret_cast(context); if (callback && callback->mQueue) { - id values[count]; + id array = [NSMutableArray arrayWithCapacity:count]; for (uint16_t i = 0; i < count; i++) { - values[i] = [NSData dataWithBytes:entries[i].data() length:entries[i].size()]; + array[i] = [NSData dataWithBytes:entries[i].data() length:entries[i].size()]; } - id array = [NSArray arrayWithObjects:values count:count]; dispatch_async(callback->mQueue, ^{ callback->mHandler(nil, @ { @"value" : array }); callback->Cancel(); @@ -3470,15 +3451,14 @@ static void CallbackFn(void * context, uint16_t count, _TestListStructOctet * en CHIPTestClusterListStructOctetStringAttributeCallbackBridge * callback = reinterpret_cast(context); if (callback && callback->mQueue) { - id values[count]; + id array = [NSMutableArray arrayWithCapacity:count]; for (uint16_t i = 0; i < count; i++) { - values[i] = [[NSDictionary alloc] + array[i] = [[NSDictionary alloc] initWithObjectsAndKeys:[NSNumber numberWithUnsignedLongLong:entries[i].fabricIndex], @"fabricIndex", [NSData dataWithBytes:entries[i].operationalCert.data() length:entries[i].operationalCert.size()], @"operationalCert", nil]; } - id array = [NSArray arrayWithObjects:values count:count]; dispatch_async(callback->mQueue, ^{ callback->mHandler(nil, @ { @"value" : array }); callback->Cancel(); @@ -3509,9 +3489,9 @@ static void CallbackFn(void * context, uint16_t count, _NeighborTable * entries) CHIPThreadNetworkDiagnosticsNeighborTableListAttributeCallbackBridge * callback = reinterpret_cast(context); if (callback && callback->mQueue) { - id values[count]; + id array = [NSMutableArray arrayWithCapacity:count]; for (uint16_t i = 0; i < count; i++) { - values[i] = [[NSDictionary alloc] + array[i] = [[NSDictionary alloc] initWithObjectsAndKeys:[NSNumber numberWithUnsignedLongLong:entries[i].ExtAddress], @"ExtAddress", [NSNumber numberWithUnsignedLong:entries[i].Age], @"Age", [NSNumber numberWithUnsignedShort:entries[i].Rloc16], @"Rloc16", [NSNumber numberWithUnsignedLong:entries[i].LinkFrameCounter], @"LinkFrameCounter", @@ -3526,7 +3506,6 @@ static void CallbackFn(void * context, uint16_t count, _NeighborTable * entries) [NSNumber numberWithBool:entries[i].IsChild], @"IsChild", nil]; } - id array = [NSArray arrayWithObjects:values count:count]; dispatch_async(callback->mQueue, ^{ callback->mHandler(nil, @ { @"value" : array }); callback->Cancel(); @@ -3557,21 +3536,20 @@ static void CallbackFn(void * context, uint16_t count, _RouteTable * entries) CHIPThreadNetworkDiagnosticsRouteTableListAttributeCallbackBridge * callback = reinterpret_cast(context); if (callback && callback->mQueue) { - id values[count]; + id array = [NSMutableArray arrayWithCapacity:count]; for (uint16_t i = 0; i < count; i++) { - values[i] = [[NSDictionary alloc] - initWithObjectsAndKeys:[NSNumber numberWithUnsignedLongLong:entries[i].ExtAddress], @"ExtAddress", - [NSNumber numberWithUnsignedShort:entries[i].Rloc16], @"Rloc16", - [NSNumber numberWithUnsignedChar:entries[i].RouterId], @"RouterId", - [NSNumber numberWithUnsignedChar:entries[i].NextHop], @"NextHop", - [NSNumber numberWithUnsignedChar:entries[i].PathCost], @"PathCost", - [NSNumber numberWithUnsignedChar:entries[i].LQIIn], @"LQIIn", - [NSNumber numberWithUnsignedChar:entries[i].LQIOut], @"LQIOut", - [NSNumber numberWithUnsignedChar:entries[i].Age], @"Age", [NSNumber numberWithBool:entries[i].Allocated], - @"Allocated", [NSNumber numberWithBool:entries[i].LinkEstablished], @"LinkEstablished", nil]; + array[i] = [[NSDictionary alloc] initWithObjectsAndKeys:[NSNumber numberWithUnsignedLongLong:entries[i].ExtAddress], + @"ExtAddress", [NSNumber numberWithUnsignedShort:entries[i].Rloc16], @"Rloc16", + [NSNumber numberWithUnsignedChar:entries[i].RouterId], @"RouterId", + [NSNumber numberWithUnsignedChar:entries[i].NextHop], @"NextHop", + [NSNumber numberWithUnsignedChar:entries[i].PathCost], @"PathCost", + [NSNumber numberWithUnsignedChar:entries[i].LQIIn], @"LQIIn", + [NSNumber numberWithUnsignedChar:entries[i].LQIOut], @"LQIOut", + [NSNumber numberWithUnsignedChar:entries[i].Age], @"Age", + [NSNumber numberWithBool:entries[i].Allocated], @"Allocated", + [NSNumber numberWithBool:entries[i].LinkEstablished], @"LinkEstablished", nil]; } - id array = [NSArray arrayWithObjects:values count:count]; dispatch_async(callback->mQueue, ^{ callback->mHandler(nil, @ { @"value" : array }); callback->Cancel(); @@ -3602,14 +3580,13 @@ static void CallbackFn(void * context, uint16_t count, _SecurityPolicy * entries CHIPThreadNetworkDiagnosticsSecurityPolicyAttributeCallbackBridge * callback = reinterpret_cast(context); if (callback && callback->mQueue) { - id values[count]; + id array = [NSMutableArray arrayWithCapacity:count]; for (uint16_t i = 0; i < count; i++) { - values[i] = + array[i] = [[NSDictionary alloc] initWithObjectsAndKeys:[NSNumber numberWithUnsignedShort:entries[i].RotationTime], @"RotationTime", [NSNumber numberWithUnsignedChar:entries[i].Flags], @"Flags", nil]; } - id array = [NSArray arrayWithObjects:values count:count]; dispatch_async(callback->mQueue, ^{ callback->mHandler(nil, @ { @"value" : array }); callback->Cancel(); @@ -3640,9 +3617,9 @@ static void CallbackFn(void * context, uint16_t count, _OperationalDatasetCompon CHIPThreadNetworkDiagnosticsOperationalDatasetComponentsAttributeCallbackBridge * callback = reinterpret_cast(context); if (callback && callback->mQueue) { - id values[count]; + id array = [NSMutableArray arrayWithCapacity:count]; for (uint16_t i = 0; i < count; i++) { - values[i] = + array[i] = [[NSDictionary alloc] initWithObjectsAndKeys:[NSNumber numberWithBool:entries[i].ActiveTimestampPresent], @"ActiveTimestampPresent", [NSNumber numberWithBool:entries[i].PendingTimestampPresent], @"PendingTimestampPresent", [NSNumber numberWithBool:entries[i].MasterKeyPresent], @@ -3657,7 +3634,6 @@ static void CallbackFn(void * context, uint16_t count, _OperationalDatasetCompon [NSNumber numberWithBool:entries[i].ChannelMaskPresent], @"ChannelMaskPresent", nil]; } - id array = [NSArray arrayWithObjects:values count:count]; dispatch_async(callback->mQueue, ^{ callback->mHandler(nil, @ { @"value" : array }); callback->Cancel(); @@ -3688,12 +3664,11 @@ static void CallbackFn(void * context, uint16_t count, uint8_t * entries) CHIPThreadNetworkDiagnosticsActiveNetworkFaultsListAttributeCallbackBridge * callback = reinterpret_cast(context); if (callback && callback->mQueue) { - id values[count]; + id array = [NSMutableArray arrayWithCapacity:count]; for (uint16_t i = 0; i < count; i++) { - values[i] = [NSNumber numberWithUnsignedChar:entries[i]]; + array[i] = [NSNumber numberWithUnsignedChar:entries[i]]; } - id array = [NSArray arrayWithObjects:values count:count]; dispatch_async(callback->mQueue, ^{ callback->mHandler(nil, @ { @"value" : array }); callback->Cancel(); diff --git a/zzz_generated/controller-clusters/zap-generated/CHIPClientCallbacks.cpp b/zzz_generated/controller-clusters/zap-generated/CHIPClientCallbacks.cpp index a96d32439c5168..a76a63307a3f64 100644 --- a/zzz_generated/controller-clusters/zap-generated/CHIPClientCallbacks.cpp +++ b/zzz_generated/controller-clusters/zap-generated/CHIPClientCallbacks.cpp @@ -369,7 +369,10 @@ void ApplicationLauncherClusterApplicationLauncherListListAttributeFilter(TLV::T CHECK_MESSAGE_LENGTH_VOID(2); uint16_t count = Encoding::LittleEndian::Read16(message); +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wvla" uint16_t data[count]; +#pragma GCC diagnostic pop for (size_t i = 0; i < count; i++) { CHECK_MESSAGE_LENGTH_VOID(2); @@ -398,7 +401,10 @@ void AudioOutputClusterAudioOutputListListAttributeFilter(TLV::TLVReader * tlvDa CHECK_MESSAGE_LENGTH_VOID(2); uint16_t count = Encoding::LittleEndian::Read16(message); +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wvla" _AudioOutputInfo data[count]; +#pragma GCC diagnostic pop for (size_t i = 0; i < count; i++) { CHECK_MESSAGE_LENGTH_VOID(1); @@ -433,7 +439,10 @@ void ContentLauncherClusterAcceptsHeaderListListAttributeFilter(TLV::TLVReader * CHECK_MESSAGE_LENGTH_VOID(2); uint16_t count = Encoding::LittleEndian::Read16(message); +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wvla" chip::ByteSpan data[count]; +#pragma GCC diagnostic pop for (size_t i = 0; i < count; i++) { CHECK_STATUS_VOID(ReadByteSpan(message, messageLen, &data[i])); @@ -464,7 +473,10 @@ void ContentLauncherClusterSupportedStreamingTypesListAttributeFilter(TLV::TLVRe CHECK_MESSAGE_LENGTH_VOID(2); uint16_t count = Encoding::LittleEndian::Read16(message); +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wvla" uint8_t data[count]; +#pragma GCC diagnostic pop for (size_t i = 0; i < count; i++) { CHECK_MESSAGE_LENGTH_VOID(1); @@ -493,7 +505,10 @@ void DescriptorClusterDeviceListListAttributeFilter(TLV::TLVReader * tlvData, Ca CHECK_MESSAGE_LENGTH_VOID(2); uint16_t count = Encoding::LittleEndian::Read16(message); +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wvla" _DeviceType data[count]; +#pragma GCC diagnostic pop for (size_t i = 0; i < count; i++) { CHECK_MESSAGE_LENGTH_VOID(4); @@ -525,7 +540,10 @@ void DescriptorClusterServerListListAttributeFilter(TLV::TLVReader * tlvData, Ca CHECK_MESSAGE_LENGTH_VOID(2); uint16_t count = Encoding::LittleEndian::Read16(message); +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wvla" chip::ClusterId data[count]; +#pragma GCC diagnostic pop for (size_t i = 0; i < count; i++) { CHECK_MESSAGE_LENGTH_VOID(4); @@ -554,7 +572,10 @@ void DescriptorClusterClientListListAttributeFilter(TLV::TLVReader * tlvData, Ca CHECK_MESSAGE_LENGTH_VOID(2); uint16_t count = Encoding::LittleEndian::Read16(message); +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wvla" chip::ClusterId data[count]; +#pragma GCC diagnostic pop for (size_t i = 0; i < count; i++) { CHECK_MESSAGE_LENGTH_VOID(4); @@ -583,7 +604,10 @@ void DescriptorClusterPartsListListAttributeFilter(TLV::TLVReader * tlvData, Cal CHECK_MESSAGE_LENGTH_VOID(2); uint16_t count = Encoding::LittleEndian::Read16(message); +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wvla" chip::EndpointId data[count]; +#pragma GCC diagnostic pop for (size_t i = 0; i < count; i++) { CHECK_MESSAGE_LENGTH_VOID(2); @@ -612,7 +636,10 @@ void FixedLabelClusterLabelListListAttributeFilter(TLV::TLVReader * tlvData, Cal CHECK_MESSAGE_LENGTH_VOID(2); uint16_t count = Encoding::LittleEndian::Read16(message); +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wvla" _LabelStruct data[count]; +#pragma GCC diagnostic pop for (size_t i = 0; i < count; i++) { CHECK_STATUS_VOID(ReadByteSpan(message, 18, &data[i].label)); @@ -645,7 +672,10 @@ void GeneralCommissioningClusterBasicCommissioningInfoListListAttributeFilter(TL CHECK_MESSAGE_LENGTH_VOID(2); uint16_t count = Encoding::LittleEndian::Read16(message); +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wvla" _BasicCommissioningInfoType data[count]; +#pragma GCC diagnostic pop for (size_t i = 0; i < count; i++) { CHECK_MESSAGE_LENGTH_VOID(4); @@ -675,7 +705,10 @@ void GeneralDiagnosticsClusterNetworkInterfacesListAttributeFilter(TLV::TLVReade CHECK_MESSAGE_LENGTH_VOID(2); uint16_t count = Encoding::LittleEndian::Read16(message); +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wvla" _NetworkInterfaceType data[count]; +#pragma GCC diagnostic pop for (size_t i = 0; i < count; i++) { CHECK_STATUS_VOID(ReadByteSpan(message, 34, &data[i].Name)); @@ -719,7 +752,10 @@ void GroupKeyManagementClusterGroupsListAttributeFilter(TLV::TLVReader * tlvData CHECK_MESSAGE_LENGTH_VOID(2); uint16_t count = Encoding::LittleEndian::Read16(message); +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wvla" _GroupState data[count]; +#pragma GCC diagnostic pop for (size_t i = 0; i < count; i++) { CHECK_MESSAGE_LENGTH_VOID(2); @@ -754,7 +790,10 @@ void GroupKeyManagementClusterGroupKeysListAttributeFilter(TLV::TLVReader * tlvD CHECK_MESSAGE_LENGTH_VOID(2); uint16_t count = Encoding::LittleEndian::Read16(message); +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wvla" _GroupKey data[count]; +#pragma GCC diagnostic pop for (size_t i = 0; i < count; i++) { CHECK_MESSAGE_LENGTH_VOID(2); @@ -795,7 +834,10 @@ void MediaInputClusterMediaInputListListAttributeFilter(TLV::TLVReader * tlvData CHECK_MESSAGE_LENGTH_VOID(2); uint16_t count = Encoding::LittleEndian::Read16(message); +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wvla" _MediaInputInfo data[count]; +#pragma GCC diagnostic pop for (size_t i = 0; i < count; i++) { CHECK_MESSAGE_LENGTH_VOID(1); @@ -833,7 +875,10 @@ void OperationalCredentialsClusterFabricsListListAttributeFilter(TLV::TLVReader CHECK_MESSAGE_LENGTH_VOID(2); uint16_t count = Encoding::LittleEndian::Read16(message); +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wvla" _FabricDescriptor data[count]; +#pragma GCC diagnostic pop for (size_t i = 0; i < count; i++) { CHECK_MESSAGE_LENGTH_VOID(1); @@ -877,7 +922,10 @@ void TvChannelClusterTvChannelListListAttributeFilter(TLV::TLVReader * tlvData, CHECK_MESSAGE_LENGTH_VOID(2); uint16_t count = Encoding::LittleEndian::Read16(message); +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wvla" _TvChannelInfo data[count]; +#pragma GCC diagnostic pop for (size_t i = 0; i < count; i++) { CHECK_MESSAGE_LENGTH_VOID(2); @@ -919,7 +967,10 @@ void TargetNavigatorClusterTargetNavigatorListListAttributeFilter(TLV::TLVReader CHECK_MESSAGE_LENGTH_VOID(2); uint16_t count = Encoding::LittleEndian::Read16(message); +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wvla" _NavigateTargetTargetInfo data[count]; +#pragma GCC diagnostic pop for (size_t i = 0; i < count; i++) { CHECK_MESSAGE_LENGTH_VOID(1); @@ -951,7 +1002,10 @@ void TestClusterClusterListInt8uListAttributeFilter(TLV::TLVReader * tlvData, Ca CHECK_MESSAGE_LENGTH_VOID(2); uint16_t count = Encoding::LittleEndian::Read16(message); +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wvla" uint8_t data[count]; +#pragma GCC diagnostic pop for (size_t i = 0; i < count; i++) { CHECK_MESSAGE_LENGTH_VOID(1); @@ -980,7 +1034,10 @@ void TestClusterClusterListOctetStringListAttributeFilter(TLV::TLVReader * tlvDa CHECK_MESSAGE_LENGTH_VOID(2); uint16_t count = Encoding::LittleEndian::Read16(message); +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wvla" chip::ByteSpan data[count]; +#pragma GCC diagnostic pop for (size_t i = 0; i < count; i++) { CHECK_STATUS_VOID(ReadByteSpan(message, messageLen, &data[i])); @@ -1010,7 +1067,10 @@ void TestClusterClusterListStructOctetStringListAttributeFilter(TLV::TLVReader * CHECK_MESSAGE_LENGTH_VOID(2); uint16_t count = Encoding::LittleEndian::Read16(message); +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wvla" _TestListStructOctet data[count]; +#pragma GCC diagnostic pop for (size_t i = 0; i < count; i++) { CHECK_MESSAGE_LENGTH_VOID(8); @@ -1043,7 +1103,10 @@ void ThreadNetworkDiagnosticsClusterNeighborTableListListAttributeFilter(TLV::TL CHECK_MESSAGE_LENGTH_VOID(2); uint16_t count = Encoding::LittleEndian::Read16(message); +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wvla" _NeighborTable data[count]; +#pragma GCC diagnostic pop for (size_t i = 0; i < count; i++) { CHECK_MESSAGE_LENGTH_VOID(8); @@ -1112,7 +1175,10 @@ void ThreadNetworkDiagnosticsClusterRouteTableListListAttributeFilter(TLV::TLVRe CHECK_MESSAGE_LENGTH_VOID(2); uint16_t count = Encoding::LittleEndian::Read16(message); +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wvla" _RouteTable data[count]; +#pragma GCC diagnostic pop for (size_t i = 0; i < count; i++) { CHECK_MESSAGE_LENGTH_VOID(8); @@ -1169,7 +1235,10 @@ void ThreadNetworkDiagnosticsClusterSecurityPolicyListAttributeFilter(TLV::TLVRe CHECK_MESSAGE_LENGTH_VOID(2); uint16_t count = Encoding::LittleEndian::Read16(message); +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wvla" _SecurityPolicy data[count]; +#pragma GCC diagnostic pop for (size_t i = 0; i < count; i++) { CHECK_MESSAGE_LENGTH_VOID(2); @@ -1202,7 +1271,10 @@ void ThreadNetworkDiagnosticsClusterOperationalDatasetComponentsListAttributeFil CHECK_MESSAGE_LENGTH_VOID(2); uint16_t count = Encoding::LittleEndian::Read16(message); +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wvla" _OperationalDatasetComponents data[count]; +#pragma GCC diagnostic pop for (size_t i = 0; i < count; i++) { CHECK_MESSAGE_LENGTH_VOID(1); @@ -1266,7 +1338,10 @@ void ThreadNetworkDiagnosticsClusterActiveNetworkFaultsListListAttributeFilter(T CHECK_MESSAGE_LENGTH_VOID(2); uint16_t count = Encoding::LittleEndian::Read16(message); +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wvla" uint8_t data[count]; +#pragma GCC diagnostic pop for (size_t i = 0; i < count; i++) { CHECK_MESSAGE_LENGTH_VOID(1); diff --git a/zzz_generated/tv-app/zap-generated/CHIPClientCallbacks.cpp b/zzz_generated/tv-app/zap-generated/CHIPClientCallbacks.cpp index 55312721d0c01e..0f98252f959355 100644 --- a/zzz_generated/tv-app/zap-generated/CHIPClientCallbacks.cpp +++ b/zzz_generated/tv-app/zap-generated/CHIPClientCallbacks.cpp @@ -369,7 +369,10 @@ void GeneralCommissioningClusterBasicCommissioningInfoListListAttributeFilter(TL CHECK_MESSAGE_LENGTH_VOID(2); uint16_t count = Encoding::LittleEndian::Read16(message); +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wvla" _BasicCommissioningInfoType data[count]; +#pragma GCC diagnostic pop for (size_t i = 0; i < count; i++) { CHECK_MESSAGE_LENGTH_VOID(4); @@ -398,7 +401,10 @@ void OperationalCredentialsClusterFabricsListListAttributeFilter(TLV::TLVReader CHECK_MESSAGE_LENGTH_VOID(2); uint16_t count = Encoding::LittleEndian::Read16(message); +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wvla" _FabricDescriptor data[count]; +#pragma GCC diagnostic pop for (size_t i = 0; i < count; i++) { CHECK_MESSAGE_LENGTH_VOID(1); @@ -443,7 +449,10 @@ void OperationalCredentialsClusterTrustedRootCertificatesListAttributeFilter(TLV CHECK_MESSAGE_LENGTH_VOID(2); uint16_t count = Encoding::LittleEndian::Read16(message); +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wvla" chip::ByteSpan data[count]; +#pragma GCC diagnostic pop for (size_t i = 0; i < count; i++) { CHECK_STATUS_VOID(ReadByteSpan(message, messageLen, &data[i]));