From 13156483d1102dd2d62e6045261f87087f20546e Mon Sep 17 00:00:00 2001 From: Andrei Litvin Date: Thu, 18 Jan 2024 12:09:11 -0500 Subject: [PATCH] Fix android compile error: format strings differ between 32-bit and 64-bit (#31514) Co-authored-by: Andrei Litvin --- src/controller/java/CHIPDeviceController-JNI.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/controller/java/CHIPDeviceController-JNI.cpp b/src/controller/java/CHIPDeviceController-JNI.cpp index adde00b6cfb4a5..fd4b0303fdce4c 100644 --- a/src/controller/java/CHIPDeviceController-JNI.cpp +++ b/src/controller/java/CHIPDeviceController-JNI.cpp @@ -230,7 +230,8 @@ JNI_METHOD(jint, onNOCChainGeneration) if (jByteArrayIpk.byteSpan().size() != sizeof(ipkValue)) { - ChipLogError(Controller, "Invalid IPK size %ld and expect %ld", jByteArrayIpk.byteSpan().size(), sizeof(ipkValue)); + ChipLogError(Controller, "Invalid IPK size %u and expect %u", static_cast(jByteArrayIpk.byteSpan().size()), + static_cast(sizeof(ipkValue))); return CHIP_ERROR_INVALID_IPK.AsInteger(); } memcpy(&ipkValue[0], jByteArrayIpk.byteSpan().data(), jByteArrayIpk.byteSpan().size());