Skip to content

samples: hello_arduino: Correct printk format specifier (again)#165

Merged
DhruvaG2000 merged 1 commit intozephyrproject-rtos:nextfrom
soburi:fix_hello_format
Feb 27, 2026
Merged

samples: hello_arduino: Correct printk format specifier (again)#165
DhruvaG2000 merged 1 commit intozephyrproject-rtos:nextfrom
soburi:fix_hello_format

Conversation

@soburi
Copy link
Copy Markdown
Member

@soburi soburi commented Feb 26, 2026

Fixed to use %zu which corresponds to size_t.

Fixed to use %zu which corresponds to size_t.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
@soburi soburi marked this pull request as ready for review February 26, 2026 21:00
Copilot AI review requested due to automatic review settings February 26, 2026 21:00
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR corrects the printk format specifiers in the hello_arduino sample from %zd (signed) to %zu (unsigned) to properly match the size_t type. The title includes "(again)" indicating this is a recurring fix for the same issue.

Changes:

  • Updated all three printk statements to use the correct %zu format specifier for size_t return values from Serial.print() and Serial.println() methods

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Copy Markdown
Member

@DhruvaG2000 DhruvaG2000 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ahh I read through https://docs.kernel.org/core-api/printk-formats.html and seems right, z it is!

@DhruvaG2000 DhruvaG2000 merged commit a0888d0 into zephyrproject-rtos:next Feb 27, 2026
7 checks passed
@soburi soburi deleted the fix_hello_format branch February 27, 2026 14:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants