On Wed, 12 Aug 2026 07:45:29 GMT, Matthias Baesken <[email protected]> wrote:
>> The warning 'local variable is initialized but not referenced' should be >> enabled in the JDK native libs build on Windows with MSVC. >> We could could do it first with the JDK native libs, because Hotspot >> contains a lot of debug-only assert code that triggers those warnings in >> product builds, JDK has less of these asserts. >> GCC seems to have already similar/related warnings (but they are disabled >> for some libs). >> >> Warning description : >> https://learn.microsoft.com/en-us/cpp/error-messages/compiler-warnings/compiler-warning-level-4-c4189?view=msvc-170 >> >> --------- >> - [x] I confirm that I make this contribution in accordance with the >> [OpenJDK Interim AI Policy](https://openjdk.org/legal/ai). > > Matthias Baesken has updated the pull request incrementally with one > additional commit since the last revision: > > Dead code in AccessBridgeJavaVMInstance > > Any comment/reviews? > > Especially on the topic Julian brought up? > > I don't mind removing the unused variables, the code looks cleaner. > > @TheShermanTanker could've given you the reference to his review in #21656 to > which I already referred in your PR > [https://github.com/openjdk/jdk/pull/32088#issuecomment-5147100376](https://github.com/openjdk/jdk/pull/32088#issuecomment-5147100376%E2%80%8C). > > Indeed, in Julian's PR @azuev-java advocated for preserving the local > variables for debugging purposes: > [https://github.com/openjdk/jdk/pull/21656#discussion_r1922911678](https://github.com/openjdk/jdk/pull/21656#discussion_r1922911678%E2%80%8C). > > Otherwise, the changes look reasonable to me. Is this about the removal in AccessBridgeJavaVMInstance.cpp ? I could add a maybe_unused if keeping the variable is really desired. Not sure why you need it in debug sessions, but if it is good for something than fine with me. ------------- PR Comment: https://git.openjdk.org/jdk/pull/32298#issuecomment-5359189619
