Re: [PATCH 5/6] cairo-script: Error if asked to decompress with missing compression lib
Chris Wilson <[email protected]>
| Newsgroups | gmane.comp.lib.cairo |
|---|---|
| Message-ID | <[email protected]> |
On Fri, Jan 31, 2014 at 07:34:23AM +0000, Bryce W. Harrington wrote: > On Thu, Jan 30, 2014 at 10:32:39AM +0000, Chris Wilson wrote: > > On Thu, Jan 30, 2014 at 02:14:14AM +0000, Bryce W. Harrington wrote: > > > This quells the following warning: > > > > > > warning: enumeration value ‘LZO’ not handled in switch [-Wswitch-enum] > > > > > > The LZO enum value is defined and used elsewhere, even if lzo support > > > isn't available. > > > > > > This situation might arise if cairo scripts were generated on one system > > > with lzo, and then replayed on a system without it. For now simply > > > error out if this occurs. > > > > Right, I thought these currently fell into the default: case? > > -Chris > > It does; it looks like this is -Wswitch-enum being pedantic. The > warning is worthwhile to leave on, as it should help us catch cases > where someone adds a new enum definition but omits handling it in > appropriate switch statements. > > For this particular patch, in one of the defaults the action is to send > an "Out of Memory" error, which isn't quite accurate anyway. So I think > this patch does improve things, even if it's only a theoretical problem. Ok. Reviewed-by: Chris Wilson <[email protected]> -Chris -- Chris Wilson, Intel Open Source Technology Centre -- cairo mailing list [email protected] http://lists.cairographics.org/mailman/listinfo/cairo