# HG changeset patch # User Timo Sirainen # Date 1287186229 -3600 # Node ID 84a9dc26108f78d4e0128011a72b596e147b1a25 # Parent 0521ab2380cf3c2d5b4f7afeab8defd4739bfe3a lib-index: Work around clang static analyzer's false positive "dead code" issue. 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);