[PATCH 1/7] build: drop the -Wswitch-enum warning
authorJani Nikula <jani@nikula.org>
Fri, 3 Aug 2012 21:51:46 +0000 (00:51 +0300)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:48:48 +0000 (09:48 -0800)
cd/5b9e77f548ba05b89b717b43559d8ede7f84c4 [new file with mode: 0644]

diff --git a/cd/5b9e77f548ba05b89b717b43559d8ede7f84c4 b/cd/5b9e77f548ba05b89b717b43559d8ede7f84c4
new file mode 100644 (file)
index 0000000..71ada04
--- /dev/null
@@ -0,0 +1,103 @@
+Return-Path: <jani@nikula.org>\r
+X-Original-To: notmuch@notmuchmail.org\r
+Delivered-To: notmuch@notmuchmail.org\r
+Received: from localhost (localhost [127.0.0.1])\r
+       by olra.theworths.org (Postfix) with ESMTP id 8A93C431FBC\r
+       for <notmuch@notmuchmail.org>; Fri,  3 Aug 2012 14:52:00 -0700 (PDT)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Amavis-Alert: BAD HEADER SECTION, Duplicate header field: "References"\r
+X-Spam-Flag: NO\r
+X-Spam-Score: -0.7\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5\r
+       tests=[RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled\r
+Received: from olra.theworths.org ([127.0.0.1])\r
+       by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
+       with ESMTP id xDX8Esr9Z0Pi for <notmuch@notmuchmail.org>;\r
+       Fri,  3 Aug 2012 14:52:00 -0700 (PDT)\r
+Received: from mail-lpp01m010-f53.google.com (mail-lpp01m010-f53.google.com\r
+       [209.85.215.53]) (using TLSv1 with cipher RC4-SHA (128/128 bits))\r
+       (No client certificate requested)\r
+       by olra.theworths.org (Postfix) with ESMTPS id AEBEB431FAF\r
+       for <notmuch@notmuchmail.org>; Fri,  3 Aug 2012 14:51:59 -0700 (PDT)\r
+Received: by mail-lpp01m010-f53.google.com with SMTP id u2so681800lag.26\r
+       for <notmuch@notmuchmail.org>; Fri, 03 Aug 2012 14:51:59 -0700 (PDT)\r
+X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;\r
+       d=google.com; s=20120113;\r
+       h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references\r
+       :in-reply-to:references:x-gm-message-state;\r
+       bh=Lkr/U+DfYLJmMelD/8ON3yzhjTz3TnHlY29/2rDe5jY=;\r
+       b=l/V8cnTUDkl8aOHXCFCl5XnXhckEPATQTQCzBgSVbtCnDmYDdXXxxh5NoxL5U6Y8T9\r
+       tYsoPSmBIfvCw1l/xdocvzyB7lmNol4x8jNcWA+dC8k+wzSTiFF1SgMuuH31RMn9bLnM\r
+       iMUjL0ZEaaQYhLJ+54gYG4C7BxjSb3vmVe+B/j6LGMrPFqr0E4hLkVpIOEXQTPURfMSL\r
+       GBTVs0n/Qa3ec5e6jBUJ9dv460y6OGhQ/lW1yFtR4GPj/S3jvdwzBi6RU/Y1imJ6vF8K\r
+       i4G69WFfMNU8q88ah9mex8w01lLTiMOpDsJQRG4eTVcHii5OCMwEy98EfsEVD/hRpb9U\r
+       ZtCw==\r
+Received: by 10.152.125.133 with SMTP id mq5mr2905256lab.12.1344030719312;\r
+       Fri, 03 Aug 2012 14:51:59 -0700 (PDT)\r
+Received: from localhost (dsl-hkibrasgw4-fe51df00-27.dhcp.inet.fi.\r
+       [80.223.81.27])\r
+       by mx.google.com with ESMTPS id er3sm2251590lbb.16.2012.08.03.14.51.57\r
+       (version=SSLv3 cipher=OTHER); Fri, 03 Aug 2012 14:51:58 -0700 (PDT)\r
+From: Jani Nikula <jani@nikula.org>\r
+To: notmuch@notmuchmail.org\r
+Subject: [PATCH 1/7] build: drop the -Wswitch-enum warning\r
+Date: Sat,  4 Aug 2012 00:51:46 +0300\r
+Message-Id:\r
+ <70c91c3a70586075587d7f6971bbe59edeebd77f.1344028781.git.jani@nikula.org>\r
+X-Mailer: git-send-email 1.7.9.5\r
+In-Reply-To: <cover.1344028781.git.jani@nikula.org>\r
+References: <cover.1344028781.git.jani@nikula.org>\r
+In-Reply-To: <cover.1344028781.git.jani@nikula.org>\r
+References: <cover.1344028781.git.jani@nikula.org>\r
+X-Gm-Message-State:\r
+ ALoCoQnpsbwEb5qc6fRhP7FlJw+AtmBwQntyAVX6bR7wuPg2SUTZtW67yXuM+uKfG2ca4NJ+QJu3\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.13\r
+Precedence: list\r
+List-Id: "Use and development of the notmuch mail system."\r
+       <notmuch.notmuchmail.org>\r
+List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
+List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
+List-Post: <mailto:notmuch@notmuchmail.org>\r
+List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
+List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
+X-List-Received-Date: Fri, 03 Aug 2012 21:52:01 -0000\r
+\r
+-Wswitch-enum is a bit awkward if a switch statement is intended to\r
+handle just some of the named codes of an enumeration especially, and\r
+leave the rest to the default label.\r
+\r
+We already have -Wall, which enables -Wswitch by default, and per GCC\r
+documentation, "The only difference between -Wswitch and this option\r
+[-Wswitch-enum] is that this option gives a warning about an omitted\r
+enumeration code even if there is a default label."\r
+\r
+Drop -Wswitch-enum to not force listing all named codes of\r
+enumerations in switch statements that have a default label.\r
+\r
+---\r
+\r
+This will be useful in the next patch.\r
+---\r
+ configure |    2 +-\r
+ 1 file changed, 1 insertion(+), 1 deletion(-)\r
+\r
+diff --git a/configure b/configure\r
+index dc0dba4..4433f42 100755\r
+--- a/configure\r
++++ b/configure\r
+@@ -528,7 +528,7 @@ fi\r
\r
+ WARN_CXXFLAGS=""\r
+ printf "Checking for available C++ compiler warning flags... "\r
+-for flag in -Wall -Wextra -Wwrite-strings -Wswitch-enum; do\r
++for flag in -Wall -Wextra -Wwrite-strings; do\r
+     if ${CC} $flag -o minimal minimal.c > /dev/null 2>&1\r
+     then\r
+       WARN_CXXFLAGS="${WARN_CXXFLAGS}${WARN_CXXFLAGS:+ }${flag}"\r
+-- \r
+1.7.9.5\r
+\r