From 96599d043a5460ad699f91209705279981126d91 Mon Sep 17 00:00:00 2001 From: Boris Zbarsky Date: Thu, 6 Apr 2023 13:05:54 -0400 Subject: [PATCH] Fix build of darwin-framework-tool with progress logging disabled. * CustomFlowString is used even if progress logging is disabled. * The id variable in GetCommissionerNodeIdCommand was unused when progress logging was disabled. --- .../commands/pairing/GetCommissionerNodeIdCommand.mm | 4 ++-- .../commands/payload/SetupPayloadParseCommand.mm | 4 ---- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/examples/darwin-framework-tool/commands/pairing/GetCommissionerNodeIdCommand.mm b/examples/darwin-framework-tool/commands/pairing/GetCommissionerNodeIdCommand.mm index 115f7b0821c048..1dd852bd4d0817 100644 --- a/examples/darwin-framework-tool/commands/pairing/GetCommissionerNodeIdCommand.mm +++ b/examples/darwin-framework-tool/commands/pairing/GetCommissionerNodeIdCommand.mm @@ -25,8 +25,8 @@ auto * controller = CurrentCommissioner(); VerifyOrReturnError(nil != controller, CHIP_ERROR_INCORRECT_STATE); - auto id = [controller.controllerNodeId unsignedLongLongValue]; - ChipLogProgress(chipTool, "Commissioner Node Id 0x" ChipLogFormatX64, ChipLogValueX64(id)); + ChipLogProgress( + chipTool, "Commissioner Node Id 0x" ChipLogFormatX64, ChipLogValueX64(controller.controllerNodeId.unsignedLongLongValue)); SetCommandExitStatus(CHIP_NO_ERROR); return CHIP_NO_ERROR; diff --git a/examples/darwin-framework-tool/commands/payload/SetupPayloadParseCommand.mm b/examples/darwin-framework-tool/commands/payload/SetupPayloadParseCommand.mm index d7ea6f981e7302..d077115eaa7453 100644 --- a/examples/darwin-framework-tool/commands/payload/SetupPayloadParseCommand.mm +++ b/examples/darwin-framework-tool/commands/payload/SetupPayloadParseCommand.mm @@ -24,8 +24,6 @@ namespace { -#if CHIP_PROGRESS_LOGGING - NSString * CustomFlowString(MTRCommissioningFlow flow) { switch (flow) { @@ -42,8 +40,6 @@ return @"???"; } -#endif // CHIP_PROGRESS_LOGGING - } // namespace void SetupPayloadParseCommand::LogNSError(const char * logString, NSError * error)