From 3d2e2d5d6300c4be611cac67454e4aa0e8af54af Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Tue, 6 Jan 2015 11:46:46 +0200 Subject: [PATCH] trace: Fix compiler warning on 32-bit builds with bfd support With CONFIG_WPA_TRACE_BFD, the type cast from void* to integer was generating a compiler warning due to the target integer being larger in size in case of 32-bit builds. Type case to bfd_hostptr_t instead of directly to bfd_vma to avoid this. Signed-off-by: Jouni Malinen --- src/utils/trace.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/utils/trace.c b/src/utils/trace.c index 7403c08f1..14fa40e11 100644 --- a/src/utils/trace.c +++ b/src/utils/trace.c @@ -160,7 +160,7 @@ static void wpa_trace_bfd_addr(void *pc) if (abfd == NULL) return; - data.pc = (bfd_vma) pc; + data.pc = (bfd_hostptr_t) pc; data.found = FALSE; bfd_map_over_sections(abfd, find_addr_sect, &data); @@ -201,7 +201,7 @@ static const char * wpa_trace_bfd_addr2func(void *pc) if (abfd == NULL) return NULL; - data.pc = (bfd_vma) pc; + data.pc = (bfd_hostptr_t) pc; data.found = FALSE; bfd_map_over_sections(abfd, find_addr_sect, &data);