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 <j@w1.fi>
This commit is contained in:
Jouni Malinen 2015-01-06 11:46:46 +02:00
parent b9f6560f38
commit 3d2e2d5d63

View file

@ -160,7 +160,7 @@ static void wpa_trace_bfd_addr(void *pc)
if (abfd == NULL) if (abfd == NULL)
return; return;
data.pc = (bfd_vma) pc; data.pc = (bfd_hostptr_t) pc;
data.found = FALSE; data.found = FALSE;
bfd_map_over_sections(abfd, find_addr_sect, &data); 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) if (abfd == NULL)
return NULL; return NULL;
data.pc = (bfd_vma) pc; data.pc = (bfd_hostptr_t) pc;
data.found = FALSE; data.found = FALSE;
bfd_map_over_sections(abfd, find_addr_sect, &data); bfd_map_over_sections(abfd, find_addr_sect, &data);