From 7e80918f27a79fa8e5ab04297de828f18fb7718e Mon Sep 17 00:00:00 2001 From: Vivien Nicolas Date: Tue, 11 Oct 2022 21:47:20 +0200 Subject: [PATCH] [darwin-framework-tool] Update some NSLog format to works properly for NSEnum/NSOptions (#23112) --- .../commands/pairing/DeviceControllerDelegateBridge.mm | 2 +- .../commands/payload/SetupPayloadParseCommand.mm | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/examples/darwin-framework-tool/commands/pairing/DeviceControllerDelegateBridge.mm b/examples/darwin-framework-tool/commands/pairing/DeviceControllerDelegateBridge.mm index 9c0fff0984561e..dc53280b2d2553 100644 --- a/examples/darwin-framework-tool/commands/pairing/DeviceControllerDelegateBridge.mm +++ b/examples/darwin-framework-tool/commands/pairing/DeviceControllerDelegateBridge.mm @@ -25,7 +25,7 @@ @interface CHIPToolDeviceControllerDelegate () @implementation CHIPToolDeviceControllerDelegate - (void)onStatusUpdate:(MTRCommissioningStatus)status { - NSLog(@"Pairing Status Update: %lu", status); + NSLog(@"Pairing Status Update: %tu", status); switch (status) { case MTRCommissioningStatusSuccess: ChipLogProgress(chipTool, "Secure Pairing Success"); diff --git a/examples/darwin-framework-tool/commands/payload/SetupPayloadParseCommand.mm b/examples/darwin-framework-tool/commands/payload/SetupPayloadParseCommand.mm index 15be061b9308db..e1448eeaeceb5d 100644 --- a/examples/darwin-framework-tool/commands/payload/SetupPayloadParseCommand.mm +++ b/examples/darwin-framework-tool/commands/payload/SetupPayloadParseCommand.mm @@ -76,7 +76,7 @@ NSLog(@"Version: %@", payload.version); NSLog(@"VendorID: %@", payload.vendorID); NSLog(@"ProductID: %@", payload.productID); - NSLog(@"Custom flow: %lu (%@)", payload.commissioningFlow, CustomFlowString(payload.commissioningFlow)); + NSLog(@"Custom flow: %tu (%@)", payload.commissioningFlow, CustomFlowString(payload.commissioningFlow)); { if (payload.discoveryCapabilities == MTRDiscoveryCapabilitiesUnknown) { NSLog(@"Capabilities: UNKNOWN"); @@ -100,7 +100,7 @@ [humanFlags appendString:@"ON NETWORK"]; } - NSLog(@"Capabilities: 0x%02lX (%@)", value, humanFlags); + NSLog(@"Capabilities: 0x%02lX (%@)", static_cast(value), humanFlags); } } NSLog(@"Discriminator: %@", payload.discriminator);