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 40BF7431FB6 for ; Sun, 21 Oct 2012 14:22:40 -0700 (PDT) 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 ozNb4-ChJP+y for ; Sun, 21 Oct 2012 14:22:39 -0700 (PDT) Received: from mail-la0-f53.google.com (mail-la0-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 93B8F431FAE for ; Sun, 21 Oct 2012 14:22:39 -0700 (PDT) Received: by mail-la0-f53.google.com with SMTP id l5so1455559lah.26 for ; Sun, 21 Oct 2012 14:22:39 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references :in-reply-to:references:x-gm-message-state; bh=WJSPfCB466xGb/NqIS1J6Zzp3Dla2pAFxyf44tUFT3c=; b=NEiMKwfsB2pWtNuwbREYkLkT5PnhfzjBRHJziFXf7Rwwm/otrOl+wddYOJDU/ihF5D XAT+6P5v97S+mRe2Uwm0i4EKIlACMcqfR5VAjurazKeV9mBSDwa7JT3QXVsyZYeYWx40 4xyPnbPdhbWIbm1Wo3oWltlj7f6C6DlcThpGkmP5Gf8ZNiNmKG/gmn7/hrSVBg5oiaxD x1fVw/vGG6vUnsGlwfYQOgfNlI4++WGR0ZeIN/Bt3gV55Du9FbMMAhKAC6+Az5klfMjX kcxR/PBPgzgnuMaTWFOcudypvy3wt6k2SRUqZCG+SSclViCynVGKElRvNkrGdLkvfGqZ cnEw== Received: by 10.112.54.40 with SMTP id g8mr2987780lbp.49.1350854559182; Sun, 21 Oct 2012 14:22:39 -0700 (PDT) Received: from localhost (dsl-hkibrasgw4-fe51df00-27.dhcp.inet.fi. [80.223.81.27]) by mx.google.com with ESMTPS id ft3sm2495785lbb.1.2012.10.21.14.22.37 (version=SSLv3 cipher=OTHER); Sun, 21 Oct 2012 14:22:38 -0700 (PDT) From: Jani Nikula To: notmuch@notmuchmail.org Subject: [PATCH v5 1/9] build: drop the -Wswitch-enum warning Date: Mon, 22 Oct 2012 00:22:24 +0300 Message-Id: X-Mailer: git-send-email 1.7.10.4 In-Reply-To: References: In-Reply-To: References: X-Gm-Message-State: ALoCoQmwHUvgcmquX+FSd/GQAA8v8UL5pIF8UOn9wtsJMT6+scC6ysIMeWBz+1bx4XZLUux1/R1T 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: Sun, 21 Oct 2012 21:22:40 -0000 -Wswitch-enum is a bit awkward if a switch statement is intended to handle just some of the named codes of an enumeration especially, and leave the rest to the default label. We already have -Wall, which enables -Wswitch by default, and per GCC documentation, "The only difference between -Wswitch and this option [-Wswitch-enum] is that this option gives a warning about an omitted enumeration code even if there is a default label." Drop -Wswitch-enum to not force listing all named codes of enumerations in switch statements that have a default label. --- This will be useful in the next patch. --- configure | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure b/configure index acb90a8..afa5c16 100755 --- a/configure +++ b/configure @@ -532,7 +532,7 @@ fi WARN_CXXFLAGS="" printf "Checking for available C++ compiler warning flags... " -for flag in -Wall -Wextra -Wwrite-strings -Wswitch-enum; do +for flag in -Wall -Wextra -Wwrite-strings; do if ${CC} $flag -o minimal minimal.c > /dev/null 2>&1 then WARN_CXXFLAGS="${WARN_CXXFLAGS}${WARN_CXXFLAGS:+ }${flag}" -- 1.7.10.4