/pidgin/main: d73e41243b71: Fix warnings

Tomasz Wasilczyk twasilczyk at pidgin.im
Thu May 15 11:59:37 EDT 2014


Changeset: d73e41243b7186d41fcf2d61721a873db701eebf
Author:	 Tomasz Wasilczyk <twasilczyk at pidgin.im>
Date:	 2014-05-15 17:59 +0200
Branch:	 default
URL: https://hg.pidgin.im/pidgin/main/rev/d73e41243b71

Description:

Fix warnings

diffstat:

 libpurple/protocols/sametime/sametime.c |   2 +-
 libpurple/util.c                        |  10 ++++------
 2 files changed, 5 insertions(+), 7 deletions(-)

diffs (53 lines):

diff --git a/libpurple/protocols/sametime/sametime.c b/libpurple/protocols/sametime/sametime.c
--- a/libpurple/protocols/sametime/sametime.c
+++ b/libpurple/protocols/sametime/sametime.c
@@ -2215,7 +2215,7 @@ static void ft_send(struct mwFileTransfe
   rem = mwFileTransfer_getRemaining(ft);
   if(rem < MW_FT_LEN) o.len = rem;
 
-  if(purple_xfer_read_file(xfer, buf, (size_t) o.len) == o.len) {
+  if(purple_xfer_read_file(xfer, buf, (size_t) o.len) == (gssize)o.len) {
 
     /* calculate progress and display it */
     purple_xfer_set_bytes_sent(xfer, purple_xfer_get_bytes_sent(xfer) + o.len);
diff --git a/libpurple/util.c b/libpurple/util.c
--- a/libpurple/util.c
+++ b/libpurple/util.c
@@ -3934,8 +3934,7 @@ purple_url_encode(const char *str)
 	const char *iter;
 	static char buf[BUF_LEN];
 	char utf_char[6];
-	int i;
-	guint j = 0;
+	guint i, j = 0;
 
 	g_return_val_if_fail(str != NULL, NULL);
 	g_return_val_if_fail(g_utf8_validate(str, -1, NULL), NULL);
@@ -3949,7 +3948,7 @@ purple_url_encode(const char *str)
 			buf[j++] = c;
 		} else {
 			int bytes = g_unichar_to_utf8(c, utf_char);
-			for (i = 0; i < bytes; i++) {
+			for (i = 0; (int)i < bytes; i++) {
 				if (j > (BUF_LEN - 4))
 					break;
 				if (i >= sizeof(utf_char)) {
@@ -4592,8 +4591,7 @@ purple_escape_filename(const char *str)
 	const char *iter;
 	static char buf[BUF_LEN];
 	char utf_char[6];
-	int i;
-	guint j = 0;
+	guint i, j = 0;
 
 	g_return_val_if_fail(str != NULL, NULL);
 	g_return_val_if_fail(g_utf8_validate(str, -1, NULL), NULL);
@@ -4608,7 +4606,7 @@ purple_escape_filename(const char *str)
 			buf[j++] = c;
 		} else {
 			int bytes = g_unichar_to_utf8(c, utf_char);
-			for (i = 0; i < bytes; i++) {
+			for (i = 0; (int)i < bytes; i++) {
 				if (j > (BUF_LEN - 4))
 					break;
 				if (i >= sizeof(utf_char)) {



More information about the Commits mailing list