Fix a few more compiler warnings

unstable
James Lee 2012-02-28 08:23:35 -07:00
parent 98157475af
commit ed3700b5da
3 changed files with 4 additions and 4 deletions

View File

@ -25,7 +25,7 @@ int main(int argc, char **argv)
int used = 0;
unsigned char *source, *dest;
int len;
Elf32_Addr base = NULL;
Elf32_Addr base = (Elf32_Addr)NULL;
if(argc < 3) {
printf("elf2bin [input file] [output file]\n");

View File

@ -67,7 +67,7 @@ void perform_fd_cleanup(int *fd);
#define OPT_DEBUG_ENABLE (1 << 0)
#define OPT_NO_FD_CLEANUP (1 << 1)
global_debug = 0;
int global_debug = 0;
/*
* Map in libraries, and hand off execution to the meterpreter server

View File

@ -837,7 +837,7 @@ static int reserve_mem_region(soinfo *si)
(unsigned int)(base));
return -1;
}
si->base = base;
si->base = (unsigned int)base;
#if 0
if(si->base && (base != (void *)si->base)) {
@ -2053,7 +2053,7 @@ static int link_image(soinfo *si, unsigned wr_offset)
si->wrprotect_end = _end;
}
} else if (phdr->p_type == PT_DYNAMIC) {
if (si->dynamic != (unsigned *)-1 && si->dynamic != (si->base + phdr->p_vaddr)) {
if (si->dynamic != (unsigned *)-1 && si->dynamic != (unsigned *)(si->base + phdr->p_vaddr)) {
DL_ERR("%5d multiple PT_DYNAMIC segments found in '%s'. "
"Segment at 0x%08x, previously one found at 0x%08x",
pid, si->name, si->base + phdr->p_vaddr,