winedump: Remove casts of void pointers to other pointer types.
This commit is contained in:
parent
93af8d3631
commit
922a336063
|
@ -514,7 +514,7 @@ static const char *get_coff_name( const IMAGE_SYMBOL *coff_sym, const char *coff
|
||||||
|
|
||||||
void dump_coff(unsigned long coffbase, unsigned long len, const void* pmt)
|
void dump_coff(unsigned long coffbase, unsigned long len, const void* pmt)
|
||||||
{
|
{
|
||||||
const IMAGE_COFF_SYMBOLS_HEADER *coff = (const IMAGE_COFF_SYMBOLS_HEADER *)PRD(coffbase, len);
|
const IMAGE_COFF_SYMBOLS_HEADER *coff = PRD(coffbase, len);
|
||||||
const IMAGE_SYMBOL *coff_sym;
|
const IMAGE_SYMBOL *coff_sym;
|
||||||
const IMAGE_SYMBOL *coff_symbols =
|
const IMAGE_SYMBOL *coff_symbols =
|
||||||
(const IMAGE_SYMBOL *) ((const char *)coff + coff->LvaToFirstSymbol);
|
(const IMAGE_SYMBOL *) ((const char *)coff + coff->LvaToFirstSymbol);
|
||||||
|
@ -592,7 +592,7 @@ void dump_frame_pointer_omission(unsigned long base, unsigned long len)
|
||||||
printf("Range #loc #pmt Prlg #reg Info\n"
|
printf("Range #loc #pmt Prlg #reg Info\n"
|
||||||
"-----------------+----+----+----+----+------------\n");
|
"-----------------+----+----+----+----+------------\n");
|
||||||
|
|
||||||
fpo = (const FPO_DATA*)PRD(base, len);
|
fpo = PRD(base, len);
|
||||||
if (!fpo) {printf("Couldn't get FPO blob\n"); return;}
|
if (!fpo) {printf("Couldn't get FPO blob\n"); return;}
|
||||||
last = (const FPO_DATA*)((const char*)fpo + len);
|
last = (const FPO_DATA*)((const char*)fpo + len);
|
||||||
|
|
||||||
|
|
|
@ -115,7 +115,7 @@ static int dump_emfrecord(void)
|
||||||
|
|
||||||
case EMR_INTERSECTCLIPRECT:
|
case EMR_INTERSECTCLIPRECT:
|
||||||
{
|
{
|
||||||
const EMRINTERSECTCLIPRECT *clip = (const EMRINTERSECTCLIPRECT *)PRD(offset, sizeof(*clip));
|
const EMRINTERSECTCLIPRECT *clip = PRD(offset, sizeof(*clip));
|
||||||
|
|
||||||
printf("%-20s %08x\n", "EMR_INTERSECTCLIPRECT", length);
|
printf("%-20s %08x\n", "EMR_INTERSECTCLIPRECT", length);
|
||||||
printf("rect %d,%d - %d, %d\n",
|
printf("rect %d,%d - %d, %d\n",
|
||||||
|
@ -170,7 +170,7 @@ static int dump_emfrecord(void)
|
||||||
|
|
||||||
case EMR_EXTSELECTCLIPRGN:
|
case EMR_EXTSELECTCLIPRGN:
|
||||||
{
|
{
|
||||||
const EMREXTSELECTCLIPRGN *clip = (const EMREXTSELECTCLIPRGN *)PRD(offset, sizeof(*clip));
|
const EMREXTSELECTCLIPRGN *clip = PRD(offset, sizeof(*clip));
|
||||||
const RGNDATA *data = (RGNDATA *)clip->RgnData;
|
const RGNDATA *data = (RGNDATA *)clip->RgnData;
|
||||||
DWORD i, rc_count = 0;
|
DWORD i, rc_count = 0;
|
||||||
RECT *rc;
|
RECT *rc;
|
||||||
|
@ -195,7 +195,7 @@ static int dump_emfrecord(void)
|
||||||
|
|
||||||
case EMR_EXTCREATEFONTINDIRECTW:
|
case EMR_EXTCREATEFONTINDIRECTW:
|
||||||
{
|
{
|
||||||
const EMREXTCREATEFONTINDIRECTW *pf = (const EMREXTCREATEFONTINDIRECTW *)PRD(offset, sizeof(*pf));
|
const EMREXTCREATEFONTINDIRECTW *pf = PRD(offset, sizeof(*pf));
|
||||||
const LOGFONTW *plf = &pf->elfw.elfLogFont;
|
const LOGFONTW *plf = &pf->elfw.elfLogFont;
|
||||||
|
|
||||||
printf("%-20s %08x\n", "EMR_EXTCREATEFONTINDIRECTW", length);
|
printf("%-20s %08x\n", "EMR_EXTCREATEFONTINDIRECTW", length);
|
||||||
|
@ -216,7 +216,7 @@ static int dump_emfrecord(void)
|
||||||
|
|
||||||
case EMR_EXTTEXTOUTW:
|
case EMR_EXTTEXTOUTW:
|
||||||
{
|
{
|
||||||
const EMREXTTEXTOUTW *etoW = (const EMREXTTEXTOUTW *)PRD(offset, sizeof(*etoW));
|
const EMREXTTEXTOUTW *etoW = PRD(offset, sizeof(*etoW));
|
||||||
|
|
||||||
printf("%-20s %08x\n", "EMR_EXTTEXTOUTW", length);
|
printf("%-20s %08x\n", "EMR_EXTTEXTOUTW", length);
|
||||||
printf("pt (%d,%d) rect (%d,%d - %d,%d) flags %#x, %s\n",
|
printf("pt (%d,%d) rect (%d,%d - %d,%d) flags %#x, %s\n",
|
||||||
|
|
|
@ -72,7 +72,7 @@ enum FileSig get_kind_mdmp(void)
|
||||||
|
|
||||||
void mdmp_dump(void)
|
void mdmp_dump(void)
|
||||||
{
|
{
|
||||||
const MINIDUMP_HEADER* hdr = (const MINIDUMP_HEADER*)PRD(0, sizeof(MINIDUMP_HEADER));
|
const MINIDUMP_HEADER* hdr = PRD(0, sizeof(MINIDUMP_HEADER));
|
||||||
ULONG idx, ndir = 0;
|
ULONG idx, ndir = 0;
|
||||||
const MINIDUMP_DIRECTORY* dir;
|
const MINIDUMP_DIRECTORY* dir;
|
||||||
const void* stream;
|
const void* stream;
|
||||||
|
|
|
@ -41,7 +41,7 @@ char *str_create(size_t num_str, ...)
|
||||||
len += strlen (t);
|
len += strlen (t);
|
||||||
va_end (args);
|
va_end (args);
|
||||||
|
|
||||||
if (!(tmp = (char *) malloc (len)))
|
if (!(tmp = malloc (len)))
|
||||||
fatal ("Out of memory");
|
fatal ("Out of memory");
|
||||||
|
|
||||||
tmp[0] = '\0';
|
tmp[0] = '\0';
|
||||||
|
@ -72,7 +72,7 @@ char *str_create_num(size_t num_str, int num, ...)
|
||||||
len += strlen (t);
|
len += strlen (t);
|
||||||
va_end (args);
|
va_end (args);
|
||||||
|
|
||||||
if (!(tmp = (char *) malloc (len)))
|
if (!(tmp = malloc (len)))
|
||||||
fatal ("Out of memory");
|
fatal ("Out of memory");
|
||||||
|
|
||||||
tmp[0] = '\0';
|
tmp[0] = '\0';
|
||||||
|
@ -98,7 +98,7 @@ char *str_substring(const char *start, const char *end)
|
||||||
|
|
||||||
assert (start && end && end > start);
|
assert (start && end && end > start);
|
||||||
|
|
||||||
if (!(newstr = (char *) malloc (end - start + 1)))
|
if (!(newstr = malloc (end - start + 1)))
|
||||||
fatal ("Out of memory");
|
fatal ("Out of memory");
|
||||||
|
|
||||||
memcpy (newstr, start, end - start);
|
memcpy (newstr, start, end - start);
|
||||||
|
|
|
@ -664,7 +664,7 @@ static void dump_dir_delay_imported_functions(void)
|
||||||
|
|
||||||
printf(" Ordn Name\n");
|
printf(" Ordn Name\n");
|
||||||
|
|
||||||
il = (const IMAGE_THUNK_DATA32 *)RVA(importDesc->pINT - offset, sizeof(DWORD));
|
il = RVA(importDesc->pINT - offset, sizeof(DWORD));
|
||||||
|
|
||||||
if (!il)
|
if (!il)
|
||||||
printf("Can't grab thunk data, going to next imported DLL\n");
|
printf("Can't grab thunk data, going to next imported DLL\n");
|
||||||
|
@ -1321,8 +1321,7 @@ static void do_grab_sym( void )
|
||||||
|
|
||||||
/* dll_close(); */
|
/* dll_close(); */
|
||||||
|
|
||||||
if (!(dll_symbols = (dll_symbol *) malloc((exportDir->NumberOfFunctions + 1) *
|
if (!(dll_symbols = malloc((exportDir->NumberOfFunctions + 1) * sizeof(dll_symbol))))
|
||||||
sizeof (dll_symbol))))
|
|
||||||
fatal ("Out of memory");
|
fatal ("Out of memory");
|
||||||
if (exportDir->AddressOfFunctions != exportDir->NumberOfNames || exportDir->Base > 1)
|
if (exportDir->AddressOfFunctions != exportDir->NumberOfNames || exportDir->Base > 1)
|
||||||
globals.do_ordinals = 1;
|
globals.do_ordinals = 1;
|
||||||
|
|
|
@ -50,10 +50,10 @@ int symbol_search (parsed_symbol *sym)
|
||||||
return - 1;
|
return - 1;
|
||||||
|
|
||||||
if (!grep_buff)
|
if (!grep_buff)
|
||||||
grep_buff = (char *) malloc (MAX_RESULT_LEN);
|
grep_buff = malloc (MAX_RESULT_LEN);
|
||||||
|
|
||||||
if (!fgrep_buff)
|
if (!fgrep_buff)
|
||||||
fgrep_buff = (char *) malloc (MAX_RESULT_LEN);
|
fgrep_buff = malloc (MAX_RESULT_LEN);
|
||||||
|
|
||||||
if (!grep_buff || !fgrep_buff)
|
if (!grep_buff || !fgrep_buff)
|
||||||
fatal ("Out of Memory");
|
fatal ("Out of Memory");
|
||||||
|
|
Loading…
Reference in New Issue