From d9c4462778a3d97b38e267dcdf68dfe22210ed8c Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Mon, 7 Nov 2011 20:09:10 -0500 Subject: [PATCH] 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 --- src/fcname.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) 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; }