svn commit: samba r10184 - in branches/SAMBA_4_0/source/librpc/rpc: .

Tim Potter tpot at samba.org
Mon Sep 12 22:56:41 GMT 2005


On Mon, 2005-09-12 at 18:08 -0400, derrell at samba.org wrote:

> > Log:
> > Fix a stack of unhandled enumeration warnings.
> 
> > +		break;
> > +
> > +		/* Fall through to next switch statement */
> > +
> > +	default:
> > +		break;
> >  	}
> 
> 
> One of the really nice features of using enums is that the compiler can help
> the developer find missing code.  When cases aren't handled in a switch
> statement, you get this warning.  That luxury is lost if you add a "default:"
> label to the switch.

Sure - I agree in the case where the programmer has not implemented that
arm of the switch statement yet.  It seems a bit pointless listing all
the unused enumeration values though - what if there are 100 of them?  I
don't think it adds to the readability of the code.


Tim.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://lists.samba.org/archive/samba-technical/attachments/20050913/6eda6441/attachment.bin


More information about the samba-technical mailing list