This is an automated email from the ASF dual-hosted git repository. xiaoxiang781216 pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/nuttx.git
commit e6e066e1b938be09aaad1c6a97da63f2b5bbfa08 Author: xuxingliang <[email protected]> AuthorDate: Wed Mar 12 14:42:32 2025 +0800 noteram: fix compile warnings The heap note of the text dump prints the used and size fields of struct note_heap_s with %d and PRIiPTR, but both are size_t. GCC warns about the %d on 64-bit targets with CONFIG_SCHED_INSTRUMENTATION_HEAP, an error with -Werror. Print both with %zu. Assisted-by: Kiro:claude-opus-5-5 Signed-off-by: xuxingliang <[email protected]> --- drivers/note/noteram_driver.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/note/noteram_driver.c b/drivers/note/noteram_driver.c index 9a7e2eb915e..34b05360508 100644 --- a/drivers/note/noteram_driver.c +++ b/drivers/note/noteram_driver.c @@ -1302,8 +1302,8 @@ static int noteram_dump_one(FAR uint8_t *p, FAR struct lib_outstream_s *s, }; ret += noteram_dump_header(s, &nmm->nhp_cmn, ctx); - ret += lib_sprintf(s, "tracing_mark_write: C|%d|Heap Usage|%d|%s" - ": heap: %p size:%" PRIiPTR ", address: %p\n", + ret += lib_sprintf(s, "tracing_mark_write: C|%d|Heap Usage|%zu|%s" + ": heap: %p size:%zu, address: %p\n", pid, nmm->used, name[note->nc_type - NOTE_HEAP_ADD], nmm->heap, nmm->size, nmm->mem);
