From: Jouni Malinen Date: Tue, 6 Jan 2015 09:46:46 +0000 (+0200) Subject: trace: Fix compiler warning on 32-bit builds with bfd support X-Git-Tag: hostap_2_4~521 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3d2e2d5d6300c4be611cac67454e4aa0e8af54af;p=thirdparty%2Fhostap.git 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 --- 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);