Hi Michael,

On Sat, 2006-06-17 at 18:07 +0200, Michael Koch wrote:
> As Mario has no CVS access yet I commited this for him.

If you commit something for someone else you MUST make sure that it
compiles cleanly, even with --enable-Werror and --enable-regen-headers
The following fixes the build:

2006-06-19  Mark Wielaard  <[EMAIL PROTECTED]>

    * include/Makefile.am: gnu_java_util_prefs_gconf_%.h should depend
    on gnu/java/util/prefs/gconf/%.class.
    * Java_gnu_java_util_prefs_gconf_GConfNativePeer_init_1class: Fix
    chache typo, should be cache.
    
(Java_gnu_java_util_prefs_gconf_GConfNativePeer_gconf_1client_1gconf_1client_1all_1keys):
    Declare tmp early.
   
(Java_gnu_java_util_prefs_gconf_GConfNativePeer_gconf_1client_1gconf_1client_1all_1nodes):
    Likewise.
    (Java_gnu_java_util_prefs_gconf_GConfNativePeer_gconf_1client_1remove_1dir):
    Don't return a value for void function.
    (Java_gnu_java_util_prefs_gconf_GConfNativePeer_gconf_1client_1add_1dir):
    Likewise.
    (Java_gnu_java_util_prefs_gconf_GConfNativePeer_gconf_1client_1dir_1exists):
    Mark clazz as unused.  Return JNI_FALSE, not NULL for jboolean
    function.
    (Java_gnu_java_util_prefs_gconf_GConfNativePeer_finalize_1class):
    Mark clazz ad unused.

BTW. Some of the code doesn't follow out coding style guide and
indenting is not always consistent.

Committed,

Mark
Index: include/Makefile.am
===================================================================
RCS file: /cvsroot/classpath/classpath/include/Makefile.am,v
retrieving revision 1.65
diff -u -r1.65 Makefile.am
--- include/Makefile.am	17 Jun 2006 15:53:36 -0000	1.65
+++ include/Makefile.am	18 Jun 2006 09:14:56 -0000
@@ -176,7 +176,7 @@
 $(top_srcdir)/include/gnu_javax_sound_midi_dssi_%.h: $(top_builddir)/$(CLASSDIR)/gnu/javax/sound/midi/dssi/%.class
 	$(JAVAH) -o $@ gnu.javax.sound.midi.dssi.$*
 
-$(top_srcdir)/include/gnu_java_util_prefs_gconf_%.h: $(top_builddir)/$(CLASSDIR)/java/util/prefs/gconf/%.class
+$(top_srcdir)/include/gnu_java_util_prefs_gconf_%.h: $(top_builddir)/$(CLASSDIR)/gnu/java/util/prefs/gconf/%.class
 	$(JAVAH) -o $@ gnu.java.util.prefs.gconf.$*
 
 $(top_srcdir)/include/gnu_java_net_VMPlainDatagramSocketImpl.h: $(top_srcdir)/vm/reference/gnu/java/net/VMPlainDatagramSocketImpl.java
Index: native/jni/gconf-peer/GConfNativePeer.c
===================================================================
RCS file: /cvsroot/classpath/classpath/native/jni/gconf-peer/GConfNativePeer.c,v
retrieving revision 1.1
diff -u -r1.1 GConfNativePeer.c
--- native/jni/gconf-peer/GConfNativePeer.c	17 Jun 2006 15:53:37 -0000	1.1
+++ native/jni/gconf-peer/GConfNativePeer.c	18 Jun 2006 09:14:56 -0000
@@ -111,7 +111,7 @@
 	(JNIEnv *env, jclass clazz)
 {
 	if (reference_count == 0) {
-		Java_gnu_java_util_prefs_gconf_GConfNativePeer_init_1id_1chache
+		Java_gnu_java_util_prefs_gconf_GConfNativePeer_init_1id_1cache
 				(env, clazz);
 		return;
 	}
@@ -160,6 +160,7 @@
 	const char 	*dir	 = NULL;
 	GError 		*err 	 = NULL;
 	GSList 		*entries = NULL;
+	GSList          *tmp;
 	
 	/* java.util.ArrayList */
 	jobject jlist = NULL;
@@ -190,7 +191,7 @@
 		return NULL;
 	}
 
-	GSList* tmp = entries;
+	tmp = entries;
 	while (tmp != NULL) {
 		const char *_val = gconf_entry_get_key(tmp->data);		
 		_val = strrchr (_val, '/');	++_val;
@@ -219,6 +220,7 @@
 	const char 	*dir	 = NULL;
 	GError 		*err 	 = NULL;
 	GSList 		*entries = NULL;
+	GSList		*tmp;
 	
 	/* java.util.ArrayList */
 	jobject jlist = NULL;
@@ -248,7 +250,7 @@
 		return NULL;
 	}
 
-	GSList* tmp = entries;
+	tmp = entries;
 	while (tmp != NULL) {
 		const char *_val = tmp->data;
 		_val = strrchr (_val, '/');	++_val;
@@ -378,11 +380,10 @@
     const char *dir = NULL;
     
     dir = JCL_jstring_to_cstring (env, node);
-	if (dir == NULL) {
-		return NULL;
-	}
+    if (dir == NULL)
+      return;
 	
-	gconf_client_remove_dir (client, dir, NULL);
+    gconf_client_remove_dir (client, dir, NULL);
 	
     JCL_free_cstring (env, node, dir);
 }			/* Java_gnu_java_util_prefs_gconf_GConfNativePeer_gconf_1client_1remove_1dir */
@@ -399,12 +400,11 @@
     const char *dir	= NULL;
 
     dir = JCL_jstring_to_cstring (env, node);
-	if (dir == NULL) {
-		return NULL;
-	}
+    if (dir == NULL)
+      return;
 	
-	/* ignore errors */
-	gconf_client_add_dir (client, dir, GCONF_CLIENT_PRELOAD_ONELEVEL, NULL);
+    /* ignore errors */
+    gconf_client_add_dir (client, dir, GCONF_CLIENT_PRELOAD_ONELEVEL, NULL);
 
     JCL_free_cstring (env, node, dir);
 }			/* Java_gnu_java_util_prefs_gconf_GConfNativePeer_gconf_1client_1add_1dir */
@@ -416,20 +416,19 @@
  */
 JNIEXPORT jboolean JNICALL
 Java_gnu_java_util_prefs_gconf_GConfNativePeer_gconf_1client_1dir_1exists
-    (JNIEnv *env, jclass clazz, jstring node)
+    (JNIEnv *env, jclass clazz __attribute__ ((unused)), jstring node)
 { 
     const char *dir	  = NULL;
-	jboolean    value = JNI_FALSE;
+    jboolean value = JNI_FALSE;
 	
     dir = JCL_jstring_to_cstring (env, node);
-	if (dir == NULL) {
-		return NULL;
-	}
+    if (dir == NULL)
+      return value;
 	
     /* we ignore errors here */
     value = gconf_client_dir_exists (client, dir, NULL);
 	
-	JCL_free_cstring (env, node, dir);
+    JCL_free_cstring (env, node, dir);
 
     return value;
 }           /* Java_gnu_java_util_prefs_gconf_GConfNativePeer_gconf_1client_1dir_1exists */
@@ -441,7 +440,7 @@
  */
 JNIEXPORT void
 JNICALL Java_gnu_java_util_prefs_gconf_GConfNativePeer_finalize_1class
-	(JNIEnv *env, jclass clazz)
+	(JNIEnv *env, jclass clazz __attribute__ ((unused)))
 {
 	if (reference_count == 0) {
 		/* last reference, free all resources and return */

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

Reply via email to