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 3C4E3431FBC for ; Wed, 25 Nov 2009 05:01:49 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 LgMevsW8kc66 for ; Wed, 25 Nov 2009 05:01:48 -0800 (PST) Received: from mail-yx0-f187.google.com (mail-yx0-f187.google.com [209.85.210.187]) by olra.theworths.org (Postfix) with ESMTP id 5E6BA431FAE for ; Wed, 25 Nov 2009 05:01:48 -0800 (PST) Received: by yxe17 with SMTP id 17so6586416yxe.33 for ; Wed, 25 Nov 2009 05:01:47 -0800 (PST) Received: by 10.101.152.16 with SMTP id e16mr5186021ano.180.1259154106929; Wed, 25 Nov 2009 05:01:46 -0800 (PST) Received: from lt26923.campus.dmacc.edu ([69.57.47.215]) by mx.google.com with ESMTPS id 5sm681816yxd.17.2009.11.25.05.01.45 (version=TLSv1/SSLv3 cipher=RC4-MD5); Wed, 25 Nov 2009 05:01:46 -0800 (PST) Received: from localhost ([127.0.0.1] helo=localhost.localdomain) by lt26923.campus.dmacc.edu with esmtps (TLSv1:AES256-SHA:256) (Exim 4.69) (envelope-from ) id 1NDHV7-0003sA-Lj; Wed, 25 Nov 2009 07:01:41 -0600 From: "Jeffrey C. Ollie" To: Not Much Mail Date: Wed, 25 Nov 2009 07:01:36 -0600 Message-Id: <1259154096-14856-1-git-send-email-jeff@ocjtech.us> X-Mailer: git-send-email 1.6.5.2 Subject: [notmuch] [PATCH] Silence compiler warning by initializing a variable. X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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: Wed, 25 Nov 2009 13:01:49 -0000 If Xapian threw an exception on notmuch_query_count_messages the count variable could be used uninitialized. Initialize count to solve the problem. Signed-off-by: Jeffrey C. Ollie --- lib/query.cc | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/lib/query.cc b/lib/query.cc index a571a61..9106b92 100644 --- a/lib/query.cc +++ b/lib/query.cc @@ -315,7 +315,7 @@ notmuch_query_count_messages (notmuch_query_t *query) { notmuch_database_t *notmuch = query->notmuch; const char *query_string = query->query_string; - Xapian::doccount count; + Xapian::doccount count = 0; try { Xapian::Enquire enquire (*notmuch->xapian_db); -- 1.6.5.2