Skip to content

Commit

Permalink
Merge pull request #835 from pshipton/clangwarn2
Browse files Browse the repository at this point in the history
Backport parts of 8300169: Build failure with clang-15
  • Loading branch information
keithc-ca authored Nov 5, 2024
2 parents 745bbda + dad121d commit 5d3e23f
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
7 changes: 5 additions & 2 deletions make/lib/Awt2dLibraries.gmk
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -22,6 +22,9 @@
# or visit www.oracle.com if you need additional information or have any
# questions.
#
# ===========================================================================
# (c) Copyright IBM Corp. 2024, 2024 All Rights Reserved
# ===========================================================================

$(eval $(call IncludeCustomExtension, lib/Awt2dLibraries-pre.gmk))

Expand Down Expand Up @@ -227,7 +230,7 @@ $(eval $(call SetupJdkLibrary, BUILD_LIBAWT, \
EXTRA_HEADER_DIRS := $(LIBAWT_EXTRA_HEADER_DIRS), \
DISABLED_WARNINGS_gcc := sign-compare unused-result maybe-uninitialized \
format-nonliteral parentheses, \
DISABLED_WARNINGS_clang := logical-op-parentheses extern-initializer, \
DISABLED_WARNINGS_clang := logical-op-parentheses extern-initializer deprecated-non-prototype unknown-warning-option, \
DISABLED_WARNINGS_solstudio := E_DECLARATION_IN_CODE, \
DISABLED_WARNINGS_microsoft := 4244 4267 4996, \
ASFLAGS := $(LIBAWT_ASFLAGS), \
Expand Down
4 changes: 2 additions & 2 deletions src/java.desktop/macosx/native/libawt_lwawt/awt/CPrinterJob.m
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -63,7 +63,7 @@
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);

Expand Down
2 changes: 1 addition & 1 deletion src/java.desktop/share/native/libharfbuzz/hb-meta.hh
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,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)
Expand Down

0 comments on commit 5d3e23f

Please sign in to comment.