Skip to content

Commit

Permalink
Fixing bad cast (project-chip#21451)
Browse files Browse the repository at this point in the history
  • Loading branch information
woody-apple authored and isiu-apple committed Sep 16, 2022
1 parent 7b0c10d commit 40eeeac
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/darwin/Framework/CHIP/MTRDeviceController.mm
Original file line number Diff line number Diff line change
Expand Up @@ -577,7 +577,7 @@ - (NSString *)openPairingWindowWithPIN:(uint64_t)deviceID
}

if (!chip::CanCastTo<uint32_t>(setupPIN) || !chip::SetupPayload::IsValidSetupPIN(static_cast<uint32_t>(setupPIN))) {
MTR_LOG_ERROR("Error: Setup pin %lu is not valid", setupPIN);
MTR_LOG_ERROR("Error: Setup pin %lu is not valid", static_cast<unsigned long>(setupPIN));
if (error) {
*error = [MTRError errorForCHIPErrorCode:CHIP_ERROR_INVALID_INTEGER_VALUE];
}
Expand Down

0 comments on commit 40eeeac

Please sign in to comment.