[gmime] Fixed compile warnings about comparisons between signed and unsigned variables
- From: Jeffrey Stedfast <fejj src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gmime] Fixed compile warnings about comparisons between signed and unsigned variables
- Date: Sat, 11 Apr 2015 23:11:16 +0000 (UTC)
commit 9493084ad0f1b2e4235f5a4ebdd6e64009bd1d2b
Author: Jeffrey Stedfast <jeff xamarin com>
Date: Sat Apr 11 19:10:50 2015 -0400
Fixed compile warnings about comparisons between signed and unsigned variables
gmime/gmime-message-partial.c | 2 +-
gmime/gmime-part-iter.c | 3 ++-
gmime/gmime-stream-buffer.c | 4 ++--
util/url-scanner.c | 2 +-
4 files changed, 6 insertions(+), 5 deletions(-)
---
diff --git a/gmime/gmime-message-partial.c b/gmime/gmime-message-partial.c
index 0888f9a..165012e 100644
--- a/gmime/gmime-message-partial.c
+++ b/gmime/gmime-message-partial.c
@@ -436,7 +436,7 @@ g_mime_message_partial_split_message (GMimeMessage *message, size_t max_size, si
len = g_mime_stream_length (stream);
/* optimization */
- if (len <= max_size) {
+ if (len <= (gint64) max_size) {
g_object_unref (stream);
g_object_ref (message);
diff --git a/gmime/gmime-part-iter.c b/gmime/gmime-part-iter.c
index b178e0d..09b2ab1 100644
--- a/gmime/gmime-part-iter.c
+++ b/gmime/gmime-part-iter.c
@@ -473,7 +473,8 @@ char *
g_mime_part_iter_get_path (GMimePartIter *iter)
{
GString *path;
- int i, v;
+ guint i;
+ int v;
if (!g_mime_part_iter_is_valid (iter))
return NULL;
diff --git a/gmime/gmime-stream-buffer.c b/gmime/gmime-stream-buffer.c
index 2cf275e..20d85ef 100644
--- a/gmime/gmime-stream-buffer.c
+++ b/gmime/gmime-stream-buffer.c
@@ -463,7 +463,7 @@ stream_seek_block_read (GMimeStream *stream, gint64 offset, GMimeSeekWhence when
return stream->position;
if ((offset < 0 && offset >= (buffer->buffer - buffer->bufptr))
- || (offset > 0 && offset <= buffer->buflen)) {
+ || (offset > 0 && offset <= (gint64) buffer->buflen)) {
/* the position is within our pre-buffered region */
stream->position += offset;
buffer->bufptr += (size_t) offset;
@@ -539,7 +539,7 @@ stream_seek_cache_read (GMimeStream *stream, gint64 offset, GMimeSeekWhence when
pos = buffer->bufptr - buffer->buffer;
buflen = (buffer->bufend - buffer->buffer) + len;
- if (buflen < G_MAXSIZE)
+ if (buflen < (gint64) G_MAXSIZE)
buffer->buflen = (size_t) buflen;
else
buffer->buflen = G_MAXSIZE;
diff --git a/util/url-scanner.c b/util/url-scanner.c
index a942801..f6671b2 100644
--- a/util/url-scanner.c
+++ b/util/url-scanner.c
@@ -152,7 +152,7 @@ static struct {
static gboolean
is_open_brace (char c)
{
- int i;
+ unsigned int i;
for (i = 0; i < G_N_ELEMENTS (url_braces); i++) {
if (c == url_braces[i].open)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]