RFR: 8342870: Errors related to unused code on Windows after 8339120 in accessibility [v5]
Julian Waters
jwaters at openjdk.org
Mon Sep 8 14:17:53 UTC 2025
On Thu, 23 Jan 2025 05:34:00 GMT, Julian Waters <jwaters at openjdk.org> wrote:
>> src/jdk.accessibility/windows/native/jaccessinspector/jaccessinspector.cpp line 1212:
>>
>>> 1210: }
>>> 1211:
>>> 1212: static_cast<void>(lastError);
>>
>> This falls into category that's useful for debugging only. The value of `lastError` is never used to report an error, yet one can use a debugger to inspect the value.
>>
>> There seems to be no way to report or log the error.
>>
>> Isn't it better to add a flag to suppress the warning? Casting `lastError` to `void` is cryptic. A comment would definitely be helpful here.
>
> I suppose I could do that yes, if that that is preferred
[[maybe_unused]] has arrived! Let's all rejoice!
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/21656#discussion_r2330378837
More information about the client-libs-dev
mailing list