Get rid of compile warnings on older glib.

Thu, 23 Aug 2007 18:34:31 +0000

author
Sadrul Habib Chowdhury <sadrul@pidgin.im>
date
Thu, 23 Aug 2007 18:34:31 +0000
changeset 19562
f7931803273a
parent 19561
249b4eca3431
child 19563
a94e00f90010
child 19565
b6baa14887a8

Get rid of compile warnings on older glib.

finch/libgnt/gntcolors.c file | annotate | diff | comparison | revisions
finch/libgnt/gntstyle.c file | annotate | diff | comparison | revisions
finch/libgnt/gntwm.c file | annotate | diff | comparison | revisions
--- a/finch/libgnt/gntcolors.c	Thu Aug 23 18:21:44 2007 +0000
+++ b/finch/libgnt/gntcolors.c	Thu Aug 23 18:34:31 2007 +0000
@@ -133,6 +133,7 @@
 		restore_colors();
 }
 
+#if GLIB_CHECK_VERSION(2,6,0)
 static int
 get_color(char *key)
 {
@@ -164,7 +165,6 @@
 	return color;
 }
 
-#if GLIB_CHECK_VERSION(2,6,0)
 void gnt_colors_parse(GKeyFile *kfile)
 {
 	GError *error = NULL;
--- a/finch/libgnt/gntstyle.c	Thu Aug 23 18:21:44 2007 +0000
+++ b/finch/libgnt/gntstyle.c	Thu Aug 23 18:34:31 2007 +0000
@@ -55,6 +55,8 @@
 	if (!group)
 		group = "general";
 	return g_key_file_get_value(gkfile, group, key, NULL);
+#else
+	return NULL;
 #endif
 }
 
@@ -93,6 +95,7 @@
 	return def;
 }
 
+#if GLIB_CHECK_VERSION(2,6,0)
 static void
 refine(char *text)
 {
@@ -133,6 +136,7 @@
 {
 	return (char *)gnt_key_translate(key);
 }
+#endif
 
 void gnt_style_read_workspaces(GntWM *wm)
 {
--- a/finch/libgnt/gntwm.c	Thu Aug 23 18:21:44 2007 +0000
+++ b/finch/libgnt/gntwm.c	Thu Aug 23 18:34:31 2007 +0000
@@ -738,7 +738,7 @@
 			print = ch;
 #ifndef NO_WIDECHAR
 			if (wch.chars[0] > 255) {
-				snprintf(unicode, sizeof(unicode), "&#x%x;", wch.chars[0]);
+				snprintf(unicode, sizeof(unicode), "&#x%x;", (unsigned int)wch.chars[0]);
 				print = unicode;
 			}
 #endif

mercurial