winedump: Cast-qual warnings fix (with thanks to Dmitry Timoshkov
and Eric Pouech ) (Try 3)
Andrew Talbot
Andrew.Talbot at talbotville.com
Wed Oct 11 16:20:10 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 22:04:07.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)(ULONG_PTR)((const BYTE *)&((const IMAGE_NT_HEADERS *)(ntheader))->OptionalHeader + \
+ ((const IMAGE_NT_HEADERS *)(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