Skip to content
This repository was archived by the owner on Oct 9, 2025. It is now read-only.

Commit 9486b7c

Browse files
Jan KratochvilTheRealMDoerr
authored andcommitted
8324243: Compilation failures in java.desktop module with gcc 14
Backport-of: 8e5f6ddb68572c0cc8b6e256e423706f6f7cec94
1 parent 2ec7dbf commit 9486b7c

File tree

4 files changed

+6
-4
lines changed

4 files changed

+6
-4
lines changed

make/modules/java.desktop/lib/Awt2dLibraries.gmk

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -506,8 +506,10 @@ else
506506
# noexcept-type required for GCC 7 builds. Not required for GCC 8+.
507507
# expansion-to-defined required for GCC 9 builds. Not required for GCC 10+.
508508
# maybe-uninitialized required for GCC 8 builds. Not required for GCC 9+.
509+
# calloc-transposed-args required for GCC 14 builds. (fixed upstream in Harfbuzz 032c931e1c0cfb20f18e5acb8ba005775242bd92)
509510
HARFBUZZ_DISABLED_WARNINGS_CXX_gcc := class-memaccess noexcept-type \
510-
expansion-to-defined dangling-reference maybe-uninitialized
511+
expansion-to-defined dangling-reference maybe-uninitialized \
512+
calloc-transposed-args
511513
HARFBUZZ_DISABLED_WARNINGS_clang := missing-field-initializers range-loop-analysis
512514
HARFBUZZ_DISABLED_WARNINGS_microsoft := 4267 4244
513515

src/java.desktop/linux/native/libjsound/PLATFORM_API_LinuxOS_ALSA_MidiIn.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ MidiMessage* MIDI_IN_GetMessage(MidiDeviceHandle* handle) {
218218
return NULL;
219219
}
220220
}
221-
jdk_message = (MidiMessage*) calloc(sizeof(MidiMessage), 1);
221+
jdk_message = (MidiMessage*) calloc(1, sizeof(MidiMessage));
222222
if (!jdk_message) {
223223
ERROR0("< ERROR: MIDI_IN_GetMessage(): out of memory\n");
224224
return NULL;

src/java.desktop/linux/native/libjsound/PLATFORM_API_LinuxOS_ALSA_MidiUtils.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -383,7 +383,7 @@ INT32 openMidiDevice(snd_rawmidi_stream_t direction, INT32 deviceIndex,
383383

384384
TRACE0("> openMidiDevice()\n");
385385

386-
(*handle) = (MidiDeviceHandle*) calloc(sizeof(MidiDeviceHandle), 1);
386+
(*handle) = (MidiDeviceHandle*) calloc(1, sizeof(MidiDeviceHandle));
387387
if (!(*handle)) {
388388
ERROR0("ERROR: openDevice: out of memory\n");
389389
return MIDI_OUT_OF_MEMORY;

src/java.desktop/share/native/libfontmanager/sunFont.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ int isNullScalerContext(void *context) {
6767
*/
6868
JNIEXPORT jlong JNICALL Java_sun_font_NullFontScaler_getGlyphImage
6969
(JNIEnv *env, jobject scaler, jlong pContext, jint glyphCode) {
70-
void *nullscaler = calloc(sizeof(GlyphInfo), 1);
70+
void *nullscaler = calloc(1, sizeof(GlyphInfo));
7171
return ptr_to_jlong(nullscaler);
7272
}
7373

0 commit comments

Comments
 (0)