[Spice-devel] [RFCv5 01/47] server/main_channel.c: set NET_TEST_STAGE_INVALID=0 explicitly (TODO - the rest)

Alon Levy alevy at redhat.com
Wed May 11 03:38:04 PDT 2011


On Wed, May 11, 2011 at 11:40:10AM +0200, Christophe Fergeau wrote:
> On Wed, May 11, 2011 at 11:59:08AM +0300, Alon Levy wrote:
> > I just dislike ungrounded enums. My only reason for this is that when debugging,
> > i.e. printing via printf/debugger I'm just using the implicit knowledge that the
> > compiler actually uses 0 as the first value. Why not make it explicit?
> 
> In some specific cases, maybe I'd be like "why does the first value *have*
> to be 0 ?", but that's probably no big deal. For what it's worth, if you
> compiled with -g3 -ggdb, gdb will know about enum symbolic names.
> I don't care whether the = 0 is there or not, but I wanted to ask first for
> the rationale for this :)

ok, I wasn't aware of this, thanks! I don't remember if there was a real reason, I'll
just drop this patch if I can't find one.

> 
> Christophe
> 



> _______________________________________________
> Spice-devel mailing list
> Spice-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/spice-devel



More information about the Spice-devel mailing list