From: Dan Aloni <alonid@gmail.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: git@vger.kernel.org, Jeff King <peff@peff.net>
Subject: Re: [PATCH v4 3/3] ident.c: cleanup wrt ident's source
Date: Fri, 5 Feb 2016 08:40:55 +0200 [thread overview]
Message-ID: <20160205064055.GA15392@gmail.com> (raw)
In-Reply-To: <xmqqvb64f66o.fsf@gitster.mtv.corp.google.com>
On Thu, Feb 04, 2016 at 02:42:55PM -0800, Junio C Hamano wrote:
> Dan Aloni <alonid@gmail.com> writes:
>
> > +static int ident_source_is_sufficient(enum ident_source source)
> > +{
> > + switch (source) {
> > + case IDENT_SOURCE_CONFIG:
> > + case IDENT_SOURCE_ENVIRONMENT:
> > + return 1;
>
> Without adding these two lines here:
>
> default:
> break;
>
> I get this build failure:
>
> ident.c: In function 'ident_source_is_sufficient':
> ident.c:444:2: error: enumeration value 'IDENT_SOURCE_UNKNOWN' not handled in switch [-Werror=switch]
> switch (source) {
> ^
> ident.c:444:2: error: enumeration value 'IDENT_SOURCE_GUESSED' not handled in switch [-Werror=switch]
> ident.c:444:2: error: enumeration value 'IDENT_SOURCE_GUESSED_BOGUS' not handled in switch [-Werror=switch]
My fault - must have left over CFLAGS="-O0 -g" while debugging, so it
got missed. Will fix.
>[..]
> ident.c: In function 'ident_is_sufficient':
> ident.c:456:6: error: variable 'name' set but not used [-Werror=unused-but-set-variable]
> int name, email;
> ^
> cc1: all warnings being treated as errors
> make: *** [ident.o] Error 1
Ditto.
--
Dan Aloni
prev parent reply other threads:[~2016-02-05 6:41 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-04 9:12 [PATCH v4] Add user.useConfigOnly boolean for when ident shouldn't be guessed Dan Aloni
2016-02-04 9:12 ` [PATCH v4 1/3] fmt_ident: refactor strictness checks Dan Aloni
2016-02-04 9:12 ` [PATCH v4 2/3] Add user.useConfigOnly boolean for when ident shouldn't be guessed Dan Aloni
2016-02-04 21:53 ` Junio C Hamano
2016-02-05 6:47 ` Dan Aloni
2016-02-04 9:12 ` [PATCH v4 3/3] ident.c: cleanup wrt ident's source Dan Aloni
2016-02-04 21:33 ` Junio C Hamano
2016-02-04 22:42 ` Junio C Hamano
2016-02-05 6:40 ` Dan Aloni [this message]
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20160205064055.GA15392@gmail.com \
--to=alonid@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=peff@peff.net \
/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.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.