From 24b2346746066205cf423031aa96edf7d4dceb3d Mon Sep 17 00:00:00 2001 From: TOKITA Hiroshi Date: Sat, 31 Jan 2026 22:11:23 +0900 Subject: [PATCH] samples: hello_arduino: Correct printk format specifier Fixed to use %zd which corresponds to size_t. Signed-off-by: TOKITA Hiroshi --- samples/hello_arduino/src/app.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/samples/hello_arduino/src/app.cpp b/samples/hello_arduino/src/app.cpp index aa7cd536f..b22e6613a 100644 --- a/samples/hello_arduino/src/app.cpp +++ b/samples/hello_arduino/src/app.cpp @@ -16,14 +16,14 @@ void loop() { size_t ret2; ret1 = Serial.print(c); ret2 = Serial.println("Hello, World!"); - printk("Sizes: %d %d\n", ret1, ret2); + printk("Sizes: %zd %zd\n", ret1, ret2); Serial.println(); ret1 = Serial.print("My letter is: "); ret2 = Serial.println(c); - printk("Sizes: %d %d\n", ret1, ret2); + printk("Sizes: %zd %zd\n", ret1, ret2); Serial.println(); char myString[] = "Will it print?"; ret1 = Serial.println(myString); - printk("Size: %d \n\n\n", ret1); + printk("Size: %zd \n\n\n", ret1); delay(1000); // 1 second delay }