diff src/conversation.c @ 13106:a0a4b44239e8

[gaim-migrate @ 15468] I was reading the gettext man page and it pointed out that it should be typed as const char *, but it's char * to avoid warnings in code predating ANSI C. So, for the heck of it, I changed added a cast in internal.h. As it turns out, there was a lot of code that relied on this. In the interest of type safety, I've fixed all the warnings. I feel this improved a number of function signatures (in terms of typing clarity). Flame me if you object. committer: Tailor Script <tailor@pidgin.im>
author Richard Laager <rlaager@wiktel.com>
date Thu, 02 Feb 2006 21:34:43 +0000
parents 3bf3f489b64b
children fcde3faa1f57
line wrap: on
line diff
--- a/src/conversation.c	Thu Feb 02 20:03:17 2006 +0000
+++ b/src/conversation.c	Thu Feb 02 21:34:43 2006 +0000
@@ -174,7 +174,7 @@
 
 	if (err < 0) {
 		const char *who;
-		char *msg;
+		const char *msg;
 
 		who = gaim_conversation_get_name(conv);
 
@@ -182,9 +182,9 @@
 			msg = _("Unable to send message: The message is too large.");
 
 			if (!gaim_conv_present_error(who, account, msg)) {
-				msg = g_strdup_printf(_("Unable to send message to %s."), who);
-				gaim_notify_error(gc, NULL, msg, _("The message is too large."));
-				g_free(msg);
+				char *msg2 = g_strdup_printf(_("Unable to send message to %s."), who);
+				gaim_notify_error(gc, NULL, msg2, _("The message is too large."));
+				g_free(msg2);
 			}
 		}
 		else if (err == -ENOTCONN) {
@@ -195,9 +195,9 @@
 			msg = _("Unable to send message.");
 
 			if (!gaim_conv_present_error(who, account, msg)) {
-				msg = g_strdup_printf(_("Unable to send message to %s."), who);
-				gaim_notify_error(gc, NULL, msg, NULL);
-				g_free(msg);
+				char *msg2 = g_strdup_printf(_("Unable to send message to %s."), who);
+				gaim_notify_error(gc, NULL, msg2, NULL);
+				g_free(msg2);
 			}
 		}
 	}