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 <vapier@gentoo.org>
This commit is contained in:
Mike Frysinger 2011-11-07 20:09:10 -05:00
parent 97c9506e4d
commit d9c4462778
1 changed files with 1 additions and 3 deletions

View File

@ -296,8 +296,6 @@ FcObjectValidType (FcObject object, FcType type)
if (t) { if (t) {
switch (t->type) { switch (t->type) {
case -1:
return FcTrue;
case FcTypeDouble: case FcTypeDouble:
case FcTypeInteger: case FcTypeInteger:
if (type == FcTypeDouble || type == FcTypeInteger) if (type == FcTypeDouble || type == FcTypeInteger)
@ -308,7 +306,7 @@ FcObjectValidType (FcObject object, FcType type)
return FcTrue; return FcTrue;
break; break;
default: default:
if (type == t->type) if (t->type == -1 || type == t->type)
return FcTrue; return FcTrue;
break; break;
} }