changeset 15498:0d4890637238

clean up some compile warnings
author Nathan Walp <nwalp@pidgin.im>
date Fri, 02 Feb 2007 23:14:20 +0000
parents e35bf6411675
children 4ead39213173
files libpurple/protocols/jabber/jabber.c libpurple/protocols/jabber/parser.c libpurple/protocols/yahoo/yahoo.c libpurple/proxy.c pidgin/gtkconv.c
diffstat 5 files changed, 18 insertions(+), 18 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/protocols/jabber/jabber.c	Fri Feb 02 23:07:47 2007 +0000
+++ b/libpurple/protocols/jabber/jabber.c	Fri Feb 02 23:14:20 2007 +0000
@@ -1074,7 +1074,8 @@
 	JabberBuddy *jb = NULL;
 
 	if(!b->account->gc)
-		return;
+		return NULL;
+
 	js = b->account->gc->proto_data;
 	if(js)
 		jb = jabber_buddy_find(js, b->name, FALSE);
--- a/libpurple/protocols/jabber/parser.c	Fri Feb 02 23:07:47 2007 +0000
+++ b/libpurple/protocols/jabber/parser.c	Fri Feb 02 23:14:20 2007 +0000
@@ -79,7 +79,7 @@
 			char *attrib_ns = NULL;
 
 			if (attributes[i+2]) {
-				attrib_ns = g_strdup(attributes[i+2]);;
+				attrib_ns = g_strdup((char*)attributes[i+2]);;
 			}
 
 			memcpy(attrib, attributes[i+3], attrib_len);
--- a/libpurple/protocols/yahoo/yahoo.c	Fri Feb 02 23:07:47 2007 +0000
+++ b/libpurple/protocols/yahoo/yahoo.c	Fri Feb 02 23:14:20 2007 +0000
@@ -2811,7 +2811,7 @@
 
 	if (!b || !(account = b->account) || !(gc = gaim_account_get_connection(account)) ||
 					     !(yd = gc->proto_data))
-		return;
+		return NULL;
 
 	f = yahoo_friend_find(gc, b->name);
 	if (!f) {
--- a/libpurple/proxy.c	Fri Feb 02 23:07:47 2007 +0000
+++ b/libpurple/proxy.c	Fri Feb 02 23:14:20 2007 +0000
@@ -597,7 +597,7 @@
 	{
 		int major;
 		p = connect_data->read_buffer + 5;
-		major = strtol((const char *)p, (char **)&p, 10);
+		major = strtol((const char *)p, (char**)&p, 10);
 		error = (major == 0) || (*p != '.');
 		if(!error) {
 			int minor;
--- a/pidgin/gtkconv.c	Fri Feb 02 23:07:47 2007 +0000
+++ b/pidgin/gtkconv.c	Fri Feb 02 23:14:20 2007 +0000
@@ -4876,22 +4876,21 @@
 		g_free(displaying);
 		return;
 	}
-	message = displaying;
-	length = strlen(message) + 1;
+	length = strlen(displaying) + 1;
 
 	/* Awful hack to work around GtkIMHtml's inefficient rendering of messages with lots of formatting changes.
 	 * If a message has over 100 '<' characters, strip formatting before appending it. Hopefully nobody actually
 	 * needs that much formatting, anyway.
 	 */
-	for (bracket = strchr(message, '<'); bracket && *(bracket + 1); bracket = strchr(bracket + 1, '<'))
+	for (bracket = strchr(displaying, '<'); bracket && *(bracket + 1); bracket = strchr(bracket + 1, '<'))
 		tag_count++;
-	
+
 	if (tag_count > 100) {
-		char *tmp = message;
-		message = displaying = gaim_markup_strip_html(message);
+		char *tmp = displaying;
+		displaying = gaim_markup_strip_html(tmp);
 		g_free(tmp);
-	}	
-	
+	}
+
 	win = gtkconv->win;
 	prpl_info = GAIM_PLUGIN_PROTOCOL_INFO(gc->prpl);
 
@@ -4964,27 +4963,27 @@
 	if (flags & GAIM_MESSAGE_SYSTEM) {
 		g_snprintf(buf2, sizeof(buf2),
 			   "<FONT %s><FONT SIZE=\"2\"><!--(%s) --></FONT><B>%s</B></FONT>",
-			   sml_attrib ? sml_attrib : "", mdate, message);
+			   sml_attrib ? sml_attrib : "", mdate, displaying);
 
 		gtk_imhtml_append_text(GTK_IMHTML(gtkconv->imhtml), buf2, gtk_font_options_all);
 
 	} else if (flags & GAIM_MESSAGE_ERROR) {
 		g_snprintf(buf2, sizeof(buf2),
 			   "<FONT COLOR=\"#ff0000\"><FONT %s><FONT SIZE=\"2\"><!--(%s) --></FONT><B>%s</B></FONT></FONT>",
-			   sml_attrib ? sml_attrib : "", mdate, message);
+			   sml_attrib ? sml_attrib : "", mdate, displaying);
 
 		gtk_imhtml_append_text(GTK_IMHTML(gtkconv->imhtml), buf2, gtk_font_options_all);
 
 	} else if (flags & GAIM_MESSAGE_NO_LOG) {
 		g_snprintf(buf2, BUF_LONG,
 			   "<B><FONT %s COLOR=\"#777777\">%s</FONT></B>",
-			   sml_attrib ? sml_attrib : "", message);
+			   sml_attrib ? sml_attrib : "", displaying);
 
 		gtk_imhtml_append_text(GTK_IMHTML(gtkconv->imhtml), buf2, gtk_font_options_all);
 	} else if (flags & GAIM_MESSAGE_RAW) {
-		gtk_imhtml_append_text(GTK_IMHTML(gtkconv->imhtml), message, gtk_font_options_all);
+		gtk_imhtml_append_text(GTK_IMHTML(gtkconv->imhtml), displaying, gtk_font_options_all);
 	} else {
-		char *new_message = g_memdup(message, length);
+		char *new_message = g_memdup(displaying, length);
 		char *alias_escaped = (alias ? g_markup_escape_text(alias, strlen(alias)) : g_strdup(""));
 		/* The initial offset is to deal with
 		 * escaped entities making the string longer */
@@ -5180,7 +5179,7 @@
 
 	gaim_signal_emit(gaim_gtk_conversations_get_handle(),
 		(type == GAIM_CONV_TYPE_IM ? "displayed-im-msg" : "displayed-chat-msg"),
-		account, name, message, conv, flags);
+		account, name, displaying, conv, flags);
 	g_free(displaying);
 }
 static void