8300169: Build failure with clang-15

Reviewed-by: dholmes, prr
This commit is contained in:
Jie Fu 2023-01-18 10:32:00 +00:00
parent d9180423b8
commit 15a9186db2
6 changed files with 15 additions and 10 deletions

View File

@ -1,5 +1,5 @@
#
# Copyright (c) 2013, 2022, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2013, 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
@ -166,8 +166,10 @@ $(eval $(call SetupJdkLibrary, BUILD_LIBJVM, \
DISABLED_WARNINGS_clang_g1ParScanThreadState.cpp := delete-abstract-non-virtual-dtor, \
DISABLED_WARNINGS_clang_g1YoungGCPostEvacuateTasks.cpp := delete-abstract-non-virtual-dtor, \
DISABLED_WARNINGS_clang_management.cpp := missing-field-initializers, \
DISABLED_WARNINGS_clang_notificationThread.cpp := bitwise-instead-of-logical, \
DISABLED_WARNINGS_clang_os_posix.cpp := mismatched-tags missing-field-initializers, \
DISABLED_WARNINGS_clang_postaloc.cpp := tautological-undefined-compare, \
DISABLED_WARNINGS_clang_serviceThread.cpp := bitwise-instead-of-logical, \
DISABLED_WARNINGS_clang_vm_version_x86.cpp := missing-field-initializers, \
DISABLED_WARNINGS_clang_zTracer.cpp := undefined-var-template, \
DISABLED_WARNINGS_xlc := $(DISABLED_WARNINGS_xlc), \

View File

@ -1,5 +1,5 @@
#
# Copyright (c) 2011, 2022, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2011, 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
@ -140,6 +140,7 @@ $(eval $(call SetupJdkLibrary, BUILD_LIBZIP, \
$(LIBZ_CFLAGS), \
CFLAGS_unix := $(BUILD_LIBZIP_MMAP) -UDEBUG, \
DISABLED_WARNINGS_gcc_zip_util.c := unused-function, \
DISABLED_WARNINGS_clang := deprecated-non-prototype, \
DISABLED_WARNINGS_clang_gzwrite.c := format-nonliteral, \
LDFLAGS := $(LDFLAGS_JDKLIB) \
$(call SET_SHARED_LIBRARY_ORIGIN), \
@ -211,7 +212,7 @@ $(eval $(call SetupJdkLibrary, BUILD_LIBJLI, \
OPTIMIZATION := HIGH, \
CFLAGS := $(CFLAGS_JDKLIB) $(LIBJLI_CFLAGS), \
DISABLED_WARNINGS_gcc := unused-function, \
DISABLED_WARNINGS_clang := format-nonliteral, \
DISABLED_WARNINGS_clang := format-nonliteral deprecated-non-prototype, \
LDFLAGS := $(LDFLAGS_JDKLIB) \
$(call SET_SHARED_LIBRARY_ORIGIN), \
LIBS_unix := $(LIBZ_LIBS), \

View File

@ -1,5 +1,5 @@
#
# Copyright (c) 2011, 2022, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2011, 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
@ -147,7 +147,7 @@ $(eval $(call SetupJdkLibrary, BUILD_LIBAWT, \
DISABLED_WARNINGS_gcc_Region.c := maybe-uninitialized, \
DISABLED_WARNINGS_gcc_SurfaceData.c := unused-value, \
DISABLED_WARNINGS_gcc_TransformHelper.c := sign-compare, \
DISABLED_WARNINGS_clang_awt_ImagingLib.c := sign-compare, \
DISABLED_WARNINGS_clang_awt_ImagingLib.c := sign-compare deprecated-non-prototype, \
DISABLED_WARNINGS_clang_awt_parseImage.c := sign-compare, \
DISABLED_WARNINGS_clang_debug_mem.c := extern-initializer format-nonliteral, \
DISABLED_WARNINGS_clang_debug_trace.c := format-nonliteral, \
@ -757,6 +757,7 @@ ifeq ($(ENABLE_HEADLESS_ONLY), false)
DISABLED_WARNINGS_gcc_splashscreen_gfx_impl.c := implicit-fallthrough maybe-uninitialized, \
DISABLED_WARNINGS_gcc_splashscreen_impl.c := implicit-fallthrough sign-compare unused-function, \
DISABLED_WARNINGS_gcc_splashscreen_sys.c := type-limits unused-result, \
DISABLED_WARNINGS_clang := deprecated-non-prototype, \
DISABLED_WARNINGS_clang_dgif_lib.c := sign-compare, \
DISABLED_WARNINGS_clang_gzwrite.c := format-nonliteral, \
DISABLED_WARNINGS_clang_splashscreen_impl.c := sign-compare, \
@ -829,6 +830,7 @@ ifeq ($(call isTargetOs, macosx), true)
DISABLED_WARNINGS_clang_ImageSurfaceData.m := enum-conversion parentheses-equality, \
DISABLED_WARNINGS_clang_MTLBlitLoops.m := pointer-arith, \
DISABLED_WARNINGS_clang_MTLPipelineStatesStorage.m := semicolon-before-method-body, \
DISABLED_WARNINGS_clang_MTLRenderer.m := gnu-folding-constant, \
DISABLED_WARNINGS_clang_MTLVertexCache.m := pointer-arith, \
DISABLED_WARNINGS_clang_OGLBufImgOps.c := format-nonliteral, \
DISABLED_WARNINGS_clang_OGLPaints.c := format-nonliteral, \

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1997, 2022, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 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
@ -1732,7 +1732,7 @@ void GenerateOopMap::ppop(CellTypeState *out) {
}
void GenerateOopMap::ppush1(CellTypeState in) {
assert(in.is_reference() | in.is_value(), "sanity check");
assert(in.is_reference() || in.is_value(), "sanity check");
push(in);
}

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2011, 2020, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2011, 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
@ -59,7 +59,7 @@ static jmethodID sjm_printerJob = NULL;
GET_CPRINTERDIALOG_CLASS_RETURN(ret); \
GET_FIELD_RETURN(sjm_printerJob, sjc_CPrinterDialog, "fPrinterJob", "Lsun/lwawt/macosx/CPrinterJob;", ret);
static NSPrintInfo* createDefaultNSPrintInfo();
static NSPrintInfo* createDefaultNSPrintInfo(JNIEnv* env, jstring printer);
static void makeBestFit(NSPrintInfo* src);

View File

@ -188,7 +188,7 @@ template <> struct hb_int_max<signed long long> : hb_integral_constant<s
template <> struct hb_int_max<unsigned long long> : hb_integral_constant<unsigned long long, ULLONG_MAX> {};
#define hb_int_max(T) hb_int_max<T>::value
#if defined(__GNUC__) && __GNUC__ < 5
#if defined(__GNUC__) && __GNUC__ < 5 && !defined(__clang__)
#define hb_is_trivially_copyable(T) __has_trivial_copy(T)
#define hb_is_trivially_copy_assignable(T) __has_trivial_assign(T)
#define hb_is_trivially_constructible(T) __has_trivial_constructor(T)