At Thu, 25 Feb 2021 09:49:15 +0530, Dilip Kumar <dilipbal...@gmail.com> wrote 
in 
> On Thu, Feb 25, 2021 at 6:52 AM Kyotaro Horiguchi
> <horikyota....@gmail.com> wrote:
> 
> > Recently we have mildly changed to the direction to utilize the
> > compiler warning about enum coverage in switch struct. (Maybe we need
> > another compiler option that enables that check for switch'es with the
> > default case, though.) In that light, the direction is a switch
> > without the default case then Assert if none of the cases is stepped
> > on. This is what apply_dispatch does. Slightly different version of
> > the same would be the following.  This is more natural than the above.
> >
> >   statestr = NULL;
> >   swtich(state)
> >   {
> >     case RECOVERY_NOT_PAUSED:
> >       statestr = "not paused";
> >       break;
> >     ...
> >   }
> >
> >   Assert (statestr != NULL);
> >   return cstring_to_text(statestr);
> >
> > If the enum had many (more than ten or so?) values and it didn't seem
> > stable I push that a bit strongly but it actually consists of only
> > three values and not likely to get further values.  So I don't insist
> > on the style so strongly here.
> >
> 
> Changed as per the suggestion.

Thanks for your patience and sorry for having annoyed you.

The latest version applies (almost) cleanly to the current master and
works fine.
I don't have further comment on this.

I'll wait for a day before marking this RfC in case anyone have
further comments.

regards.

-- 
Kyotaro Horiguchi
NTT Open Source Software Center


Reply via email to