On Mon, 2 Sep 2024 11:43:20 GMT, Matthias Baesken <mbaes...@openjdk.org> wrote:
> We get a couple of warnings as errors on AIX because of unused variables or > functions , for example : > /priv/jenkins/client-home/workspace/openjdk-jdk-dev-aix_ppc64-opt/jdk/src/java.base/unix/native/libjava/ProcessHandleImpl_unix.c:665:10: > error: unused variable 'exePath' [-Werror,-Wunused-variable] > char exePath[PATH_MAX]; > ^ > /priv/jenkins/client-home/workspace/openjdk-jdk-dev-aix_ppc64-opt/jdk/src/java.base/unix/native/libjava/ProcessHandleImpl_unix.c:668:9: > error: unused variable 'ret' [-Werror,-Wunused-variable] > int ret; > ^ > /priv/jenkins/client-home/workspace/openjdk-jdk-dev-aix_ppc64-opt/jdk/src/java.base/unix/native/libjava/ProcessHandleImpl_unix.c:664:10: > error: unused variable 'fn' [-Werror,-Wunused-variable] > char fn[32]; > ^ > > This seems to be related to the recent make changes > 8339156: Use more fine-granular clang unused warnings > https://bugs.openjdk.org/browse/JDK-8339156 > (we use clang too on AIX) Looks good and seems like the warning helped to clean out coding in a few places. src/java.desktop/unix/native/common/awt/X11Color.c line 1236: > 1234: for (int i = 0; i < num_colors; i++) > 1235: alloc_col (awt_display, awtData->awt_cmap, red (rgbColors [i]), > 1236: green (rgbColors [i]), blue (rgbColors [i]), -1, Seems like indentation here could be improved a bit. ------------- Marked as reviewed by clanger (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/20812#pullrequestreview-2275486151 PR Review Comment: https://git.openjdk.org/jdk/pull/20812#discussion_r1740824222