Return-Path: X-Original-To: notmuch@notmuchmail.org Delivered-To: notmuch@notmuchmail.org Received: from localhost (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id BB817431FAE for ; Fri, 3 Feb 2012 14:41:19 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Amavis-Alert: BAD HEADER SECTION, Duplicate header field: "References" X-Spam-Flag: NO X-Spam-Score: 0 X-Spam-Level: X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none] autolearn=disabled Received: from olra.theworths.org ([127.0.0.1]) by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id eMdWnZDO9B6K for ; Fri, 3 Feb 2012 14:41:19 -0800 (PST) Received: from mail-lpp01m020-f181.google.com (mail-lpp01m020-f181.google.com [209.85.217.181]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client certificate requested) by olra.theworths.org (Postfix) with ESMTPS id 1A075431FAF for ; Fri, 3 Feb 2012 14:41:18 -0800 (PST) Received: by mail-lpp01m020-f181.google.com with SMTP id gn5so940158lbb.26 for ; Fri, 03 Feb 2012 14:41:18 -0800 (PST) Received: by 10.112.49.67 with SMTP id s3mr2346817lbn.92.1328308878707; Fri, 03 Feb 2012 14:41:18 -0800 (PST) Received: from localhost (dsl-hkibrasgw4-fe50f800-253.dhcp.inet.fi. [84.248.80.253]) by mx.google.com with ESMTPS id pt3sm5891357lab.9.2012.02.03.14.41.16 (version=SSLv3 cipher=OTHER); Fri, 03 Feb 2012 14:41:17 -0800 (PST) From: Jani Nikula To: notmuch@notmuchmail.org Subject: [PATCH 2/2] cli: reach previously unreachable cleanup code in "notmuch show" Date: Sat, 4 Feb 2012 00:41:09 +0200 Message-Id: <5b1ad40819ff3a97a833a46663f79a7462d6996e.1328308635.git.jani@nikula.org> X-Mailer: git-send-email 1.7.5.4 In-Reply-To: References: In-Reply-To: References: X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Feb 2012 22:41:19 -0000 The last lines of notmuch_show_command() function were unreachable. Fix it by using a variable for return value. Signed-off-by: Jani Nikula --- notmuch-show.c | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-) diff --git a/notmuch-show.c b/notmuch-show.c index f93e121..b18e279 100644 --- a/notmuch-show.c +++ b/notmuch-show.c @@ -1064,7 +1064,7 @@ notmuch_show_command (void *ctx, unused (int argc), unused (char *argv[])) notmuch_database_t *notmuch; notmuch_query_t *query; char *query_string; - int opt_index; + int opt_index, ret; const notmuch_show_format_t *format = &format_text; notmuch_show_params_t params = { .part = -1 }; int format_sel = NOTMUCH_FORMAT_NOT_SPECIFIED; @@ -1173,9 +1173,9 @@ notmuch_show_command (void *ctx, unused (int argc), unused (char *argv[])) } if (params.part >= 0) - return do_show_single (ctx, query, format, ¶ms); + ret = do_show_single (ctx, query, format, ¶ms); else - return do_show (ctx, query, format, ¶ms); + ret = do_show (ctx, query, format, ¶ms); notmuch_query_destroy (query); notmuch_database_close (notmuch); @@ -1183,5 +1183,5 @@ notmuch_show_command (void *ctx, unused (int argc), unused (char *argv[])) if (params.cryptoctx) g_object_unref(params.cryptoctx); - return 0; + return ret; } -- 1.7.5.4