pidgin/pidgin

Fix warnings

2014-05-15, Tomasz Wasilczyk
d73e41243b71
Parents 8542cfac74c4
Children f986ac8e9e0c
Fix warnings
--- a/libpurple/protocols/sametime/sametime.c Thu May 15 17:30:56 2014 +0200
+++ b/libpurple/protocols/sametime/sametime.c Thu May 15 17:59:31 2014 +0200
@@ -2215,7 +2215,7 @@
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);
--- a/libpurple/util.c Thu May 15 17:30:56 2014 +0200
+++ b/libpurple/util.c Thu May 15 17:59:31 2014 +0200
@@ -3934,8 +3934,7 @@
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 @@
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 @@
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 @@
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)) {