JDK-8171928 : Build fails on Oracle Linux 7 with unused parameter warning
  • Type: Bug
  • Component: javafx
  • Sub-Component: window-toolkit
  • Affected Version: 9
  • Priority: P1
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2016-12-22
  • Updated: 2016-12-22
  • Resolved: 2016-12-22
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 9
9Fixed
Related Reports
Relates :  
Description
Following the fox for JDK-8171330 we get the following compilation error on OL 7 which breaks the production builds:

rt/modules/javafx.graphics/src/main/native-glass/gtk/glass_general.cpp:826:42: error: unused parameter 'window' [-Werror=unused-parameter]
 glass_window_apply_shape_mask(GdkWindow *window,
                                          ^
rt/modules/javafx.graphics/src/main/native-glass/gtk/glass_general.cpp:827:11: error: unused parameter 'data' [-Werror=unused-parameter]
     void* data, uint width, uint height)
           ^
rt/modules/javafx.graphics/src/main/native-glass/gtk/glass_general.cpp:827:22: error: unused parameter 'width' [-Werror=unused-parameter]
     void* data, uint width, uint height)
                      ^
rt/modules/javafx.graphics/src/main/native-glass/gtk/glass_general.cpp:827:34: error: unused parameter 'height' [-Werror=unused-parameter]
     void* data, uint width, uint height)
                                  ^

Comments
Changeset: 06850b5a8bc1 Author: ddhill Date: 2016-12-22 11:33 -0800 URL: http://hg.openjdk.java.net/openjfx/9-dev/rt/rev/06850b5a8bc1 8171928: Build fails on Oracle Linux 7 with unused parameter warning Reviewed-by: kcr ! modules/javafx.graphics/src/main/native-glass/gtk/glass_general.cpp
22-12-2016

+1
22-12-2016

Yes, Dave came up with the same patch and is testing that now. Thanks.
22-12-2016

--- old/modules/javafx.graphics/src/main/native-glass/gtk/glass_general.cpp 2016-12-22 22:10:55.169701794 +0300 +++ new/modules/javafx.graphics/src/main/native-glass/gtk/glass_general.cpp 2016-12-22 22:10:55.077701797 +0300 @@ -826,6 +826,10 @@ glass_window_apply_shape_mask(GdkWindow *window, void* data, uint width, uint height) { + (void)window; + (void)data; + (void)width; + (void)height; #ifndef GLASS_GTK3 GdkPixbuf* pixbuf = gdk_pixbuf_new_from_data((guchar *) data, GDK_COLORSPACE_RGB, TRUE, 8, width, height, width * 4, NULL, NULL);
22-12-2016

It may be as simple as adding "(void) window;", etc to the function in question, although it is odd that this problem didn't show up on Ubuntu.
22-12-2016