summaryrefslogtreecommitdiff
path: root/ldso
diff options
context:
space:
mode:
authorFrank Mehnert <frank.mehnert@kernkonzept.com>2024-07-29 13:55:27 +0200
committerWaldemar Brodkorb <wbx@openadk.org>2024-07-30 02:36:47 +0200
commit8a08df05966730f4fb2d5d95434e75a09a13f696 (patch)
tree97e3c9f00b594ccb4006d192d6b80189d16a2fef /ldso
parent841d0729883ee0de606de161c1d6a5c37cedf575 (diff)
libdl: properly cast parameters for %p format string specifier
The "%p" format specifier requires a void pointer. Cast parameters of type ElfW(Addr) to 'void *'. This fixes warnings if _dl_if_debug_print() performs parameter type checking. Signed-off-by: Marcus Haehnel <marcus.haehnel@kernkonzept.com>
Diffstat (limited to 'ldso')
-rw-r--r--ldso/libdl/libdl.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ldso/libdl/libdl.c b/ldso/libdl/libdl.c
index 37c4a876e..6e50cb087 100644
--- a/ldso/libdl/libdl.c
+++ b/ldso/libdl/libdl.c
@@ -972,11 +972,11 @@ static int do_dlclose(void *vhandle, int need_fini)
end = (end + ADDR_ALIGN) & PAGE_ALIGN;
start = start & ~ADDR_ALIGN;
if (end > start) {
- _dl_if_debug_print("unmapping: %s at %p with length: '%p' until %p\n", tpnt->libname, tpnt->mapaddr, end - start, tpnt->mapaddr + (end - start));
+ _dl_if_debug_print("unmapping: %s at %p with length: '%p' until %p\n", tpnt->libname, (void *)tpnt->mapaddr, (void *)(end - start), (void *)(tpnt->mapaddr + (end - start)));
DL_LIB_UNMAP (tpnt, end - start);
}
else {
- _dl_if_debug_print("NOT unmapping: %s at %p. start<end ('%p'<'%p')", tpnt->libname, tpnt->mapaddr, start, end);
+ _dl_if_debug_print("NOT unmapping: %s at %p. start<end ('%p'<'%p')", tpnt->libname, (void *)tpnt->mapaddr, (void *)start, (void *)end);
}
/* Free elements in RTLD_LOCAL scope list */
for (runp = tpnt->rtld_local; runp; runp = tmp) {