]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
Compiler warning fixes.
authorTimo Sirainen <tss@iki.fi>
Thu, 11 Mar 2010 01:22:36 +0000 (03:22 +0200)
committerTimo Sirainen <tss@iki.fi>
Thu, 11 Mar 2010 01:22:36 +0000 (03:22 +0200)
--HG--
branch : HEAD

src/lib-storage/index/maildir/maildir-uidlist.c
src/lib-storage/index/mbox/istream-raw-mbox.c
src/lib-storage/index/mbox/mbox-sync-update.c
src/lib/test-istream-concat.c
src/lib/test-istream-seekable.c
src/master/service-anvil.c

index df2c9a53ad75abd6cac2e42eefe59560f632b864..cbaffc27db75a46375af51b28fb23cfac505baf4 100644 (file)
@@ -1080,7 +1080,7 @@ maildir_uidlist_lookup_ext(struct maildir_uidlist *uidlist, uint32_t uid,
        p = rec->extensions;
        while (*p != '\0') {
                /* <key><value>\0 */
-               if (*p == (char)key)
+               if (*p == (unsigned char)key)
                        return (const char *)p + 1;
 
                p += strlen((const char *)p) + 1;
@@ -1176,7 +1176,7 @@ maildir_uidlist_set_ext_real(struct maildir_uidlist *uidlist, uint32_t uid,
                while (*p != '\0') {
                        /* <key><value>\0 */
                        len = strlen((const char *)p) + 1;
-                       if (*p != (char)key)
+                       if (*p != (unsigned char)key)
                                buffer_append(buf, p, len);
                        p += len;
                }
index 2cdc97bda5789796ea485d63d2d12d2b863961a4..603ab15faffc7f88db2bc9c26b817f33ba369e8c 100644 (file)
@@ -285,7 +285,7 @@ static ssize_t i_stream_raw_mbox_read(struct istream_private *stream)
                        rstream->body_offset = stream->istream.v_offset + i + 1;
                        eoh_char = -1;
                }
-               if (buf[i] == *fromp) {
+               if ((char)buf[i] == *fromp) {
                        if (*++fromp == '\0') {
                                /* potential From-line, see if we have the
                                   rest of the line buffered. */
@@ -335,7 +335,7 @@ static ssize_t i_stream_raw_mbox_read(struct istream_private *stream)
                        }
                } else {
                        fromp = mbox_from;
-                       if (buf[i] == *fromp)
+                       if ((char)buf[i] == *fromp)
                                fromp++;
                }
        }
index 3640b0e5bd56448a089d9ac64548760d3b79936d..d5d8faae5697a3fa824d9729a67b85bb031f9fc0 100644 (file)
@@ -96,7 +96,7 @@ static void status_flags_replace(struct mbox_sync_mail_context *ctx, size_t pos,
 
                /* see if this is unknown flag for us */
                for (i = 0; flags_list[i].chr != 0; i++) {
-                       if (flags_list[i].chr == data[pos])
+                       if (flags_list[i].chr == (char)data[pos])
                                break;
                }
 
index ce7f43cb17e07afe2a2f9ef6b5f14104fb5df2e8..12314472594bf92ec718913f9044df6e1ed5ec16 100644 (file)
@@ -39,7 +39,7 @@ static void test_istream_concat_one(unsigned int buffer_size)
                        test_assert(size == buffer_size);
                }
                for (j = 0; j < size; j++) {
-                       test_assert(data[j] == input_string[(input->v_offset + j) % STREAM_BYTES]);
+                       test_assert((char)data[j] == input_string[(input->v_offset + j) % STREAM_BYTES]);
                }
        }
        i_stream_unref(&input);
index da64cdcffc0bd4a193e93403e1aff190882cabaa..955f710290d73b1f8a91cb5925ea707c0a47d3b2 100644 (file)
@@ -55,7 +55,7 @@ static void test_istream_seekable_one(unsigned int buffer_size)
                        test_assert(size == buffer_size);
                }
                for (j = 0; j < size; j++) {
-                       test_assert(data[j] == input_string[(input->v_offset + j) % STREAM_BYTES]);
+                       test_assert((char)data[j] == input_string[(input->v_offset + j) % STREAM_BYTES]);
                }
        }
        for (i = 0; i < STREAM_COUNT; i++)
index 729f042e88c787899bbde3ea94f13012c1ca99e8..9d000674ead4f53ab6cdc6359bbfd432fac1303d 100644 (file)
@@ -72,7 +72,7 @@ static int anvil_send_handshake(int fd, const char **error_r)
                return -1;
        }
        /* this is a pipe, it either wrote all of it or nothing */
-       i_assert(ret == strlen(ANVIL_HANDSHAKE));
+       i_assert((size_t)ret == strlen(ANVIL_HANDSHAKE));
        return 0;
 }