> This pr is a split off from JDK-8308288: Fix xlc17 clang warnings in shared 
> code https://github.com/openjdk/jdk/pull/14146
> It handles the part in java.desktop.
> prrace had already reviewed this part in the original pr.
> 
> Here are the handled errors for which we use the same warning disabling as 
> gcc.
> 
> src/java.desktop/unix/native/common/awt/awt_GraphicsEnv.h:53:12: error: a 
> function declaration without a prototype is deprecated in all versions of C 
> and is treated as a zero-parameter prototype in C2x, conflicting with a 
> previous declaration [-Werror,-Wdeprecated-non-prototype]
> extern int XShmQueryExtension();
> ^
> /usr/include/X11/extensions/XShm.h:91:6: note: conflicting prototype is here
> Bool XShmQueryExtension(
> ^
> solved by adding line (generic, because several source files are involved)
> DISABLED_WARNINGS_clang_aix := deprecated-non-prototype, \
> 
> src/java.desktop/unix/native/libawt_xawt/xawt/awt_Taskbar.c:158:11: error: 
> using the result of an assignment as a condition without parentheses 
> [-Werror,-Wparentheses]
> if (m = fp_unity_launcher_entry_get_quicklist(entry)) {
> ~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> solved by adding line
> DISABLED_WARNINGS_clang_aix_awt_Taskbar.c := parentheses, \
> 
> src/java.desktop/share/native/common/java2d/opengl/OGLPaints.c:581:48: error: 
> format string is not a string literal [-Werror,-Wformat-nonliteral]
> snprintf(cycleCode, sizeof(cycleCode), noCycleCode, texCoordCalcCode);
> ^~~~~~~~~~~
> solved by adding line
> DISABLED_WARNINGS_clang_aix_OGLPaints.c := format-nonliteral, \
> 
> src/java.desktop/share/native/common/java2d/opengl/OGLBufImgOps.c:153:48: 
> error: format string is not a string literal [-Werror,-Wformat-nonliteral]
> snprintf(finalSource, sizeof(finalSource), convolveShaderSource,
> ^~~~~~~~~~~~~~~~~~~~
> solved by adding line
> DISABLED_WARNINGS_clang_aix_OGLBufImgOps.c := format-nonliteral, \
> 
> src/java.desktop/unix/native/libawt_xawt/awt/gtk2_interface.c:1095:41: error: 
> '&&' within '||' [-Werror,-Wlogical-op-parentheses]
> if ((synth_state & MOUSE_OVER) != 0 && (synth_state & PRESSED) == 0 ||
> 
> src/java.desktop/unix/native/libawt_xawt/awt/gtk2_interface.c:1180:29: error: 
> using the result of an assignment as a condition without parentheses 
> [-Werror,-Wparentheses]
> if (init_result = (NULL == gtk2_widgets[_GTK_CHECK_MENU_ITEM_TYPE]))
> ~~~~~~~~~~~~^
> solved by adding line
> DISABLED_WARNINGS_clang_aix_gtk2_interface.c := parentheses 
> logical-op-parentheses, \
> 
> src/java.desktop/unix/native/libawt_xawt/a...

JoKern65 has updated the pull request incrementally with one additional commit 
since the last revision:

  Update Awt2dLibraries.gmk
  
  followed prrace annotation

-------------

Changes:
  - all: https://git.openjdk.org/jdk/pull/14263/files
  - new: https://git.openjdk.org/jdk/pull/14263/files/1403e242..f9d99dc7

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jdk&pr=14263&range=01
 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=14263&range=00-01

  Stats: 2 lines in 1 file changed: 0 ins; 0 del; 2 mod
  Patch: https://git.openjdk.org/jdk/pull/14263.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/14263/head:pull/14263

PR: https://git.openjdk.org/jdk/pull/14263

Reply via email to