From 766bed901f7f4c648387fb403ef6e253be1c45e9 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Wed, 2 Jan 2013 02:19:04 -0600 Subject: [PATCH] Fix compiler warnings --- src/fcobjs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/fcobjs.c b/src/fcobjs.c index 4a1b0a8..b3bb200 100644 --- a/src/fcobjs.c +++ b/src/fcobjs.c @@ -53,7 +53,7 @@ retry: if (!ot) return NULL; - ot->object.object = FcStrdup (str); + ot->object.object = (const char *) FcStrdup (str); ot->object.type = -1; ot->id = fc_atomic_int_add (next_id, +1); ot->next = ots; @@ -74,7 +74,7 @@ FcObject FcObjectLookupBuiltinIdByName (const char *str) { const struct FcObjectTypeInfo *o = FcObjectTypeLookup (str, strlen (str)); - FcObject id; + if (o) return o->id;