From: Mike Frysinger Date: Tue, 8 Nov 2011 01:09:10 +0000 (-0500) Subject: FcObjectValidType: tweak -1 checking X-Git-Tag: root-2~3 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=789702de6d5c0c766b08075d41c1ed5d9900b9e7;p=fontconfig.git FcObjectValidType: tweak -1 checking Newer gcc doesn't like when you switch on an enum and use a value that isn't declared: fcname.c: In function 'FcObjectValidType': fcname.c:299:2: warning: case value '4294967295' not in enumerated type 'FcType' [-Wswitch] So tweak the logic to avoid this warning. Signed-off-by: Mike Frysinger --- diff --git a/src/fcname.c b/src/fcname.c index 864ad40..1b32b0f 100644 --- a/src/fcname.c +++ b/src/fcname.c @@ -296,8 +296,6 @@ FcObjectValidType (FcObject object, FcType type) if (t) { switch (t->type) { - case -1: - return FcTrue; case FcTypeDouble: case FcTypeInteger: if (type == FcTypeDouble || type == FcTypeInteger) @@ -308,7 +306,7 @@ FcObjectValidType (FcObject object, FcType type) return FcTrue; break; default: - if (type == t->type) + if (t->type == -1 || type == t->type) return FcTrue; break; }