From bb94c63fa2447af60d449fc1234c0cbb288168d5 Mon Sep 17 00:00:00 2001 From: Chen Xingyu Date: Wed, 20 Nov 2024 10:39:37 +0800 Subject: [PATCH] samples: subsys: ipc: Fix warning of `size_t` formatting with `%.*s` This addresses the following warning building with `CONFIG_64BIT=y`: error: field precision specifier '.*' expects argument of type 'int', but argument X has type 'size_t' {aka 'long unsigned int'} Signed-off-by: Chen Xingyu --- samples/subsys/ipc/openamp_rsc_table/src/main_remote.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/samples/subsys/ipc/openamp_rsc_table/src/main_remote.c b/samples/subsys/ipc/openamp_rsc_table/src/main_remote.c index c8d12092ace..a28e017e9be 100644 --- a/samples/subsys/ipc/openamp_rsc_table/src/main_remote.c +++ b/samples/subsys/ipc/openamp_rsc_table/src/main_remote.c @@ -299,7 +299,7 @@ void app_rpmsg_tty(void *arg1, void *arg2, void *arg3) k_sem_take(&data_tty_sem, K_FOREVER); if (tty_msg.len) { LOG_INF("[Linux TTY] incoming msg: %.*s", - tty_msg.len, (char *)tty_msg.data); + (int)tty_msg.len, (char *)tty_msg.data); snprintf(tx_buff, 13, "TTY 0x%04x: ", tty_ept.addr); memcpy(&tx_buff[12], tty_msg.data, tty_msg.len); rpmsg_send(&tty_ept, tx_buff, tty_msg.len + 12);