]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
Make static analyzer happier.
authorTimo Sirainen <tss@iki.fi>
Sun, 27 Sep 2015 16:03:31 +0000 (19:03 +0300)
committerTimo Sirainen <tss@iki.fi>
Sun, 27 Sep 2015 16:03:31 +0000 (19:03 +0300)
src/lib-mail/test-message-id.c
src/lib-storage/list/mailbox-list-index-status.c
src/lib-storage/mail-namespace.c

index b8b0505380bd2c314fcb1fb65d37b5e3c957fda0..184fbc4d7d88f143a6ad82a69ae8955babc85a0f 100644 (file)
@@ -27,7 +27,8 @@ static void test_message_id_get_next(void)
                while ((next_msgid = message_id_get_next(&msgid)) != NULL) {
                        if (output[j] == NULL)
                                break;
-                       test_assert(strcmp(output[j++], next_msgid) == 0);
+                       test_assert(strcmp(output[j], next_msgid) == 0);
+                       j++;
                }
                test_assert(output[j++] == NULL && next_msgid == NULL);
        }
index 87a2c010ec048331a3bd31c2454acdce3d07e662..07a4ef95815942f010ce44acf7f1b29d9ad15338 100644 (file)
@@ -275,6 +275,8 @@ index_list_try_get_metadata(struct mailbox *box,
        enum mailbox_metadata_items noncached_items;
        int ret;
 
+       i_assert(metadata_r != NULL);
+
        if (box->opened) {
                /* if mailbox is already opened, don't bother using the values
                   in mailbox list index. they have a higher chance of being
index 11c2a31e96699736b822a68c3bf970f972a5dffa..c3d3f84bf66558530d29c8f978b770d41e3f7ece 100644 (file)
@@ -321,6 +321,8 @@ int mail_namespaces_init_finish(struct mail_namespace *namespaces,
        struct mail_namespace *ns;
        bool prefixless_found = FALSE;
 
+       i_assert(namespaces != NULL);
+
        for (ns = namespaces; ns != NULL; ns = ns->next) {
                if (ns->prefix_len == 0)
                        prefixless_found = TRUE;