/pidgin/main: 4c1e8623b7c7: Fix warnings

Tomasz Wasilczyk twasilczyk at pidgin.im
Fri Apr 11 05:54:38 EDT 2014


Changeset: 4c1e8623b7c787c4db4664be3262b9094eb4e833
Author:	 Tomasz Wasilczyk <twasilczyk at pidgin.im>
Date:	 2014-04-11 11:54 +0200
Branch:	 default
URL: https://hg.pidgin.im/pidgin/main/rev/4c1e8623b7c7

Description:

Fix warnings

diffstat:

 libpurple/protocols/gg/message-prpl.c |  2 +-
 libpurple/smiley-custom.c             |  3 +--
 pidgin/gtkutils.c                     |  1 +
 3 files changed, 3 insertions(+), 3 deletions(-)

diffs (43 lines):

diff --git a/libpurple/protocols/gg/message-prpl.c b/libpurple/protocols/gg/message-prpl.c
--- a/libpurple/protocols/gg/message-prpl.c
+++ b/libpurple/protocols/gg/message-prpl.c
@@ -586,7 +586,7 @@ gchar * ggp_message_format_to_gg(PurpleC
 					image = purple_image_store_get(image_id);
 			}
 
-			if (image >= 0)
+			if (image != NULL)
 				res = ggp_image_prepare(conv, image, &id);
 
 			if (res == GGP_IMAGE_PREPARE_OK) {
diff --git a/libpurple/smiley-custom.c b/libpurple/smiley-custom.c
--- a/libpurple/smiley-custom.c
+++ b/libpurple/smiley-custom.c
@@ -181,7 +181,6 @@ purple_smiley_custom_add(PurpleImage *im
 	gchar *checksum, *file_path;
 	gchar file_name[256];
 	const gchar *file_ext;
-	GError *error = NULL;
 	gboolean succ;
 
 	g_return_val_if_fail(PURPLE_IS_IMAGE(img), NULL);
@@ -211,7 +210,7 @@ purple_smiley_custom_add(PurpleImage *im
 
 	if (!purple_image_save(img, file_path)) {
 		purple_debug_error("smiley-custom", "Failed writing smiley "
-			"file %s: %s", file_path, error->message);
+			"file %s", file_path);
 		g_free(file_path);
 		g_object_unref(img);
 		return NULL;
diff --git a/pidgin/gtkutils.c b/pidgin/gtkutils.c
--- a/pidgin/gtkutils.c
+++ b/pidgin/gtkutils.c
@@ -1460,6 +1460,7 @@ static void dnd_image_ok_callback(_DndDa
 		shortname = strrchr(data->filename, G_DIR_SEPARATOR);
 		shortname = shortname ? shortname + 1 : data->filename;
 		img = purple_image_new_from_data(filedata, size);
+		purple_image_set_friendly_filename(img, shortname);
 
 		pidgin_webview_insert_image(PIDGIN_WEBVIEW(gtkconv->entry), img);
 		g_object_unref(img);



More information about the Commits mailing list