RFR: 8375370: XRBackendNative.c reported variable uninitialized by clang23

SendaoYan syan at openjdk.org
Thu Jan 15 07:43:29 UTC 2026


Hi all,

The local variable `pict_attr` in function `JNIEXPORT jint JNICALL Java_sun_java2d_xr_XRBackendNative_createPictureNative  (JNIEnv *env, jclass cls, jint drawable, jlong formatPtr)` reported variable uninitialized by clang23. This PR initial `pict_attr.repeat` to `RepeatNone` which will avoid compiler warning by clang23. This mofication references another `XRenderCreatePicture` call at  file [XRSurfaceData.c](https://github.com/openjdk/jdk/blob/master/src/java.desktop/unix/native/libawt_xawt/java2d/x11/XRSurfaceData.c#L72), they are all call the same function `XRenderCreatePicture`.

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

Commit messages:
 - 8375370: XRBackendNative.c reported variable uninitialized by clang23

Changes: https://git.openjdk.org/jdk/pull/29248/files
  Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=29248&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8375370
  Stats: 2 lines in 1 file changed: 1 ins; 0 del; 1 mod
  Patch: https://git.openjdk.org/jdk/pull/29248.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/29248/head:pull/29248

PR: https://git.openjdk.org/jdk/pull/29248


More information about the client-libs-dev mailing list