winedump: Cast-qual warnings fix (Try 2)

Andrew Talbot Andrew.Talbot at talbotville.com
Wed Oct 11 14:09:11 CDT 2006


This patch fixes a couple of -Wcast-qual warnings in winedump/pe.c. Please
advise of preferred alternative on wine-devel if rejecting.

Thanks,

-- Andy.
---
Changelog:
    winedump: Cast-qual warnings fix.

diff -urN a/include/winnt.h b/include/winnt.h
--- a/include/winnt.h	2006-09-29 17:50:36.000000000 +0100
+++ b/include/winnt.h	2006-10-11 20:07:15.000000000 +0100
@@ -2336,8 +2336,8 @@
 #define	IMAGE_SIZEOF_SECTION_HEADER 40
 
 #define IMAGE_FIRST_SECTION(ntheader) \
-  ((PIMAGE_SECTION_HEADER)((LPBYTE)&((PIMAGE_NT_HEADERS)(ntheader))->OptionalHeader + \
-                           ((PIMAGE_NT_HEADERS)(ntheader))->FileHeader.SizeOfOptionalHeader))
+  ((PIMAGE_SECTION_HEADER)((LPBYTE)&((PIMAGE_NT_HEADERS)(ULONG_PTR)(ntheader))->OptionalHeader + \
+                           ((PIMAGE_NT_HEADERS)(ULONG_PTR)(ntheader))->FileHeader.SizeOfOptionalHeader))
 
 /* These defines are for the Characteristics bitfield. */
 /* #define IMAGE_SCN_TYPE_REG			0x00000000 - Reserved */



More information about the wine-patches mailing list