From 4e37be204dc302d18b25163bb511f56c76131ec2 Mon Sep 17 00:00:00 2001 From: Kuba Laguna Date: Tue, 11 Feb 2025 12:09:12 +0100 Subject: [PATCH] Fix nested designators. Fixes "error: nested designators are a C99 extension [-Werror,-Wc99-designator]". --- .../EndpointSecurity/Serializers/BasicStringTest.mm | 10 +++++----- .../Logs/EndpointSecurity/Serializers/ProtobufTest.mm | 8 ++++---- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/Source/santad/Logs/EndpointSecurity/Serializers/BasicStringTest.mm b/Source/santad/Logs/EndpointSecurity/Serializers/BasicStringTest.mm index 89be3867..3dcff32a 100644 --- a/Source/santad/Logs/EndpointSecurity/Serializers/BasicStringTest.mm +++ b/Source/santad/Logs/EndpointSecurity/Serializers/BasicStringTest.mm @@ -575,7 +575,7 @@ - (void)testSerializeMessageAuthenticationOD { es_event_authentication_t auth = { .success = true, .type = ES_AUTHENTICATION_TYPE_OD, - .data.od = &od, + .data = {.od = &od}, }; esMsg.event.authentication = &auth; @@ -635,7 +635,7 @@ - (void)testSerializeMessageAuthenticationTouchID { .instigator = &instigatorProc, .touchid_mode = ES_TOUCHID_MODE_VERIFICATION, .has_uid = true, - .uid.uid = NOBODY_UID, + .uid = {.uid = NOBODY_UID}, #if HAVE_MACOS_15 .instigator_token = MakeAuditToken(654, 321), #endif @@ -644,7 +644,7 @@ - (void)testSerializeMessageAuthenticationTouchID { es_event_authentication_t auth = { .success = true, .type = ES_AUTHENTICATION_TYPE_TOUCHID, - .data.touchid = &touchid, + .data = {.touchid = &touchid}, }; esMsg.event.authentication = &auth; @@ -710,7 +710,7 @@ - (void)testSerializeMessageAuthenticationToken { es_event_authentication_t auth = { .success = true, .type = ES_AUTHENTICATION_TYPE_TOKEN, - .data.token = &token, + .data = {.token = &token}, }; esMsg.event.authentication = &auth; @@ -781,7 +781,7 @@ - (void)testSerializeMessageAuthenticationAutoUnlock { es_event_authentication_t auth = { .success = true, .type = ES_AUTHENTICATION_TYPE_AUTO_UNLOCK, - .data.auto_unlock = &auto_unlock, + .data = {.auto_unlock = &auto_unlock}, }; esMsg.event.authentication = &auth; diff --git a/Source/santad/Logs/EndpointSecurity/Serializers/ProtobufTest.mm b/Source/santad/Logs/EndpointSecurity/Serializers/ProtobufTest.mm index 6dbb361d..553ed051 100644 --- a/Source/santad/Logs/EndpointSecurity/Serializers/ProtobufTest.mm +++ b/Source/santad/Logs/EndpointSecurity/Serializers/ProtobufTest.mm @@ -1103,7 +1103,7 @@ - (void)testSerializeMessageAuthenticationOD { __block es_event_authentication_t authenticationEvent = { .success = true, .type = ES_AUTHENTICATION_TYPE_OD, - .data.od = &authenticationOD, + .data = {.od = &authenticationOD}, }; [self serializeAndCheckEvent:ES_EVENT_TYPE_NOTIFY_AUTHENTICATION @@ -1163,7 +1163,7 @@ - (void)testSerializeMessageAuthenticationTouchID { __block es_event_authentication_t authenticationEvent = { .success = true, .type = ES_AUTHENTICATION_TYPE_TOUCHID, - .data.touchid = &authenticationTouchID, + .data = {.touchid = &authenticationTouchID}, }; [self serializeAndCheckEvent:ES_EVENT_TYPE_NOTIFY_AUTHENTICATION @@ -1218,7 +1218,7 @@ - (void)testSerializeMessageAuthenticationToken { __block es_event_authentication_t authenticationEvent = { .success = true, .type = ES_AUTHENTICATION_TYPE_TOKEN, - .data.token = &authenticationToken, + .data = {.token = &authenticationToken}, }; [self serializeAndCheckEvent:ES_EVENT_TYPE_NOTIFY_AUTHENTICATION @@ -1267,7 +1267,7 @@ - (void)testSerializeMessageAuthenticationAutoUnlock { __block es_event_authentication_t authenticationEvent = { .success = true, .type = ES_AUTHENTICATION_TYPE_AUTO_UNLOCK, - .data.auto_unlock = &authenticationAutoUnlock, + .data = {.auto_unlock = &authenticationAutoUnlock}, }; [self serializeAndCheckEvent:ES_EVENT_TYPE_NOTIFY_AUTHENTICATION