8354316: clang/linux build fails with -Wunused-result warning at XToolkit.c:695:9

Reviewed-by: aivanov, ihse, serb, kizune, syan, erikj
This commit is contained in:
Harshitha Onkar 2025-05-23 17:59:47 +00:00
parent 2f530f89e0
commit 85ca0813f1
2 changed files with 4 additions and 3 deletions

View File

@ -278,7 +278,6 @@ ifeq ($(call isTargetOs, windows macosx)+$(ENABLE_HEADLESS_ONLY), false+false)
DISABLED_WARNINGS_gcc_X11TextRenderer_md.c := unused-but-set-variable, \ DISABLED_WARNINGS_gcc_X11TextRenderer_md.c := unused-but-set-variable, \
DISABLED_WARNINGS_gcc_XlibWrapper.c := type-limits pointer-to-int-cast, \ DISABLED_WARNINGS_gcc_XlibWrapper.c := type-limits pointer-to-int-cast, \
DISABLED_WARNINGS_gcc_XRBackendNative.c := maybe-uninitialized, \ DISABLED_WARNINGS_gcc_XRBackendNative.c := maybe-uninitialized, \
DISABLED_WARNINGS_gcc_XToolkit.c := unused-result, \
DISABLED_WARNINGS_gcc_XWindow.c := unused-function, \ DISABLED_WARNINGS_gcc_XWindow.c := unused-function, \
DISABLED_WARNINGS_clang_awt_Taskbar.c := parentheses, \ DISABLED_WARNINGS_clang_awt_Taskbar.c := parentheses, \
DISABLED_WARNINGS_clang_gtk3_interface.c := unused-function parentheses, \ DISABLED_WARNINGS_clang_gtk3_interface.c := unused-function parentheses, \

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2002, 2023, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2002, 2025, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -692,7 +692,9 @@ void awt_output_flush() {
static void wakeUp() { static void wakeUp() {
static char wakeUp_char = 'p'; static char wakeUp_char = 'p';
if (!isMainThread() && awt_pipe_inited) { if (!isMainThread() && awt_pipe_inited) {
write ( AWT_WRITEPIPE, &wakeUp_char, 1 ); if (write(AWT_WRITEPIPE, &wakeUp_char, 1) < 0) {
DTRACE_PRINTLN("wakeUp(): write to AWT pipe failed");
}
} }
} }