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 0FC2A431FC7 for ; Mon, 6 Feb 2012 11:57:42 -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.7 X-Spam-Level: X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5 tests=[RCVD_IN_DNSWL_LOW=-0.7] 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 XT9-9X2uzkrw for ; Mon, 6 Feb 2012 11:57:41 -0800 (PST) Received: from mail-lpp01m010-f53.google.com (mail-lpp01m010-f53.google.com [209.85.215.53]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client certificate requested) by olra.theworths.org (Postfix) with ESMTPS id 6DCFA431FAF for ; Mon, 6 Feb 2012 11:57:38 -0800 (PST) Received: by mail-lpp01m010-f53.google.com with SMTP id d3so3838995lah.26 for ; Mon, 06 Feb 2012 11:57:38 -0800 (PST) Received: by 10.112.102.37 with SMTP id fl5mr5317381lbb.95.1328558258005; Mon, 06 Feb 2012 11:57:38 -0800 (PST) Received: from localhost (dsl-hkibrasgw4-fe50f800-253.dhcp.inet.fi. [84.248.80.253]) by mx.google.com with ESMTPS id k4sm13781781lbw.10.2012.02.06.11.57.35 (version=SSLv3 cipher=OTHER); Mon, 06 Feb 2012 11:57:36 -0800 (PST) From: Jani Nikula To: notmuch@notmuchmail.org Subject: [PATCH v2 3/3] cli: reach previously unreachable cleanup code in "notmuch show" Date: Mon, 6 Feb 2012 21:57:23 +0200 Message-Id: <8da04ac681ef083f60b4dd01b7fbdda241a11ce9.1328558175.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: Mon, 06 Feb 2012 19:57:42 -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 b358278..c8fbd79 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; @@ -1169,9 +1169,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); @@ -1179,5 +1179,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