On Mon, 16 Nov 2026 11:29:13 GMT, Matthias Baesken <[email protected]> wrote:
>> While testing new MSVC warning flags, a number of unused but initialized >> variables in java.desktop have been found. >> A lot of them can be removed. A few are needed for special build variants >> like (fast)debug only so they have to stay. >> >> --------- >> - [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: > > Remove maybe_unused usage from the change Sorry lost track of this one. I submitted a test job to be sure this changes don't raise some different warning. It passed. So I've just that one (last I hope) comment to be addressed and it should be good. src/java.desktop/share/native/common/java2d/opengl/OGLSurfaceData.c line 336: > 334: if (error != GL_NO_ERROR) { > 335: J2dTraceLn(J2D_TRACE_VERBOSE, "OGLSD_InitFBObject: "\ > 336: "could not create depth buffer: error=%x", This loses debug info. Maybe we could put the calculation in here so we have J2dTraceLn(J2D_TRACE_VERBOSE, "OGLSD_InitFBObject: "\ "could not create depth buffer: depth=%d error=%x", /* depthSize = */ (16 + (I * 8)) , error); you'd have to repeat this of course in the 2 other uses, but better than losing it. ------------- PR Review: https://git.openjdk.org/jdk/pull/33495#pullrequestreview-6013955142 PR Review Comment: https://git.openjdk.org/jdk/pull/33495#discussion_r4659565283
