This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] libgcc2.c:mprotect() for mingw, incompatible pointer type warning


2009/3/14 Ozkan Sezer <sezeroz@gmail.com>:
> On Sat, Mar 14, 2009 at 4:23 PM, Kai Tietz <ktietz70@googlemail.com> wrote:
>> 2009/3/14 O.Sezer <sezeroz@gmail.com>:
>>> in windows replacement of mprotect() in libgcc2.c uses VirtualProtect
>>> which requires an unsigned, not a signed ptr as its last argument.
>>> 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
>>>
>>> the attached trivial patch fixes it. it also fixes a 'may be used uninitialized'
>>> warning, too.
>>>
>>> --
>>> Ozkan
>>>
>>> PS: this was previously entered as an entry in the gcc bugzilla (39063).
>>>
>>
>> Thank you Ozkan,
>>
>> I can confirm, that this patch fixes the warning about mprotect for
>> win32 target.
>> From point of view this patch is ok. Do you have papers with FSF?
>
> No (I guess you're asking whether I have write access to the svn? in
> that case I don't)

For this patch it doesn't matter. But there is a limitation of
acceptance of patches without FSF license agreement of 15 lines of
code in total. And I see you have send many (good) patches. So I think
you should make the paperwork with FSF as soon as possible (see
http://gcc.gnu.org/contribute.html#legal).

>> The change log entry is missing and it should mention the PR/39963.
>>
>
> Do you want a new patch, or do you (or anyone else that
> would apply it upon possible approval) would already make
> the necessary changes?

No, just sent a changelog entry by mail. The changelog entry needs not
to be part of the patch itself.

>> I can't approve it, but I added Ian to the CC list for it.
>>
>
> OK
>
>> Cheers,
>> Kai
>
> Ozkan
>


Cheers,
Kai

-- 
|  (\_/) This is Bunny. Copy and paste
| (='.'=) Bunny into your signature to help
| (")_(") him gain world domination


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]