From 7c003162a6180fa01817fc622eefaec3639fba8e Mon Sep 17 00:00:00 2001 From: Ville Juven Date: Wed, 28 Sep 2022 12:23:09 +0300 Subject: [PATCH] libelf/libelf_symbols.c: Fix compilation warning about void* arithmetics Fixes minor issue with a trace (build failure with -Werror): libelf/libelf_symbols.c:310:41: error: pointer of type 'void *' used in arithmetic [-Werror=pointer-arith] 310 | (uintptr_t)(sym->st_value + symbol->sym_value)); --- binfmt/libelf/libelf_symbols.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/binfmt/libelf/libelf_symbols.c b/binfmt/libelf/libelf_symbols.c index 1781f689d0c..6247f00983e 100644 --- a/binfmt/libelf/libelf_symbols.c +++ b/binfmt/libelf/libelf_symbols.c @@ -307,7 +307,7 @@ int elf_symvalue(FAR struct elf_loadinfo_s *loadinfo, FAR Elf_Sym *sym, "%08" PRIxPTR "+%08" PRIxPTR "=%08" PRIxPTR "\n", loadinfo->iobuffer, (uintptr_t)sym->st_value, (uintptr_t)symbol->sym_value, - (uintptr_t)(sym->st_value + symbol->sym_value)); + (uintptr_t)(sym->st_value + (uintptr_t)symbol->sym_value)); sym->st_value += ((uintptr_t)symbol->sym_value); }