This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/39063] New: libgcc2.c:mprotect() for mingw, incompatible pointer type warning
- From: "sezeroz at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 1 Feb 2009 16:52:54 -0000
- Subject: [Bug target/39063] New: libgcc2.c:mprotect() for mingw, incompatible pointer type warning
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
in windows replacement of mprotect() in libgcc2.c uses VirtualProtect
which requires an unsigned, not a signed ptr as its last argument. the
attached patch fixes a 'may be used uninitialized' warning, too.
here are the warnings:
../../../gcc-svn/libgcc/../gcc/libgcc2.c: In function 'mprotect':
../../../gcc-svn/libgcc/../gcc/libgcc2.c:2079: warning: passing argument 4 of
'VirtualProtect' from incompatible pointer type
/opt/buildroot/gcc-svn/winsup/mingw/include/winbase.h:1126: note: expected
'PDWORD' but argument is of type 'int *'
../../../gcc-svn/libgcc/../gcc/libgcc2.c:2064: warning: 'np' may be used
uninitialized in this function
--
Summary: libgcc2.c:mprotect() for mingw, incompatible pointer
type warning
Product: gcc
Version: 4.4.0
Status: UNCONFIRMED
Severity: trivial
Priority: P3
Component: target
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: sezeroz at gmail dot com
GCC target triplet: x86_64-pc-mingw32
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39063