RFR: 8342870: Errors related to unused code on Windows after 8339120 in accessibility [v5]
Julian Waters
jwaters at openjdk.org
Tue Jan 21 00:45:39 UTC 2025
On Mon, 20 Jan 2025 23:35:33 GMT, Alexander Zuev <kizune at openjdk.org> wrote:
>> Julian Waters has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains eight commits:
>>
>> - Merge branch 'openjdk:master' into accessibility
>> - Cast to void in AccessBridgeCalls.c
>> - static_cast to void in jaccessinspector.cpp
>> - Formatting changes in AccessBridgeEventHandler.cpp
>> - Merge branch 'master' into accessibility
>> - Remove now unused result
>> - Merge branch 'master' into accessibility
>> - 8342870
>
> src/jdk.accessibility/windows/native/libwindowsaccessbridge/AccessBridgeJavaVMInstance.cpp line 271:
>
>> 269: DEBUG_CODE(if (*type == cGetAccessibleTextItemsPackage) {)
>> 270: DEBUG_CODE(AppendToCallInfo(" 'memoryMappedView' now contains:"));
>> 271: // DEBUG_CODE(GetAccessibleTextItemsPackage *pkg = (GetAccessibleTextItemsPackage *) (buffer + sizeof(PackageType)));
>
> Why do we need to comment out that? In non-debug build it will be replaced by the comment block anyways.
In release builds this isn't an issue, but when building either fastdebug or slowdebug it fails as pkg is unused. Should this be removed or retained and marked explicitly so the compiler doesn't complain? I'm not sure whether this falls into the category of "Unused but useful to have in a debugger session" mentioned above
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/21656#discussion_r1922937100
More information about the client-libs-dev
mailing list