[Webkit-unassigned] [Bug 53705] Viewport parsing no longer accepts "1.0; " value as valid.

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Feb 24 09:04:47 PST 2011


https://bugs.webkit.org/show_bug.cgi?id=53705





--- Comment #29 from David Kilzer (ddkilzer) <ddkilzer at webkit.org>  2011-02-24 09:04:47 PST ---
(In reply to comment #24)
> > > > Source/WebCore/dom/ViewportArguments.cpp:365
> > > > +    default:
> > > > +        ASSERT_NOT_REACHED();
> > > > +        return ErrorMessageLevel;
> > > 
> > > If the switch statement has case statements for every ViewportErrorCode enum, then you don't need a "default" case because a missing enum will cause a compiler warning (and thus an error with -Werror set).
> > 
> > Oh, nice. Thanks!
> 
> Hmm, the compiler still yelled at me. So I left it here. I could move it past the switch, which would save us a line of code (no "default:") line.

I would rather see the assert and return statements moved out of the switch statement so that you get a warning (error) if a new enum is added that the switch statement is missing.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list