changeset 15080:d24de6319f87

[gaim-migrate @ 17866] Get rid of a bunch of compile warnings committer: Tailor Script <tailor@pidgin.im>
author Mark Doliner <mark@kingant.net>
date Fri, 01 Dec 2006 08:07:17 +0000
parents 32814a36f363
children bc440018e208
files gtk/gtkaccount.c libgaim/account.h libgaim/dbus-server.c libgaim/plugins/log_reader.c libgaim/protocols/msn/userlist.c libgaim/protocols/oscar/oscar.c
diffstat 6 files changed, 19 insertions(+), 16 deletions(-) [+]
line wrap: on
line diff
--- a/gtk/gtkaccount.c	Fri Dec 01 05:01:51 2006 +0000
+++ b/gtk/gtkaccount.c	Fri Dec 01 08:07:17 2006 +0000
@@ -2381,8 +2381,8 @@
 }
 
 struct auth_and_add {
-	void(*auth_cb)(void*);
-        void(*deny_cb)(void*);
+	GaimAccountRequestAuthorizationCb auth_cb;
+	GaimAccountRequestAuthorizationCb deny_cb;
 	void *data;
 	char *username;
 	char *alias;
@@ -2440,8 +2440,8 @@
 
 	if (!gaim_find_buddy(account, remote_user)) {
 		struct auth_and_add *aa = g_new0(struct auth_and_add, 1);
-		aa->auth_cb = auth_cb;
-		aa->deny_cb = deny_cb;
+		aa->auth_cb = (GaimAccountRequestAuthorizationCb)auth_cb;
+		aa->deny_cb = (GaimAccountRequestAuthorizationCb)deny_cb;
 		aa->data = user_data;
 		aa->username = g_strdup(remote_user);
 		aa->alias = g_strdup(alias);
--- a/libgaim/account.h	Fri Dec 01 05:01:51 2006 +0000
+++ b/libgaim/account.h	Fri Dec 01 08:07:17 2006 +0000
@@ -34,6 +34,7 @@
 typedef struct _GaimAccount      GaimAccount;
 
 typedef gboolean (*GaimFilterAccountFunc)(GaimAccount *account);
+typedef void (*GaimAccountRequestAuthorizationCb)(void *);
 
 #include "connection.h"
 #include "log.h"
--- a/libgaim/dbus-server.c	Fri Dec 01 05:01:51 2006 +0000
+++ b/libgaim/dbus-server.c	Fri Dec 01 08:07:17 2006 +0000
@@ -668,7 +668,6 @@
 		guint xuint;
 		gboolean xboolean;
 		gpointer ptr = NULL;
-		gboolean allocated = FALSE;
 
 		if (gaim_value_is_outgoing(gaim_values[i]))
 		{
@@ -693,13 +692,14 @@
 		case GAIM_TYPE_STRING:
 			str = null_to_empty(my_arg(char*));
 			if (!g_utf8_validate(str, -1, NULL)) {
+				gchar *tmp;
 				gaim_debug_error("dbus", "Invalid UTF-8 string passed to signal, emitting salvaged string!\n");
-				str = gaim_utf8_salvage(str);
-				allocated = TRUE;
+				tmp = gaim_utf8_salvage(str);
+				dbus_message_iter_append_basic(iter, DBUS_TYPE_STRING, &tmp);
+				g_free(tmp);
+			} else {
+				dbus_message_iter_append_basic(iter, DBUS_TYPE_STRING, &str);
 			}
-			dbus_message_iter_append_basic(iter, DBUS_TYPE_STRING, &str);
-			if (allocated)
-				g_free(str);
 			break;
 		case GAIM_TYPE_SUBTYPE: /* registered pointers only! */
 		case GAIM_TYPE_POINTER:
--- a/libgaim/plugins/log_reader.c	Fri Dec 01 05:01:51 2006 +0000
+++ b/libgaim/plugins/log_reader.c	Fri Dec 01 08:07:17 2006 +0000
@@ -1640,7 +1640,7 @@
 					while (*line2 && *line2 != ':')
 						line2++;
 					if (*line2 == ':') {
-						char *acct_name;
+						const char *acct_name;
 						line2++;
 						line = line2;
 						acct_name = gaim_account_get_alias(log->account);
--- a/libgaim/protocols/msn/userlist.c	Fri Dec 01 05:01:51 2006 +0000
+++ b/libgaim/protocols/msn/userlist.c	Fri Dec 01 08:07:17 2006 +0000
@@ -74,7 +74,7 @@
 	pa->gc = gc;
 	
 	gaim_account_request_authorization(gaim_connection_get_account(gc), passport, NULL, friendly, NULL,
-					   msn_accept_add_cb, msn_cancel_add_cb, pa);
+					   G_CALLBACK(msn_accept_add_cb), G_CALLBACK(msn_cancel_add_cb), pa);
 }
 
 /**************************************************************************
--- a/libgaim/protocols/oscar/oscar.c	Fri Dec 01 05:01:51 2006 +0000
+++ b/libgaim/protocols/oscar/oscar.c	Fri Dec 01 08:07:17 2006 +0000
@@ -2330,8 +2330,9 @@
 				data->name = sn;
 				data->nick = NULL;
 
-				gaim_account_request_authorization(gaim_connection_get_account(gc), sn, NULL, NULL, reason,
-						G_CALLBACK(gaim_auth_grant), G_CALLBACK(gaim_auth_dontgrant_msgprompt), data);
+				gaim_account_request_authorization(account, sn,
+						NULL, NULL, reason,	G_CALLBACK(gaim_auth_grant),
+						G_CALLBACK(gaim_auth_dontgrant_msgprompt), data);
 				g_free(reason);
 			}
 		} break;
@@ -5041,8 +5042,9 @@
 	data->name = g_strdup(sn);
 	data->nick = NULL;
 
-	gaim_account_request_authorization(gaim_connection_get_account(gc), nombre, NULL, NULL, reason,
-			G_CALLBACK(gaim_auth_grant), G_CALLBACK(gaim_auth_dontgrant_msgprompt), data);
+	gaim_account_request_authorization(account, nombre,
+			NULL, NULL, reason, G_CALLBACK(gaim_auth_grant),
+			G_CALLBACK(gaim_auth_dontgrant_msgprompt), data);
 	g_free(nombre);
 	g_free(reason);