This is the mail archive of the java-patches@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[patch] replace snprintf with g_snprintf


Hi,

This patch eliminates a gthread-jni.c compiler warning.  OK for
mainline?

Tom

2005-02-19  Thomas Fitzsimmons  <fitzsim@redhat.com>

	* jni/gtk-peer/gthread-jni.c (throw): Call g_snprintf instead of
	snprintf.

Index: jni/gtk-peer/gthread-jni.c
===================================================================
RCS file: /cvs/gcc/gcc/libjava/jni/gtk-peer/gthread-jni.c,v
retrieving revision 1.7
diff -u -r1.7 gthread-jni.c
--- jni/gtk-peer/gthread-jni.c	2 Sep 2004 05:10:33 -0000	1.7
+++ jni/gtk-peer/gthread-jni.c	19 Feb 2005 17:15:01 -0000
@@ -223,8 +223,8 @@
 #elif defined HAVE_INTTYPES_H
 #include <inttypes.h>
 #endif
-#include <stdio.h>		/* snprintf */
 #include <stdarg.h>		/* va_list */
+#include <glib.h>
 #include "gthread-jni.h"
 #include <assert.h>		/* assert() */
 
@@ -464,7 +464,7 @@
   if ((buf = malloc (len)))
     {
       memset (buf, 0, len);
-      snprintf (buf, len, fmt, message, file, line);
+      g_snprintf (buf, len, fmt, message, file, line);
       jmessage = (*env)->NewStringUTF (env, buf);
       free (buf);
     }



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]