On Mon, 2 Sep 2024 13:25:51 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) > > Matthias Baesken has updated the pull request incrementally with one > additional commit since the last revision: > > adjust indentation in X11Color.c LGTM. Only minor nits. src/java.base/unix/native/libjava/TimeZone_md.c line 63: > 61: static const char *ETC_ENVIRONMENT_FILE = "/etc/environment"; > 62: #else > 63: static char *isFileIdentical(char* buf, size_t size, char *pathname); I think it should better be moved below `#if defined(__linux__) || defined(MACOSX)` instead of creating an else case. src/java.desktop/unix/native/common/awt/X11Color.c line 1234: > 1232: awt_allocate_systemrgbcolors (jint *rgbColors, int num_colors, > 1233: AwtGraphicsConfigDataPtr awtData) { > 1234: for (int i = 0; i < num_colors; i++) This requires C99. Is this ok for all platforms with all supported compilers? ------------- PR Review: https://git.openjdk.org/jdk/pull/20812#pullrequestreview-2276121217 PR Review Comment: https://git.openjdk.org/jdk/pull/20812#discussion_r1741226250 PR Review Comment: https://git.openjdk.org/jdk/pull/20812#discussion_r1741228253