On Mon, 8 Mar 2021 00:56:24 GMT, Yasumasa Suenaga <ysuen...@openjdk.org> wrote:

>> I saw C4530 with VS 2019 (16.9.0) as following (on Japanese locale):
>> 
>> AccessBridgeDebug.cpp
>> メモ: インクルード ファイル: 
>> d:\github-forked\jdk\src\jdk.accessibility\windows\native\common\AccessBridgeDebug.h
>> 
>>     :
>> 
>> c:\progra~2\micros~2\2019\commun~1\vc\tools\msvc\1428~1.299\include\ostream(611):
>>  error C2220: 次の警
>> 告はエラーとして処理されます
>> c:\progra~2\micros~2\2019\commun~1\vc\tools\msvc\1428~1.299\include\ostream(611):
>>  warning C4530: C++
>> 例外処理を使っていますが、アンワインド セマンティクスは有効にはなりません。/EHsc を指定してください。
>> メモ: インクルード ファイル: 
>> c:\progra~2\micros~2\2019\commun~1\vc\tools\msvc\1428~1.299\include\string
>> 
>> `/EHsc` has been already passed in other makefiles, and also 
>> AccessBridgeDebug.cpp uses some STL classes (e.g. `chrono` namespace). So 
>> `/EHsc` is a solution for this problem.
>
> Yasumasa Suenaga has updated the pull request incrementally with one 
> additional commit since the last revision:
> 
>   Refactoring

Hi Yasumasa,

small nits below. But this looks fine to me as it is already so I leave it up 
to you and the others whether to change anything. Thank you for taking my 
suggestion.

Cheers, Thomas

src/jdk.accessibility/windows/native/common/AccessBridgeDebug.cpp line 80:

> 78:     uli.LowPart = ft.dwLowDateTime;
> 79:     uli.HighPart = ft.dwHighDateTime;
> 80:     return (uli.QuadPart / 10000ULL) - 11644473600000ULL; // Rebase Epoch 
> from 1601 to 1970

This is good and true to the original change; 

I am not even sure the epoch rebase is needed. All 8196681 did was to print out 
the timestamps verbatim. I do not know enough about how that debug trace is 
used, and if the timestamps really have to be 1970 based.

src/jdk.accessibility/windows/native/common/AccessBridgeDebug.cpp line 35:

> 33: #include <windows.h>
> 34: #include <cstdlib>
> 35: #include <cstring>

Matter of taste, but I would prefer stdlib.h and string.h instead of cxxx. Just 
to keep in line with the rest of the coding. Weird mix of styles otherwise (I 
mean this code still uses 16bit era Windows APIs).

-------------

Marked as reviewed by stuefe (Reviewer).

PR: https://git.openjdk.java.net/jdk/pull/2859

Reply via email to