diff --git a/make/modules/java.desktop/lib/Awt2dLibraries.gmk b/make/modules/java.desktop/lib/Awt2dLibraries.gmk index 5c1021886f6..998e0e70b15 100644 --- a/make/modules/java.desktop/lib/Awt2dLibraries.gmk +++ b/make/modules/java.desktop/lib/Awt2dLibraries.gmk @@ -251,6 +251,13 @@ ifeq ($(call isTargetOs, windows macosx), false) DISABLED_WARNINGS_gcc_XRBackendNative.c := maybe-uninitialized, \ DISABLED_WARNINGS_gcc_XToolkit.c := unused-result, \ DISABLED_WARNINGS_gcc_XWindow.c := unused-function, \ + DISABLED_WARNINGS_clang_awt_Taskbar.c := parentheses, \ + DISABLED_WARNINGS_clang_gtk2_interface.c := parentheses, \ + DISABLED_WARNINGS_clang_gtk3_interface.c := parentheses, \ + DISABLED_WARNINGS_clang_OGLBufImgOps.c := format-nonliteral, \ + DISABLED_WARNINGS_clang_OGLPaints.c := format-nonliteral, \ + DISABLED_WARNINGS_clang_screencast_pipewire.c := format-nonliteral, \ + DISABLED_WARNINGS_clang_sun_awt_X11_GtkFileDialogPeer.c := parentheses, \ DISABLED_WARNINGS_clang_aix := deprecated-non-prototype, \ DISABLED_WARNINGS_clang_aix_awt_Taskbar.c := parentheses, \ DISABLED_WARNINGS_clang_aix_OGLPaints.c := format-nonliteral, \ diff --git a/make/modules/java.security.jgss/Lib.gmk b/make/modules/java.security.jgss/Lib.gmk index a13c2987cd6..fcd46b44044 100644 --- a/make/modules/java.security.jgss/Lib.gmk +++ b/make/modules/java.security.jgss/Lib.gmk @@ -33,6 +33,7 @@ $(eval $(call SetupJdkLibrary, BUILD_LIBJ2GSS, \ CFLAGS := $(CFLAGS_JDKLIB), \ DISABLED_WARNINGS_gcc := undef, \ DISABLED_WARNINGS_clang_aix := undef, \ + DISABLED_WARNINGS_clang := undef, \ LDFLAGS := $(LDFLAGS_JDKLIB) \ $(call SET_SHARED_LIBRARY_ORIGIN), \ LIBS := $(LIBDL), \ diff --git a/make/modules/jdk.hotspot.agent/Lib.gmk b/make/modules/jdk.hotspot.agent/Lib.gmk index 478d199e5ec..d21c969c188 100644 --- a/make/modules/jdk.hotspot.agent/Lib.gmk +++ b/make/modules/jdk.hotspot.agent/Lib.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2015, 2022, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2015, 2023, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -61,6 +61,7 @@ $(eval $(call SetupJdkLibrary, BUILD_LIBSA, \ OPTIMIZATION := HIGH, \ DISABLED_WARNINGS_gcc := sign-compare, \ DISABLED_WARNINGS_gcc_ps_core.c := pointer-arith, \ + DISABLED_WARNINGS_clang_ps_core.c := pointer-arith, \ DISABLED_WARNINGS_clang := sign-compare, \ DISABLED_WARNINGS_clang_libproc_impl.c := format-nonliteral, \ DISABLED_WARNINGS_clang_sadis.c := format-nonliteral, \ diff --git a/make/modules/jdk.jpackage/Lib.gmk b/make/modules/jdk.jpackage/Lib.gmk index 8cce38fe0cd..1d3e27e8a6b 100644 --- a/make/modules/jdk.jpackage/Lib.gmk +++ b/make/modules/jdk.jpackage/Lib.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2018, 2022, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2018, 2023, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -65,6 +65,8 @@ $(eval $(call SetupJdkExecutable, BUILD_JPACKAGE_APPLAUNCHEREXE, \ INCLUDE_FILES := $(JPACKAGE_APPLAUNCHER_INCLUDE_FILES), \ TOOLCHAIN := $(JPACKAGE_APPLAUNCHER_TOOLCHAIN), \ OPTIMIZATION := LOW, \ + DISABLED_WARNINGS_clang_LinuxPackage.c := format-nonliteral, \ + DISABLED_WARNINGS_clang_JvmLauncherLib.c := format-nonliteral, \ CXXFLAGS := $(call JpackageWithStaticCrt, $(CXXFLAGS_JDKEXE)) \ $(JPACKAGE_APPLAUNCHER_INCLUDES), \ CFLAGS := $(call JpackageWithStaticCrt, $(CFLAGS_JDKEXE)) \ @@ -103,6 +105,8 @@ ifeq ($(call isTargetOs, linux), true) EXCLUDE_FILES := LinuxLauncher.c LinuxPackage.c, \ TOOLCHAIN := TOOLCHAIN_LINK_CXX, \ OPTIMIZATION := LOW, \ + DISABLED_WARNINGS_clang_JvmLauncherLib.c := format-nonliteral, \ + DISABLED_WARNINGS_clang_tstrings.cpp := format-nonliteral, \ CXXFLAGS := $(CXXFLAGS_JDKLIB) $(JPACKAGE_LIBAPPLAUNCHER_INCLUDES), \ CFLAGS := $(CFLAGS_JDKLIB) $(JPACKAGE_LIBAPPLAUNCHER_INCLUDES), \ LDFLAGS := $(LDFLAGS_JDKLIB), \ diff --git a/make/modules/jdk.management/Lib.gmk b/make/modules/jdk.management/Lib.gmk index 7afce982380..b4bf5084413 100644 --- a/make/modules/jdk.management/Lib.gmk +++ b/make/modules/jdk.management/Lib.gmk @@ -1,5 +1,5 @@ # -# Copyright (c) 2015, 2022, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2015, 2023, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -44,6 +44,7 @@ endif $(eval $(call SetupJdkLibrary, BUILD_LIBMANAGEMENT_EXT, \ NAME := management_ext, \ OPTIMIZATION := $(LIBMANAGEMENT_EXT_OPTIMIZATION), \ + DISABLED_WARNINGS_clang_UnixOperatingSystem.c := format-nonliteral, \ CFLAGS := $(CFLAGS_JDKLIB) $(LIBMANAGEMENT_EXT_CFLAGS), \ LDFLAGS := $(LDFLAGS_JDKLIB) \ $(call SET_SHARED_LIBRARY_ORIGIN), \ diff --git a/src/java.desktop/unix/native/libawt_xawt/awt/gtk2_interface.c b/src/java.desktop/unix/native/libawt_xawt/awt/gtk2_interface.c index 9f6621ea97d..52e9e35955f 100644 --- a/src/java.desktop/unix/native/libawt_xawt/awt/gtk2_interface.c +++ b/src/java.desktop/unix/native/libawt_xawt/awt/gtk2_interface.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2023, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -1092,8 +1092,8 @@ static void init_toggle_widget(WidgetType widget_type, gint synth_state) ((GtkObject*)gtk2_widget)->flags &= ~GTK_HAS_FOCUS; } - if ((synth_state & MOUSE_OVER) != 0 && (synth_state & PRESSED) == 0 || - (synth_state & FOCUSED) != 0 && (synth_state & PRESSED) != 0) { + if ((((synth_state & MOUSE_OVER) != 0) && ((synth_state & PRESSED) == 0)) || + (((synth_state & FOCUSED) != 0) && ((synth_state & PRESSED) != 0))) { gtk2_widget->state = GTK_STATE_PRELIGHT; } else if ((synth_state & DISABLED) != 0) { gtk2_widget->state = GTK_STATE_INSENSITIVE;