Re: [PATCH v4 3/3] ident.c: cleanup wrt ident's source

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Feb 04, 2016 at 02:42:55PM -0800, Junio C Hamano wrote:
> Dan Aloni <alonid@xxxxxxxxx> 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
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]