<AWT Dev> [PATCH] Fix some C++ conformance issues in AWT Windows code
Philip Race
philip.race at oracle.com
Tue May 28 21:16:51 UTC 2019
Andrew's name is on the list already.
-phil.
On 5/28/19, 2:04 PM, Sergey Bylokhov wrote:
> Hi, Andrew.
>
> Thank you for the patch! We would be glad to accept patches from you.
> However, you will need to sign an OCA before we can do that:
> https://www.oracle.com/technetwork/community/oca-486395.html
>
> On 28/05/2019 13:52, Andrew Luo wrote:
>> Adding an updated patch. It seems I missed a file.
>>
>> Testing done: compiled with both /permissive- set and without.
>>
>> Thanks,
>>
>> -Andrew
>>
>> *From:* awt-dev <awt-dev-bounces at openjdk.java.net> *On Behalf Of
>> *Andrew Luo
>> *Sent:* Monday, May 13, 2019 5:40 PM
>> *To:* awt-dev at openjdk.java.net
>> *Subject:* <AWT Dev> [PATCH] Fix some C++ conformance issues in AWT
>> Windows code
>>
>> I’ve been trying to get the JDK to compile with the new /permissive-
>> switch in VS2017
>> (https://devblogs.microsoft.com/cppblog/permissive-switch/) however
>> there have been a few issues in various parts of the code.
>>
>> While testing this, I found some issues in the AWT code. In one case
>> we name a function with the class:: prefix when the function is
>> declared inline in the class definition. Other cases include where
>> we are assigning string literals to non-const char* variables. I
>> took some time to fix these and attached a patch. Let me know if
>> there are any comments.
>>
>> c:\Users\Andrew\Documents\mercurial\openjdk\jdk\src\java.desktop\windows\native\libawt\windows\awt.h(343):
>> error C2440: 'return': cannot convert from 'const unsigned short *'
>> to 'LPWSTR'
>>
>> c:\Users\Andrew\Documents\mercurial\openjdk\jdk\src\java.desktop\windows\native\libawt\windows\awt.h(343):
>> note: Conversion from string literal loses const qualifier (see
>> /Zc:strictStrings)
>>
>> c:\users\andrew\documents\mercurial\openjdk\jdk\src\java.desktop\windows\native\libawt\windows\awt_Component.h(455):
>> error C2061: syntax error: identifier 'javaKey'
>>
>> c:\users\andrew\documents\mercurial\openjdk\jdk\src\java.desktop\windows\native\libawt\windows\awt_Component.h(455):
>> error C4430: missing type specifier - int assumed. Note: C++ does not
>> support default-int
>>
>> Thanks,
>>
>> -Andrew
>>
>
>
More information about the awt-dev
mailing list