--- a/libpurple/circbuffer.c Wed Aug 21 14:59:29 2013 +0200 +++ b/libpurple/circbuffer.c Thu Aug 22 09:59:29 2013 +0200 @@ -42,8 +42,8 @@ } static void grow_circ_buffer(PurpleCircBuffer *buf, gsize len) { - int in_offset = 0, out_offset = 0; - int start_buflen; + gsize in_offset = 0, out_offset = 0; + gsize start_buflen; g_return_if_fail(buf != NULL); @@ -70,7 +70,7 @@ * pointer, we need to shift the data */ if (in_offset < out_offset || (in_offset == out_offset && buf->bufused > 0)) { - int shift_n = MIN(buf->buflen - start_buflen, + gsize shift_n = MIN(buf->buflen - start_buflen, in_offset); memcpy(buf->buffer + start_buflen, buf->buffer, shift_n); @@ -92,7 +92,7 @@ void purple_circ_buffer_append(PurpleCircBuffer *buf, gconstpointer src, gsize len) { - int len_stored; + gsize len_stored; g_return_if_fail(buf != NULL); @@ -145,7 +145,7 @@ buf->outptr += len; buf->bufused -= len; /* wrap to the start if we're at the end */ - if ((buf->outptr - buf->buffer) == buf->buflen) + if ((gsize)(buf->outptr - buf->buffer) == buf->buflen) buf->outptr = buf->buffer; return TRUE;