/dev/tomkiewicz/gg11: 15639e15839e: Gadu-Gadu: fix -Wsign-compar...
Tomasz Wasilczyk
twasilczyk at pidgin.im
Wed Aug 28 13:47:00 EDT 2013
Changeset: 15639e15839ee17d36a62ff4758be0b8172ad5fa
Author: Tomasz Wasilczyk <twasilczyk at pidgin.im>
Date: 2013-08-28 19:46 +0200
Branch: default
URL: https://hg.pidgin.im/dev/tomkiewicz/gg11/rev/15639e15839e
Description:
Gadu-Gadu: fix -Wsign-compare errors
diffstat:
libpurple/protocols/gg/chat.c | 2 +-
libpurple/protocols/gg/edisc.c | 6 +++---
libpurple/protocols/gg/message-prpl.c | 4 ++--
3 files changed, 6 insertions(+), 6 deletions(-)
diffs (63 lines):
diff --git a/libpurple/protocols/gg/chat.c b/libpurple/protocols/gg/chat.c
--- a/libpurple/protocols/gg/chat.c
+++ b/libpurple/protocols/gg/chat.c
@@ -151,7 +151,7 @@ void ggp_chat_got_event(PurpleConnection
{
ggp_chat_session_data *sdata = ggp_chat_get_sdata(gc);
ggp_chat_local_info *chat;
- int i;
+ uint32_t i;
if (ev->type == GG_EVENT_CHAT_INFO)
{
diff --git a/libpurple/protocols/gg/edisc.c b/libpurple/protocols/gg/edisc.c
--- a/libpurple/protocols/gg/edisc.c
+++ b/libpurple/protocols/gg/edisc.c
@@ -45,7 +45,7 @@ struct _ggp_edisc_xfer
PurpleConnection *gc;
PurpleHttpConnection *hc;
- int already_read;
+ gsize already_read;
};
typedef enum
@@ -970,7 +970,7 @@ static gboolean ggp_edisc_xfer_recv_writ
{
PurpleXfer *xfer = _xfer;
ggp_edisc_xfer *edisc_xfer;
- int stored;
+ gssize stored;
g_return_val_if_fail(xfer != NULL, FALSE);
edisc_xfer = purple_xfer_get_protocol_data(xfer);
@@ -981,7 +981,7 @@ static gboolean ggp_edisc_xfer_recv_writ
else
stored = fwrite(buffer, 1, length, xfer->dest_fp);
- if (stored != length) {
+ if (stored < 0 || (gsize)stored != length) {
purple_debug_error("gg", "ggp_edisc_xfer_recv_writer: "
"saved too less\n");
return FALSE;
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
@@ -394,7 +394,7 @@ gchar * ggp_message_format_to_gg(PurpleC
gchar *text_new, *tmp;
GList *rt = NULL; /* reformatted text */
GMatchInfo *match;
- int pos = 0;
+ guint pos = 0;
GList *pending_objects = NULL;
GList *font_stack = NULL;
static int html_sizes_pt[7] = { 7, 8, 9, 10, 12, 14, 16 };
@@ -440,7 +440,7 @@ gchar * ggp_message_format_to_gg(PurpleC
/* reading tag and its contents */
g_match_info_fetch_pos(match, 0, &m_start, &m_end);
g_assert(m_start >= 0 && m_end >= 0);
- text_before = (m_start > pos);
+ text_before = ((guint)m_start > pos);
g_match_info_fetch_pos(match, 1, &m_pos, NULL);
tag_close = (m_pos >= 0);
tag_str = g_match_info_fetch(match, 2);
More information about the Commits
mailing list