+1

On 30.04.16 0:27, Kevin Rushforth wrote:
I am not a "R" reviewer for AWT, but using NULL as if it were an int is
incorrect, so this fix looks good to me.

-- Kevin


Phil Race wrote:
Bug : https://bugs.openjdk.java.net/browse/JDK-8155772

On my system in this file it appears NULL is "#define (void*)0 which
causes the error

"error: initialization makes integer from pointer without a cast
[-Werror]"

Webrev to fix in-line below.

-phil.

diff --git
a/src/java.desktop/unix/native/libawt_xawt/awt/gtk3_interface.c
b/src/java.desktop/unix/native/libawt_xawt/awt/gtk3_interface.c
--- a/src/java.desktop/unix/native/libawt_xawt/awt/gtk3_interface.c
+++ b/src/java.desktop/unix/native/libawt_xawt/awt/gtk3_interface.c
@@ -2547,14 +2547,14 @@

 static jobject get_integer_property(JNIEnv *env, GtkSettings* settings,
                                                              const
gchar* key) {
-    gint intval = NULL;
+    gint intval = 0;
     (*fp_g_object_get)(settings, key, &intval, NULL);
     return create_Integer(env, intval);
 }

 static jobject get_boolean_property(JNIEnv *env, GtkSettings* settings,
                                                              const
gchar* key) {
-    gint intval = NULL;
+    gint intval = 0;
     (*fp_g_object_get)(settings, key, &intval, NULL);
     return create_Boolean(env, intval);
 }



--
Best regards, Sergey.

Reply via email to