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 9CABB431FDA for ; Mon, 23 Feb 2015 09:04:24 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: 1.738 X-Spam-Level: * X-Spam-Status: No, score=1.738 tagged_above=-999 required=5 tests=[DNS_FROM_AHBL_RHSBL=2.438, 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 i3emdSNfaFAr for ; Mon, 23 Feb 2015 09:04:21 -0800 (PST) Received: from mail-wi0-f174.google.com (mail-wi0-f174.google.com [209.85.212.174]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client certificate requested) by olra.theworths.org (Postfix) with ESMTPS id 9F7AB431FDE for ; Mon, 23 Feb 2015 09:04:19 -0800 (PST) Received: by mail-wi0-f174.google.com with SMTP id em10so19269948wid.1 for ; Mon, 23 Feb 2015 08:56:01 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=NfoYblGsrwJTNyCeMXzCR5zR/76lWqpRX7JchQeQGdo=; b=XI9ORpu0pyw2aGCRCy3zOJBrjCP4ZWfwRzWjd7QSXn4j3HM9C91syPmvI93ccE+LUo Caq+6yDYxr8Wla0IJI+guYoiiNjOsPXfAxMq61jd5/OkrSOPebnJD6p3UmvxUJyvh9YE s1vdYmGLdswupaL29MA+RCx1OcvEt3cquRs+OZcP3qVB1zzCKsIghS5LRGnwcJit4Vt3 E0taPbVSdOO/wuXn2rkLTnHst1ENUeZXIHolI66SOnvZfU751vlpGQHif3MLTKiQRrDS 2+KogB/7BOLOS6l4AmTsmMiLd8Rz0aLD7lI+UECKMrVvI7HC+RChAXCb/9YTzXmDI3G9 YgjA== X-Gm-Message-State: ALoCoQms2NKDr08Uy0jDxSrUe/ruYedQZfU13lddSXjLUHj6yHuoHueGhhVc2Hhw7nW6WQjX4S8p X-Received: by 10.180.221.232 with SMTP id qh8mr17316382wic.19.1424710561739; Mon, 23 Feb 2015 08:56:01 -0800 (PST) Received: from localhost (mobile-internet-bcee3b-76.dhcp.inet.fi. [188.238.59.76]) by mx.google.com with ESMTPSA id qo10sm56355792wjc.38.2015.02.23.08.56.00 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 23 Feb 2015 08:56:01 -0800 (PST) From: Jani Nikula To: notmuch@notmuchmail.org Subject: [PATCH 2/3] lib: fix clang build warnings Date: Mon, 23 Feb 2015 18:56:15 +0200 Message-Id: <1424710576-30468-2-git-send-email-jani@nikula.org> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1424710576-30468-1-git-send-email-jani@nikula.org> References: <1424710576-30468-1-git-send-email-jani@nikula.org> 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, 23 Feb 2015 17:04:24 -0000 Fix the following warning produced by clang 3.5.0: lib/message.cc:899:4: warning: comparison of constant 64 with expression of type 'notmuch_message_flag_t' (aka '_notmuch_message_flag') is always true [-Wtautological-constant-out-of-range-compare] ! NOTMUCH_TEST_BIT (message->lazy_flags, flag)) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ./lib/notmuch-private.h:70:6: note: expanded from macro 'NOTMUCH_TEST_BIT' (_NOTMUCH_VALID_BIT(bit) ? !!((val) & (1ull << (bit))) : 0) ^~~~~~~~~~~~~~~~~~~~~~~ ./lib/notmuch-private.h:68:26: note: expanded from macro '_NOTMUCH_VALID_BIT' ((bit) >= 0 && (bit) < CHAR_BIT * sizeof (unsigned long long)) ~~~~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ --- lib/notmuch-private.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/notmuch-private.h b/lib/notmuch-private.h index 02a8fc62b631..8a1f2fab77af 100644 --- a/lib/notmuch-private.h +++ b/lib/notmuch-private.h @@ -65,7 +65,7 @@ NOTMUCH_BEGIN_DECLS /* Robust bit test/set/reset macros */ #define _NOTMUCH_VALID_BIT(bit) \ - ((bit) >= 0 && (bit) < CHAR_BIT * sizeof (unsigned long long)) + ((bit) >= 0 && ((unsigned long) bit) < CHAR_BIT * sizeof (unsigned long long)) #define NOTMUCH_TEST_BIT(val, bit) \ (_NOTMUCH_VALID_BIT(bit) ? !!((val) & (1ull << (bit))) : 0) #define NOTMUCH_SET_BIT(valp, bit) \ -- 2.1.4