quiet enum warnings

Andrew Bartlett abartlet at samba.org
Tue Jun 14 05:13:32 MDT 2011

On Tue, 2011-06-14 at 11:23 +0200, Kai Blin wrote:
> On 2011-06-09 19:44, Matthias Dieter Wallnöfer wrote:
> >> metze:
> > Okay, these are different point of views.
> > 
> > Tridge, what do you think?
> I'm not tridge, but I'll toss in my opinion here.
> >> I think we should better fix this by adding the missing enum
> >> values explicit instead of using a default, as that will make sure
> >> we'll get a warning again if someone adds a new value.
> I agree with metze. The "unhandled value in enum" warnings triggered by
> the winbind commands enum make a great todo list when trying to keep s4
> and s3 winbind in sync. If we add a new command, I'd rather get a new
> warning than having to dig through code after a mysterious "not
> supported" error triggered from a default value at some later stage.
> I think that patches to get rid of warnings are worthwhile, but not as a
> purpose to itself. That's what makes these patches hard and a lot of work.

I agree.  For as long as we have multiple implementations like this, we
should track where we are missing an implementation, and this is one way
the compiler can help us. 

Andrew Bartlett

Andrew Bartlett                                http://samba.org/~abartlet/
Authentication Developer, Samba Team           http://samba.org

More information about the samba-technical mailing list