unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
From: Jani Nikula <jani@nikula.org>
To: notmuch@notmuchmail.org
Subject: [PATCH v6 1/9] build: drop the -Wswitch-enum warning
Date: Tue, 30 Oct 2012 22:32:32 +0200	[thread overview]
Message-ID: <08cca3efe21ddf653996ff3d7a83fed0ca408f5d.1351626272.git.jani@nikula.org> (raw)
In-Reply-To: <cover.1351626272.git.jani@nikula.org>
In-Reply-To: <cover.1351626272.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 232d847..ea8a1ad 100755
--- a/configure
+++ b/configure
@@ -536,7 +536,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

  reply	other threads:[~2012-10-30 20:32 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-30 20:32 [PATCH v6 0/9] notmuch search date:since..until query support Jani Nikula
2012-10-30 20:32 ` Jani Nikula [this message]
2012-10-30 20:32 ` [PATCH v6 2/9] parse-time-string: add a date/time parser to notmuch Jani Nikula
2012-10-30 20:32 ` [PATCH v6 3/9] test: add new test tool parse-time for date/time parser Jani Nikula
2012-10-30 20:32 ` [PATCH v6 4/9] test: add smoke tests for the date/time parser module Jani Nikula
2012-10-30 20:32 ` [PATCH v6 5/9] build: build parse-time-string as part of the notmuch lib and static cli Jani Nikula
2012-10-30 20:32 ` [PATCH v6 6/9] lib: add date range query support Jani Nikula
2012-10-30 20:32 ` [PATCH v6 7/9] test: add tests for date:since..until range queries Jani Nikula
2012-10-30 20:32 ` [PATCH v6 8/9] man: document the " Jani Nikula
2012-10-30 20:32 ` [PATCH v6 9/9] NEWS: date range search support Jani Nikula
2012-10-31  3:17 ` [PATCH v6 0/9] notmuch search date:since..until query support Austin Clements
2012-10-31 11:35 ` Tomi Ollila
2012-10-31 20:21 ` David Bremner
2012-11-02 17:40   ` Michal Sojka
2012-11-02 18:53     ` 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=08cca3efe21ddf653996ff3d7a83fed0ca408f5d.1351626272.git.jani@nikula.org \
    --to=jani@nikula.org \
    --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).