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 fcdba1ba077c41d0bb0a694756325c20b58aa6b6 Author: tengshuangshuang <[email protected]> AuthorDate: Mon Oct 12 10:36:49 2026 +0800 fdt_cfi: fix printf format for size_t and uintptr_t On aarch64 size_t and uintptr_t are 64-bit, so the %d/%x placeholders in the ferr() diagnostic trip -Werror=format when the MTD_CFI + DEVICE_TREE build is enabled. Use %zu/%zx so the format matches the operand types on every arch. Assisted-by: Claude Code Signed-off-by: tengshuangshuang <[email protected]> --- drivers/devicetree/fdt_cfi.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/devicetree/fdt_cfi.c b/drivers/devicetree/fdt_cfi.c index c44a7abf828..a2bbcac2250 100644 --- a/drivers/devicetree/fdt_cfi.c +++ b/drivers/devicetree/fdt_cfi.c @@ -89,8 +89,9 @@ int fdt_cfi_register(FAR const void *fdt) } else { - ferr("cfi flash%d has been used to store text:" - "[%x,%x], flash:[%x,%x]\n", i, flash_base, flash_end, + ferr("cfi flash%zu has been used to store text:" + "[%zx,%zx], flash:[%x,%x]\n", + i, flash_base, flash_end, CONFIG_FLASH_START, CONFIG_FLASH_START + CONFIG_FLASH_SIZE); }
