dovecot-2.0: lib-index: Work around clang static analyzer's fals...
dovecot at dovecot.org
dovecot at dovecot.org
Sat Oct 16 02:49:38 EEST 2010
details: http://hg.dovecot.org/dovecot-2.0/rev/84a9dc26108f
changeset: 12292:84a9dc26108f
user: Timo Sirainen <tss at iki.fi>
date: Sat Oct 16 00:43:49 2010 +0100
description:
lib-index: Work around clang static analyzer's false positive "dead code" issue.
diffstat:
src/lib-index/mail-index-sync-update.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diffs (30 lines):
diff -r 0521ab2380cf -r 84a9dc26108f src/lib-index/mail-index-sync-update.c
--- a/src/lib-index/mail-index-sync-update.c Sat Oct 16 00:35:28 2010 +0100
+++ b/src/lib-index/mail-index-sync-update.c Sat Oct 16 00:43:49 2010 +0100
@@ -70,7 +70,7 @@
mail_index_modseq_sync_map_replaced(ctx->modseq_ctx);
}
-static void
+static struct mail_index_map *
mail_index_sync_move_to_private_memory(struct mail_index_sync_map_ctx *ctx)
{
struct mail_index_map *map = ctx->view->map;
@@ -86,6 +86,7 @@
if (!MAIL_INDEX_MAP_IS_IN_MEMORY(ctx->view->map))
mail_index_map_move_to_memory(ctx->view->map);
mail_index_modseq_sync_map_replaced(ctx->modseq_ctx);
+ return map;
}
struct mail_index_map *
@@ -374,8 +375,7 @@
/* move to memory. the mapping is written when unlocking so we don't
waste time re-mmap()ing multiple times or waste space growing index
file too large */
- mail_index_sync_move_to_private_memory(ctx);
- map = view->map;
+ map = mail_index_sync_move_to_private_memory(ctx);
if (rec->uid <= map->rec_map->last_appended_uid) {
i_assert(map->hdr.messages_count < map->rec_map->records_count);
More information about the dovecot-cvs
mailing list