/pidgin/main: fb896f14715b: win32: fix most of easy warnings

Tomasz Wasilczyk tomkiewicz at cpw.pidgin.im
Wed Apr 17 16:16:18 EDT 2013


Changeset: fb896f14715b55751a84356077e0cb7e6969b174
Author:	 Tomasz Wasilczyk <tomkiewicz at cpw.pidgin.im>
Date:	 2013-04-17 22:16 +0200
Branch:	 default
URL: https://hg.pidgin.im/pidgin/main/rev/fb896f14715b

Description:

win32: fix most of easy warnings

diffstat:

 libpurple/plugins/tcl/tcl_cmds.c      |  3 ++-
 libpurple/protocols/myspace/myspace.c |  4 ++--
 libpurple/protocols/silc/ops.c        |  4 ++--
 libpurple/protocols/silc/silc.c       |  4 ++++
 pidgin/gtkprefs.c                     |  5 ++++-
 pidgin/gtkstatusbox.c                 |  8 ++++----
 6 files changed, 18 insertions(+), 10 deletions(-)

diffs (115 lines):

diff --git a/libpurple/plugins/tcl/tcl_cmds.c b/libpurple/plugins/tcl/tcl_cmds.c
--- a/libpurple/plugins/tcl/tcl_cmds.c
+++ b/libpurple/plugins/tcl/tcl_cmds.c
@@ -1516,7 +1516,8 @@ int tcl_cmd_status(ClientData unused, Tc
 	PurpleStatus *status;
 	PurpleStatusType *status_type;
 	int error;
-#if !(defined PURPLE_DISABLE_DEPRECATED)
+# if (0)
+/* #if !(defined PURPLE_DISABLE_DEPRECATED) */
 	PurpleValue *value;
 	const char *attr;
 	int v;
diff --git a/libpurple/protocols/myspace/myspace.c b/libpurple/protocols/myspace/myspace.c
--- a/libpurple/protocols/myspace/myspace.c
+++ b/libpurple/protocols/myspace/myspace.c
@@ -1842,11 +1842,11 @@ msim_error(MsimSession *session, MsimMes
 					gchar *suggestion;
 
 					suggestion = g_strdup_printf(_("%s Your password is "
-							"%zu characters, which is longer than the "
+							"%" G_GSIZE_FORMAT " characters, which is longer than the "
 							"maximum length of %d.  Please shorten your "
 							"password at http://profileedit.myspace.com/index.cfm?fuseaction=accountSettings.changePassword and try again."),
 							full_errmsg,
-							strlen(purple_account_get_password(session->account)),
+							(gsize)strlen(purple_account_get_password(session->account)),
 							MSIM_MAX_PASSWORD_LENGTH);
 
 					/* Replace full_errmsg. */
diff --git a/libpurple/protocols/silc/ops.c b/libpurple/protocols/silc/ops.c
--- a/libpurple/protocols/silc/ops.c
+++ b/libpurple/protocols/silc/ops.c
@@ -1170,7 +1170,7 @@ silc_command_reply(SilcClient client, Si
 
 	case SILC_COMMAND_WHOIS:
 		{
-			SilcUInt32 idle, *user_modes;
+			SilcUInt32 *user_modes;
 			SilcDList channels;
 			SilcClientEntry client_entry;
 			char tmp[1024];
@@ -1190,7 +1190,7 @@ silc_command_reply(SilcClient client, Si
 			(void)va_arg(ap, char *);
 			channels = va_arg(ap, SilcDList);
 			(void)va_arg(ap, SilcUInt32);
-			idle = va_arg(ap, SilcUInt32);
+			(void)va_arg(ap, SilcUInt32); /* idle */
 			(void)va_arg(ap, unsigned char *);
 			user_modes = va_arg(ap, SilcUInt32 *);
 
diff --git a/libpurple/protocols/silc/silc.c b/libpurple/protocols/silc/silc.c
--- a/libpurple/protocols/silc/silc.c
+++ b/libpurple/protocols/silc/silc.c
@@ -919,7 +919,9 @@ silcpurple_attrs(PurplePluginAction *act
 		mbored = FALSE, mexcited = FALSE, manxious = FALSE;
 	gboolean cemail = FALSE, ccall = FALSE, csms = FALSE,
 		cmms = FALSE, cchat = TRUE, cvideo = FALSE;
+#ifdef HAVE_SYS_UTSNAME_H
 	gboolean device = TRUE;
+#endif
 	char status[1024], tz[16];
 
 	sg = purple_connection_get_protocol_data(gc);
@@ -967,10 +969,12 @@ silcpurple_attrs(PurplePluginAction *act
 					 NULL, (void *)&attr))
 			silc_attribute_get_object(attr, &status, sizeof(status));
 
+#ifdef HAVE_SYS_UTSNAME_H
 		if (!silc_hash_table_find(attrs,
 					  SILC_32_TO_PTR(SILC_ATTRIBUTE_DEVICE_INFO),
 					  NULL, (void *)&attr))
 			device = FALSE;
+#endif
 	}
 
 	fields = purple_request_fields_new();
diff --git a/pidgin/gtkprefs.c b/pidgin/gtkprefs.c
--- a/pidgin/gtkprefs.c
+++ b/pidgin/gtkprefs.c
@@ -2740,7 +2740,10 @@ static GtkWidget *
 sound_page(void)
 {
 	GtkWidget *ret;
-	GtkWidget *vbox, *vbox2, *sw, *button, *parent, *parent_parent, *parent_parent_parent;
+	GtkWidget *vbox, *vbox2, *button, *parent, *parent_parent, *parent_parent_parent;
+#ifdef USE_GSTREAMER
+	GtkWidget *sw;
+#endif
 	GtkSizeGroup *sg;
 	GtkTreeIter iter;
 	GtkWidget *event_view;
diff --git a/pidgin/gtkstatusbox.c b/pidgin/gtkstatusbox.c
--- a/pidgin/gtkstatusbox.c
+++ b/pidgin/gtkstatusbox.c
@@ -2326,15 +2326,15 @@ pidgin_status_box_redisplay_buddy_icon(P
 				&error) || error)
 		{
 			purple_debug_warning("gtkstatusbox", "gdk_pixbuf_loader_write() "
-					"failed with size=%zu: %s\n",
-					purple_imgstore_get_size(status_box->buddy_icon_img),
+					"failed with size=%" G_GSIZE_FORMAT ": %s\n",
+					(gsize)purple_imgstore_get_size(status_box->buddy_icon_img),
 					error ? error->message : "(no error message)");
 			if (error)
 				g_error_free(error);
 		} else if (!gdk_pixbuf_loader_close(loader, &error) || error) {
 			purple_debug_warning("gtkstatusbox", "gdk_pixbuf_loader_close() "
-					"failed for image of size %zu: %s\n",
-					purple_imgstore_get_size(status_box->buddy_icon_img),
+					"failed for image of size %" G_GSIZE_FORMAT ": %s\n",
+					(gsize)purple_imgstore_get_size(status_box->buddy_icon_img),
 					error ? error->message : "(no error message)");
 			if (error)
 				g_error_free(error);



More information about the Commits mailing list