GMarkup: uninitialized var



my compiler gives me an "used without being initialized" warning. Could
someone please check if my suggested sollution is the right one?

Thanks,
	Hans

diff -u -r from-cvs/glib/gmarkup.c my-gtk/glib/gmarkup.c
--- from-cvs/glib/gmarkup.c	Fri Oct 27 04:46:04 2000
+++ my-gtk/glib/gmarkup.c	Sat Oct 28 14:43:34 2000
@@ -754,7 +754,11 @@
   const gchar *p;
   const gchar *next;
 
+#if 0 /* used without being initialized */
   g_assert (p != end);
+#else /* was this meant ? */
+  g_assert (context->current_text_len > 0);
+#endif
 
   p = context->current_text;
   next = g_utf8_find_next_char (p, end);

-------- Hans "at" Breuer "dot" Org -----------
Tell me what you need, and I'll tell you how to 
get along without it.                -- Dilbert




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