Skip to content

Commit

Permalink
Fix Mac build breakage from incorrect formats for node ids (#4139)
Browse files Browse the repository at this point in the history
  • Loading branch information
bzbarsky-apple authored Dec 9, 2020
1 parent 548b71a commit 9365ae5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
7 changes: 4 additions & 3 deletions src/messaging/tests/echo/echo_requester.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ CHIP_ERROR SendEchoRequest(void)

gLastEchoTime = chip::System::Timer::GetCurrentEpoch();

printf("\nSend echo request message to Node: %lu\n", chip::kTestDeviceNodeId);
printf("\nSend echo request message to Node: %" PRIu64 "\n", chip::kTestDeviceNodeId);

err = gEchoClient.SendEchoRequest(chip::kTestDeviceNodeId, std::move(payloadBuf));

Expand Down Expand Up @@ -151,8 +151,9 @@ void HandleEchoResponseReceived(chip::NodeId nodeId, chip::System::PacketBufferH
gWaitingForEchoResp = false;
gEchoRespCount++;

printf("Echo Response from node %lu : %" PRIu64 "/%" PRIu64 "(%.2f%%) len=%u time=%.3fms\n", nodeId, gEchoRespCount, gEchoCount,
static_cast<double>(gEchoRespCount) * 100 / gEchoCount, payload->DataLength(), static_cast<double>(transitTime) / 1000);
printf("Echo Response from node %" PRIu64 ": %" PRIu64 "/%" PRIu64 "(%.2f%%) len=%u time=%.3fms\n", nodeId, gEchoRespCount,
gEchoCount, static_cast<double>(gEchoRespCount) * 100 / gEchoCount, payload->DataLength(),
static_cast<double>(transitTime) / 1000);
}

} // namespace
Expand Down
2 changes: 1 addition & 1 deletion src/messaging/tests/echo/echo_responder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ chip::SecurePairingUsingTestSecret gTestPairing;
// Callback handler when a CHIP EchoRequest is received.
void HandleEchoRequestReceived(chip::NodeId nodeId, chip::System::PacketBufferHandle payload)
{
printf("Echo Request from node %lu, len=%u ... sending response.\n", nodeId, payload->DataLength());
printf("Echo Request from node %" PRIu64 ", len=%u ... sending response.\n", nodeId, payload->DataLength());
}

} // namespace
Expand Down

0 comments on commit 9365ae5

Please sign in to comment.