From 6bdca69a32f1f1d4d4e417a127d6e16536602616 Mon Sep 17 00:00:00 2001 From: YAMAMOTO Takashi Date: Sun, 22 Nov 2020 10:05:59 +0900 Subject: [PATCH] libs/libc/modlib/modlib_bind.c: Fix syslog formats --- libs/libc/modlib/modlib_bind.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/libs/libc/modlib/modlib_bind.c b/libs/libc/modlib/modlib_bind.c index 4c1b9e0f4c..b9de73acf8 100644 --- a/libs/libc/modlib/modlib_bind.c +++ b/libs/libc/modlib/modlib_bind.c @@ -301,8 +301,10 @@ static int modlib_relocate(FAR struct module_s *modp, rel->r_offset > dstsec->sh_size - sizeof(uint32_t)) { berr("ERROR: Section %d reloc %d: " - "Relocation address out of range, offset %d size %d\n", - relidx, i, rel->r_offset, dstsec->sh_size); + "Relocation address out of range, " + "offset %" PRIuPTR " size %ju\n", + relidx, i, (uintptr_t)rel->r_offset, + (uintmax_t)dstsec->sh_size); ret = -EINVAL; break; } @@ -487,8 +489,10 @@ static int modlib_relocateadd(FAR struct module_s *modp, rela->r_offset > dstsec->sh_size - sizeof(uint32_t)) { berr("ERROR: Section %d reloc %d: " - "Relocation address out of range, offset %d size %d\n", - relidx, i, rela->r_offset, dstsec->sh_size); + "Relocation address out of range, " + "offset %" PRIuPTR " size %ju\n", + relidx, i, (uintptr_t)rela->r_offset, + (uintmax_t)dstsec->sh_size); ret = -EINVAL; break; }