classpath-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[cp-patches] Some more gtk-peer compiler warning fixes


From: Mark Wielaard
Subject: [cp-patches] Some more gtk-peer compiler warning fixes
Date: Wed, 27 Oct 2004 01:59:34 +0200

Hi,

Here are a few more gtk-peer compiler warning fixes. The default
gtk-peer build is now warning free so I added the ERROR_CFLAGS to the
Makefile.

2004-10-26  Mark Wielaard  <address@hidden>

        * native/jni/gtk-peer/Makefile.am (AM_CFLAGS): Add ERROR_CFLAGS.
        * native/jni/gtk-peer/gnu_java_awt_peer_gtk_GdkTextLayout.c
        (Java_gnu_java_awt_peer_gtk_GdkGlyphVector_setText): Removed.
        * native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkMainThread.c
        (init_dpi_conversion_factor): Correct prototype.

Note that if you --enable-gtk-cairo it is not completely warning free
yet. This probably depends on the cairo header files you have installed.
So you will want to also --disable-Werror in that case.
Fixes to also erase these last warnings are welcome of course!

Committed,

Mark
? native/jni/gtk-peer/semantic.cache
Index: native/jni/gtk-peer/Makefile.am
===================================================================
RCS file: /cvsroot/classpath/classpath/native/jni/gtk-peer/Makefile.am,v
retrieving revision 1.18
diff -u -r1.18 Makefile.am
--- native/jni/gtk-peer/Makefile.am     26 Oct 2004 20:26:03 -0000      1.18
+++ native/jni/gtk-peer/Makefile.am     26 Oct 2004 23:59:01 -0000
@@ -60,6 +60,5 @@
 
 # Just the WARNING_CFLAGS. We cannot use the strict flags since the gtk
 # headers contain broken prototypes (by design, see gtkitemfactory.h).
-# Also no -Werror for now since not all warnings have been solved yet. FIXME.
-AM_CFLAGS = @WARNING_CFLAGS@ \
+AM_CFLAGS = @WARNING_CFLAGS@ @ERROR_CFLAGS@ \
             @GTK_CFLAGS@ @CAIRO_CFLAGS@ @PANGOFT2_CFLAGS@
Index: native/jni/gtk-peer/gnu_java_awt_peer_gtk_GdkTextLayout.c
===================================================================
RCS file: 
/cvsroot/classpath/classpath/native/jni/gtk-peer/gnu_java_awt_peer_gtk_GdkTextLayout.c,v
retrieving revision 1.2
diff -u -r1.2 gnu_java_awt_peer_gtk_GdkTextLayout.c
--- native/jni/gtk-peer/gnu_java_awt_peer_gtk_GdkTextLayout.c   10 Oct 2004 
14:20:49 -0000      1.2
+++ native/jni/gtk-peer/gnu_java_awt_peer_gtk_GdkTextLayout.c   26 Oct 2004 
23:59:01 -0000
@@ -65,31 +65,6 @@
   gdk_threads_leave ();
 }
 
-JNIEXPORT void JNICALL Java_gnu_java_awt_peer_gtk_GdkGlyphVector_setText
-  (JNIEnv *env, jobject self, jstring text)
-{
-  struct textlayout *tl;
-  gchar *str = NULL;
-  gint len = 0;
-
-  gdk_threads_enter ();
-  g_assert(self != NULL);
-  g_assert(text != NULL);
-
-  tl = (struct textlayout *)NSA_GET_TEXT_LAYOUT_PTR (env, self);
-  g_assert(tl != NULL);
-  g_assert(tl->pango_layout != NULL);
-  
-  len = (*env)->GetStringUTFLength (env, text);
-  str = (gchar *)(*env)->GetStringUTFChars (env, text, NULL);
-  g_assert (str != NULL);
-
-  pango_layout_set_text (tl->pango_layout, text, len);
-
-  (*env)->ReleaseStringUTFChars (env, text, str);
-  gdk_threads_leave ();  
-}
-
 JNIEXPORT void JNICALL Java_gnu_java_awt_peer_gtk_GdkTextLayout_indexToPos
   (JNIEnv *env, jobject self, jint idx, jdoubleArray javaPos)
 {
Index: native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkMainThread.c
===================================================================
RCS file: 
/cvsroot/classpath/classpath/native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkMainThread.c,v
retrieving revision 1.25
diff -u -r1.25 gnu_java_awt_peer_gtk_GtkMainThread.c
--- native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkMainThread.c   8 Oct 2004 
22:27:35 -0000       1.25
+++ native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkMainThread.c   26 Oct 2004 
23:59:01 -0000
@@ -76,7 +76,7 @@
 
 double dpi_conversion_factor;
 
-static void init_dpi_conversion_factor ();
+static void init_dpi_conversion_factor (void);
 static void dpi_changed_cb (GtkSettings  *settings,
                             GParamSpec   *pspec);
 

Attachment: signature.asc
Description: This is a digitally signed message part


reply via email to

[Prev in Thread] Current Thread [Next in Thread]