Commit ba123abf authored by Michael Stefaniuc's avatar Michael Stefaniuc Committed by Alexandre Julliard

winedump: Win64 printf format warning fixes.

parent d2d33017
......@@ -3,7 +3,6 @@ TOPOBJDIR = ../..
SRCDIR = @srcdir@
VPATH = @srcdir@
EXEEXT = @EXEEXT@
DEFS = -DWINE_NO_LONG_AS_INT
PROGRAMS = winedump$(EXEEXT)
MANPAGES = winedump.man
......
......@@ -424,9 +424,9 @@ static void dump_codeview_headers(unsigned long base, unsigned long len)
const struct {DWORD TimeStamp; DWORD Dunno; char Name[1];} *pdb_data;
pdb_data = (const void *)(signature + 1);
printf(" TimeStamp: %08lX (%s)\n",
printf(" TimeStamp: %08X (%s)\n",
pdb_data->TimeStamp, get_time_str(pdb_data->TimeStamp));
printf(" Dunno: %08lX\n", pdb_data->Dunno);
printf(" Dunno: %08X\n", pdb_data->Dunno);
printf(" Filename: %s\n", pdb_data->Name);
return;
}
......@@ -544,7 +544,7 @@ void dump_coff(unsigned long coffbase, unsigned long len, const void* pmt)
*/
nampnt = get_coff_name( coff_sym, coff_strtab );
printf("%05d | %02d:%08lx [%08lx] | %s\n", i, coff_sym->SectionNumber - 1, coff_sym->Value - base, coff_sym->Value, nampnt);
printf("%05d | %02d:%08x [%08x] | %s\n", i, coff_sym->SectionNumber - 1, coff_sym->Value - base, coff_sym->Value, nampnt);
i += naux;
continue;
}
......@@ -559,7 +559,7 @@ void dump_coff(unsigned long coffbase, unsigned long len, const void* pmt)
/* FIXME: add code to find out the file this symbol belongs to,
* see winedbg */
printf("%05d | %02d:%08lx [%08lx] | %s\n", i, coff_sym->SectionNumber - 1, coff_sym->Value - base, coff_sym->Value, nampnt);
printf("%05d | %02d:%08x [%08x] | %s\n", i, coff_sym->SectionNumber - 1, coff_sym->Value - base, coff_sym->Value, nampnt);
i += naux;
continue;
}
......
......@@ -96,7 +96,7 @@ static void dump_le_header( const IMAGE_VXD_HEADER *le )
le->e32_border == 0 ? "little-indian" : "big-endian");
printf( " Word order: %s\n",
le->e32_worder == 0 ? "little-indian" : "big-endian");
printf( " Executable format level: %ld\n",
printf( " Executable format level: %d\n",
le->e32_level);
printf( " CPU type: %s\n",
le->e32_cpu == 0x01 ? "Intel 80286" :
......@@ -115,9 +115,9 @@ static void dump_le_header( const IMAGE_VXD_HEADER *le )
le->e32_os == 0x03 ? "DOS 4.x" :
le->e32_os == 0x04 ? "Windows 386" :
"Unknown");
printf( " Module version: %ld\n",
printf( " Module version: %d\n",
le->e32_ver);
printf( " Module type flags: %08lx\n",
printf( " Module type flags: %08x\n",
le->e32_mflags);
if (le->e32_mflags & 0x8000)
{
......@@ -140,85 +140,85 @@ static void dump_le_header( const IMAGE_VXD_HEADER *le )
if (le->e32_mflags & 0x8000)
printf( " Module is DLL\n");
}
printf( " Number of memory pages: %ld\n",
printf( " Number of memory pages: %d\n",
le->e32_mpages);
printf( " Initial object CS number: %08lx\n",
printf( " Initial object CS number: %08x\n",
le->e32_startobj);
printf( " Initial EIP: %08lx\n",
printf( " Initial EIP: %08x\n",
le->e32_eip);
printf( " Initial object SS number: %08lx\n",
printf( " Initial object SS number: %08x\n",
le->e32_stackobj);
printf( " Initial ESP: %08lx\n",
printf( " Initial ESP: %08x\n",
le->e32_esp);
printf( " Memory page size: %ld\n",
printf( " Memory page size: %d\n",
le->e32_pagesize);
printf( " Bytes on last page: %ld\n",
printf( " Bytes on last page: %d\n",
le->e32_lastpagesize);
printf( " Fix-up section size: %ld\n",
printf( " Fix-up section size: %d\n",
le->e32_fixupsize);
printf( " Fix-up section checksum: %08lx\n",
printf( " Fix-up section checksum: %08x\n",
le->e32_fixupsum);
printf( " Loader section size: %ld\n",
printf( " Loader section size: %d\n",
le->e32_ldrsize);
printf( " Loader section checksum: %08lx\n",
printf( " Loader section checksum: %08x\n",
le->e32_ldrsum);
printf( " Offset of object table: %08lx\n",
printf( " Offset of object table: %08x\n",
le->e32_objtab);
printf( " Object table entries: %ld\n",
printf( " Object table entries: %d\n",
le->e32_objcnt);
printf( " Object page map offset: %08lx\n",
printf( " Object page map offset: %08x\n",
le->e32_objmap);
printf( " Object iterate data map offset: %08lx\n",
printf( " Object iterate data map offset: %08x\n",
le->e32_itermap);
printf( " Resource table offset: %08lx\n",
printf( " Resource table offset: %08x\n",
le->e32_rsrctab);
printf( " Resource table entries: %ld\n",
printf( " Resource table entries: %d\n",
le->e32_rsrccnt);
printf( " Resident names table offset: %08lx\n",
printf( " Resident names table offset: %08x\n",
le->e32_restab);
printf( " Entry table offset: %08lx\n",
printf( " Entry table offset: %08x\n",
le->e32_enttab);
printf( " Module directives table offset: %08lx\n",
printf( " Module directives table offset: %08x\n",
le->e32_dirtab);
printf( " Module directives entries: %ld\n",
printf( " Module directives entries: %d\n",
le->e32_dircnt);
printf( " Fix-up page table offset: %08lx\n",
printf( " Fix-up page table offset: %08x\n",
le->e32_fpagetab);
printf( " Fix-up record table offset: %08lx\n",
printf( " Fix-up record table offset: %08x\n",
le->e32_frectab);
printf( " Imported modules name table offset: %08lx\n",
printf( " Imported modules name table offset: %08x\n",
le->e32_impmod);
printf( " Imported modules count: %ld\n",
printf( " Imported modules count: %d\n",
le->e32_impmodcnt);
printf( " Imported procedure name table offset: %08lx\n",
printf( " Imported procedure name table offset: %08x\n",
le->e32_impproc);
printf( " Per-page checksum table offset: %08lx\n",
printf( " Per-page checksum table offset: %08x\n",
le->e32_pagesum);
printf( " Data pages offset from top of table: %08lx\n",
printf( " Data pages offset from top of table: %08x\n",
le->e32_datapage);
printf( " Preload page count: %08lx\n",
printf( " Preload page count: %08x\n",
le->e32_preload);
printf( " Non-resident names table offset: %08lx\n",
printf( " Non-resident names table offset: %08x\n",
le->e32_nrestab);
printf( " Non-resident names table length: %ld\n",
printf( " Non-resident names table length: %d\n",
le->e32_cbnrestab);
printf( " Non-resident names table checksum: %08lx\n",
printf( " Non-resident names table checksum: %08x\n",
le->e32_nressum);
printf( " Automatic data object: %08lx\n",
printf( " Automatic data object: %08x\n",
le->e32_autodata);
printf( " Debug information offset: %08lx\n",
printf( " Debug information offset: %08x\n",
le->e32_debuginfo);
printf( " Debug information length: %ld\n",
printf( " Debug information length: %d\n",
le->e32_debuglen);
printf( " Preload instance pages number: %ld\n",
printf( " Preload instance pages number: %d\n",
le->e32_instpreload);
printf( " Demand instance pages number: %ld\n",
printf( " Demand instance pages number: %d\n",
le->e32_instdemand);
printf( " Extra heap allocation: %ld\n",
printf( " Extra heap allocation: %d\n",
le->e32_heapsize);
printf( " VxD resource table offset: %08lx\n",
printf( " VxD resource table offset: %08x\n",
le->e32_winresoff);
printf( " Size of VxD resource table: %ld\n",
printf( " Size of VxD resource table: %d\n",
le->e32_winreslen);
printf( " VxD identifier: %x\n",
le->e32_devid);
......
......@@ -266,17 +266,17 @@ static int dump_location(int fd)
printf("Location\n");
printf("--------\n\n");
printf("Total size = %ld\n", loc->dwTotalSize);
printf("Header size = %ld\n", loc->dwHeaderSize);
printf("Flags = %08lx\n", loc->dwFlags);
printf("Total size = %d\n", loc->dwTotalSize);
printf("Header size = %d\n", loc->dwHeaderSize);
printf("Flags = %08x\n", loc->dwFlags);
/* dump out information about the volume the link points to */
printf("Volume ofs = %08lx ", loc->dwVolTableOfs);
printf("Volume ofs = %08x ", loc->dwVolTableOfs);
if (loc->dwVolTableOfs && (loc->dwVolTableOfs<loc->dwTotalSize))
{
LOCAL_VOLUME_INFO *vol = (LOCAL_VOLUME_INFO *) &p[loc->dwVolTableOfs];
printf("size %ld type %ld serial %08lx label %ld ",
printf("size %d type %d serial %08x label %d ",
vol->dwSize, vol->dwType, vol->dwVolSerial, vol->dwVolLabelOfs);
if(vol->dwVolLabelOfs)
printf("(\"%s\")", &p[loc->dwVolTableOfs + vol->dwVolLabelOfs]);
......@@ -284,13 +284,13 @@ static int dump_location(int fd)
printf("\n");
/* dump out the path the link points to */
printf("LocalPath ofs = %08lx ", loc->dwLocalPathOfs);
printf("LocalPath ofs = %08x ", loc->dwLocalPathOfs);
if( loc->dwLocalPathOfs && (loc->dwLocalPathOfs < loc->dwTotalSize) )
printf("(\"%s\")", &p[loc->dwLocalPathOfs]);
printf("\n");
printf("Net Path ofs = %08lx\n", loc->dwNetworkVolTableOfs);
printf("Final Path = %08lx ", loc->dwFinalPathOfs);
printf("Net Path ofs = %08x\n", loc->dwNetworkVolTableOfs);
printf("Final Path = %08x ", loc->dwFinalPathOfs);
if( loc->dwFinalPathOfs && (loc->dwFinalPathOfs < loc->dwTotalSize) )
printf("(\"%s\")", &p[loc->dwFinalPathOfs]);
printf("\n");
......@@ -348,7 +348,7 @@ static int dump_advertise_info(int fd, const char *type)
printf("Advertise Info\n");
printf("--------------\n\n");
printf("magic = %lx\n", avt->magic);
printf("magic = %x\n", avt->magic);
printf("%s = %s\n", type, avt->bufA);
if (avt->magic == 0xa0000006)
{
......@@ -402,19 +402,19 @@ static int dump_lnk_fd(int fd)
printf("Header\n");
printf("------\n\n");
printf("Size: %04lx\n", hdr->dwSize);
printf("Size: %04x\n", hdr->dwSize);
printf("GUID: %s\n", guid);
printf("FileAttr: %08lx\n", hdr->dwFileAttr);
printf("FileLength: %08lx\n", hdr->dwFileLength);
printf("nIcon: %ld\n", hdr->nIcon);
printf("Startup: %ld\n", hdr->fStartup);
printf("HotKey: %08lx\n", hdr->wHotKey);
printf("Unknown5: %08lx\n", hdr->Unknown5);
printf("Unknown6: %08lx\n", hdr->Unknown6);
printf("FileAttr: %08x\n", hdr->dwFileAttr);
printf("FileLength: %08x\n", hdr->dwFileLength);
printf("nIcon: %d\n", hdr->nIcon);
printf("Startup: %d\n", hdr->fStartup);
printf("HotKey: %08x\n", hdr->wHotKey);
printf("Unknown5: %08x\n", hdr->Unknown5);
printf("Unknown6: %08x\n", hdr->Unknown6);
/* dump out all the flags */
printf("Flags: %04lx ( ", hdr->dwFlags);
printf("Flags: %04x ( ", hdr->dwFlags);
#define FLAG(x) if(hdr->dwFlags & SCF_##x) printf("%s ",#x);
FLAG(PIDL)
FLAG(LOCATION)
......@@ -429,7 +429,7 @@ static int dump_lnk_fd(int fd)
#undef FLAG
printf(")\n");
printf("Length: %04lx\n", hdr->dwFileLength);
printf("Length: %04x\n", hdr->dwFileLength);
printf("\n");
if (hdr->dwFlags & SCF_PIDL)
......
......@@ -73,7 +73,7 @@ static void dump_ne_header( const IMAGE_OS2_HEADER *ne )
printf( "File header:\n" );
printf( "Linker version: %d.%d\n", ne->ne_ver, ne->ne_rev );
printf( "Entry table: %x len %d\n", ne->ne_enttab, ne->ne_cbenttab );
printf( "Checksum: %08lx\n", ne->ne_crc );
printf( "Checksum: %08x\n", ne->ne_crc );
printf( "Flags: %04x\n", ne->ne_flags );
printf( "Auto data segment: %x\n", ne->ne_autodata );
printf( "Heap size: %d bytes\n", ne->ne_heap );
......@@ -87,7 +87,7 @@ static void dump_ne_header( const IMAGE_OS2_HEADER *ne )
printf( "Resident name table: %x\n", ne->ne_restab );
printf( "Module table: %x\n", ne->ne_modtab );
printf( "Import table: %x\n", ne->ne_imptab );
printf( "Non-resident table: %lx\n", ne->ne_nrestab );
printf( "Non-resident table: %x\n", ne->ne_nrestab );
printf( "Exe type: %x\n", ne->ne_exetyp );
printf( "Other flags: %x\n", ne->ne_flagsothers );
printf( "Fast load area: %x-%x\n", ne->ne_pretthunks << ne->ne_align,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment