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:
parent
97c9506e4d
commit
d9c4462778
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue