unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
From: Jani Nikula <jani@nikula.org>
To: notmuch@notmuchmail.org, David Bremner <david@tethera.net>
Subject: [PATCH v3 1/9] build: drop the -Wswitch-enum warning
Date: Thu, 13 Sep 2012 00:27:18 +0300	[thread overview]
Message-ID: <2990ebb63b865839c8d405163693482eb31b992f.1347484177.git.jani@nikula.org> (raw)
In-Reply-To: <cover.1347484177.git.jani@nikula.org>
In-Reply-To: <cover.1347484177.git.jani@nikula.org>

-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.9.5

  reply	other threads:[~2012-09-12 21:27 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-12 21:27 [PATCH v3 0/9] notmuch search date:since..until query support Jani Nikula
2012-09-12 21:27 ` Jani Nikula [this message]
2012-09-12 21:27 ` [PATCH v3 2/9] parse-time-string: add a date/time parser to notmuch Jani Nikula
2012-09-13 11:10   ` Michal Nazarewicz
2012-09-13 12:07     ` Jani Nikula
2012-09-17 14:13       ` Michal Nazarewicz
2012-09-17 15:54         ` Jani Nikula
2012-09-13 12:48     ` Tomi Ollila
2012-09-25 11:56   ` Michal Sojka
2012-10-03 18:49     ` Jani Nikula
2012-10-03 19:02       ` Michal Sojka
2012-09-12 21:27 ` [PATCH v3 3/9] test: add new test tool parse-time for date/time parser Jani Nikula
2012-09-12 21:27 ` [PATCH v3 4/9] test: add smoke tests for the date/time parser module Jani Nikula
2012-09-25 12:05   ` [PATCH] test: Improve " Michal Sojka
2012-10-03 20:32     ` Jani Nikula
2012-10-04 11:02       ` Michal Sojka
2012-09-12 21:27 ` [PATCH v3 5/9] build: build parse-time-string as part of the notmuch lib and static cli Jani Nikula
2012-09-12 21:27 ` [PATCH v3 6/9] lib: add date range query support Jani Nikula
2012-09-13 11:14   ` Michal Nazarewicz
2012-09-13 11:32     ` Tomi Ollila
2012-09-13 13:33       ` Jani Nikula
2012-09-17 15:11         ` Michal Nazarewicz
2012-09-13 12:32     ` David Bremner
2012-09-17 15:03       ` Michal Nazarewicz
2012-09-17 15:35         ` Tomi Ollila
2012-09-17 16:10         ` David Bremner
2012-09-25 12:15     ` Michal Sojka
2012-09-12 21:27 ` [PATCH v3 7/9] test: add tests for date:since..until range queries Jani Nikula
2012-09-12 21:27 ` [PATCH v3 8/9] man: document the " Jani Nikula
2012-09-12 21:27 ` [PATCH v3 9/9] NEWS: date range search support Jani Nikula

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://notmuchmail.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2990ebb63b865839c8d405163693482eb31b992f.1347484177.git.jani@nikula.org \
    --to=jani@nikula.org \
    --cc=david@tethera.net \
    --cc=notmuch@notmuchmail.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://yhetil.org/notmuch.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).