Fix compiler warnings
This commit is contained in:
parent
4f6767470f
commit
24cdcf52ab
44
src/fccfg.c
44
src/fccfg.c
|
@ -708,7 +708,7 @@ FcConfigCompareValue (const FcValue *left_o,
|
||||||
case FcTypeInteger:
|
case FcTypeInteger:
|
||||||
break; /* FcConfigPromote prevents this from happening */
|
break; /* FcConfigPromote prevents this from happening */
|
||||||
case FcTypeDouble:
|
case FcTypeDouble:
|
||||||
switch (op) {
|
switch ((int) op) {
|
||||||
case FcOpEqual:
|
case FcOpEqual:
|
||||||
case FcOpContains:
|
case FcOpContains:
|
||||||
case FcOpListing:
|
case FcOpListing:
|
||||||
|
@ -735,7 +735,7 @@ FcConfigCompareValue (const FcValue *left_o,
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case FcTypeBool:
|
case FcTypeBool:
|
||||||
switch (op) {
|
switch ((int) op) {
|
||||||
case FcOpEqual:
|
case FcOpEqual:
|
||||||
case FcOpContains:
|
case FcOpContains:
|
||||||
case FcOpListing:
|
case FcOpListing:
|
||||||
|
@ -750,7 +750,7 @@ FcConfigCompareValue (const FcValue *left_o,
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case FcTypeString:
|
case FcTypeString:
|
||||||
switch (op) {
|
switch ((int) op) {
|
||||||
case FcOpEqual:
|
case FcOpEqual:
|
||||||
case FcOpListing:
|
case FcOpListing:
|
||||||
if (flags & FcOpFlagIgnoreBlanks)
|
if (flags & FcOpFlagIgnoreBlanks)
|
||||||
|
@ -775,7 +775,7 @@ FcConfigCompareValue (const FcValue *left_o,
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case FcTypeMatrix:
|
case FcTypeMatrix:
|
||||||
switch (op) {
|
switch ((int) op) {
|
||||||
case FcOpEqual:
|
case FcOpEqual:
|
||||||
case FcOpContains:
|
case FcOpContains:
|
||||||
case FcOpListing:
|
case FcOpListing:
|
||||||
|
@ -790,7 +790,7 @@ FcConfigCompareValue (const FcValue *left_o,
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case FcTypeCharSet:
|
case FcTypeCharSet:
|
||||||
switch (op) {
|
switch ((int) op) {
|
||||||
case FcOpContains:
|
case FcOpContains:
|
||||||
case FcOpListing:
|
case FcOpListing:
|
||||||
/* left contains right if right is a subset of left */
|
/* left contains right if right is a subset of left */
|
||||||
|
@ -811,7 +811,7 @@ FcConfigCompareValue (const FcValue *left_o,
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case FcTypeLangSet:
|
case FcTypeLangSet:
|
||||||
switch (op) {
|
switch ((int) op) {
|
||||||
case FcOpContains:
|
case FcOpContains:
|
||||||
case FcOpListing:
|
case FcOpListing:
|
||||||
ret = FcLangSetContains (left.u.l, right.u.l);
|
ret = FcLangSetContains (left.u.l, right.u.l);
|
||||||
|
@ -830,7 +830,7 @@ FcConfigCompareValue (const FcValue *left_o,
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case FcTypeVoid:
|
case FcTypeVoid:
|
||||||
switch (op) {
|
switch ((int) op) {
|
||||||
case FcOpEqual:
|
case FcOpEqual:
|
||||||
case FcOpContains:
|
case FcOpContains:
|
||||||
case FcOpListing:
|
case FcOpListing:
|
||||||
|
@ -841,7 +841,7 @@ FcConfigCompareValue (const FcValue *left_o,
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case FcTypeFTFace:
|
case FcTypeFTFace:
|
||||||
switch (op) {
|
switch ((int) op) {
|
||||||
case FcOpEqual:
|
case FcOpEqual:
|
||||||
case FcOpContains:
|
case FcOpContains:
|
||||||
case FcOpListing:
|
case FcOpListing:
|
||||||
|
@ -882,7 +882,7 @@ FcConfigEvaluate (FcPattern *p, FcExpr *e)
|
||||||
FcChar8 *str;
|
FcChar8 *str;
|
||||||
FcOp op = FC_OP_GET_OP (e->op);
|
FcOp op = FC_OP_GET_OP (e->op);
|
||||||
|
|
||||||
switch (op) {
|
switch ((int) op) {
|
||||||
case FcOpInteger:
|
case FcOpInteger:
|
||||||
v.type = FcTypeInteger;
|
v.type = FcTypeInteger;
|
||||||
v.u.i = e->u.ival;
|
v.u.i = e->u.ival;
|
||||||
|
@ -899,8 +899,8 @@ FcConfigEvaluate (FcPattern *p, FcExpr *e)
|
||||||
case FcOpMatrix:
|
case FcOpMatrix:
|
||||||
{
|
{
|
||||||
FcMatrix m;
|
FcMatrix m;
|
||||||
v.type = FcTypeMatrix;
|
|
||||||
FcValue xx, xy, yx, yy;
|
FcValue xx, xy, yx, yy;
|
||||||
|
v.type = FcTypeMatrix;
|
||||||
xx = FcConfigPromote (FcConfigEvaluate (p, e->u.mexpr->xx), v);
|
xx = FcConfigPromote (FcConfigEvaluate (p, e->u.mexpr->xx), v);
|
||||||
xy = FcConfigPromote (FcConfigEvaluate (p, e->u.mexpr->xy), v);
|
xy = FcConfigPromote (FcConfigEvaluate (p, e->u.mexpr->xy), v);
|
||||||
yx = FcConfigPromote (FcConfigEvaluate (p, e->u.mexpr->yx), v);
|
yx = FcConfigPromote (FcConfigEvaluate (p, e->u.mexpr->yx), v);
|
||||||
|
@ -986,9 +986,9 @@ FcConfigEvaluate (FcPattern *p, FcExpr *e)
|
||||||
vr = FcConfigPromote (vr, vl);
|
vr = FcConfigPromote (vr, vl);
|
||||||
if (vl.type == vr.type)
|
if (vl.type == vr.type)
|
||||||
{
|
{
|
||||||
switch (vl.type) {
|
switch ((int) vl.type) {
|
||||||
case FcTypeDouble:
|
case FcTypeDouble:
|
||||||
switch (op) {
|
switch ((int) op) {
|
||||||
case FcOpPlus:
|
case FcOpPlus:
|
||||||
v.type = FcTypeDouble;
|
v.type = FcTypeDouble;
|
||||||
v.u.d = vl.u.d + vr.u.d;
|
v.u.d = vl.u.d + vr.u.d;
|
||||||
|
@ -1017,7 +1017,7 @@ FcConfigEvaluate (FcPattern *p, FcExpr *e)
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case FcTypeBool:
|
case FcTypeBool:
|
||||||
switch (op) {
|
switch ((int) op) {
|
||||||
case FcOpOr:
|
case FcOpOr:
|
||||||
v.type = FcTypeBool;
|
v.type = FcTypeBool;
|
||||||
v.u.b = vl.u.b || vr.u.b;
|
v.u.b = vl.u.b || vr.u.b;
|
||||||
|
@ -1032,7 +1032,7 @@ FcConfigEvaluate (FcPattern *p, FcExpr *e)
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case FcTypeString:
|
case FcTypeString:
|
||||||
switch (op) {
|
switch ((int) op) {
|
||||||
case FcOpPlus:
|
case FcOpPlus:
|
||||||
v.type = FcTypeString;
|
v.type = FcTypeString;
|
||||||
str = FcStrPlus (vl.u.s, vr.u.s);
|
str = FcStrPlus (vl.u.s, vr.u.s);
|
||||||
|
@ -1048,7 +1048,7 @@ FcConfigEvaluate (FcPattern *p, FcExpr *e)
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case FcTypeMatrix:
|
case FcTypeMatrix:
|
||||||
switch (op) {
|
switch ((int) op) {
|
||||||
case FcOpTimes:
|
case FcOpTimes:
|
||||||
v.type = FcTypeMatrix;
|
v.type = FcTypeMatrix;
|
||||||
m = malloc (sizeof (FcMatrix));
|
m = malloc (sizeof (FcMatrix));
|
||||||
|
@ -1069,7 +1069,7 @@ FcConfigEvaluate (FcPattern *p, FcExpr *e)
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case FcTypeCharSet:
|
case FcTypeCharSet:
|
||||||
switch (op) {
|
switch ((int) op) {
|
||||||
case FcOpPlus:
|
case FcOpPlus:
|
||||||
v.type = FcTypeCharSet;
|
v.type = FcTypeCharSet;
|
||||||
v.u.c = FcCharSetUnion (vl.u.c, vr.u.c);
|
v.u.c = FcCharSetUnion (vl.u.c, vr.u.c);
|
||||||
|
@ -1088,7 +1088,7 @@ FcConfigEvaluate (FcPattern *p, FcExpr *e)
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case FcTypeLangSet:
|
case FcTypeLangSet:
|
||||||
switch (op) {
|
switch ((int) op) {
|
||||||
case FcOpPlus:
|
case FcOpPlus:
|
||||||
v.type = FcTypeLangSet;
|
v.type = FcTypeLangSet;
|
||||||
v.u.l = FcLangSetUnion (vl.u.l, vr.u.l);
|
v.u.l = FcLangSetUnion (vl.u.l, vr.u.l);
|
||||||
|
@ -1118,7 +1118,7 @@ FcConfigEvaluate (FcPattern *p, FcExpr *e)
|
||||||
break;
|
break;
|
||||||
case FcOpNot:
|
case FcOpNot:
|
||||||
vl = FcConfigEvaluate (p, e->u.tree.left);
|
vl = FcConfigEvaluate (p, e->u.tree.left);
|
||||||
switch (vl.type) {
|
switch ((int) vl.type) {
|
||||||
case FcTypeBool:
|
case FcTypeBool:
|
||||||
v.type = FcTypeBool;
|
v.type = FcTypeBool;
|
||||||
v.u.b = !vl.u.b;
|
v.u.b = !vl.u.b;
|
||||||
|
@ -1131,7 +1131,7 @@ FcConfigEvaluate (FcPattern *p, FcExpr *e)
|
||||||
break;
|
break;
|
||||||
case FcOpFloor:
|
case FcOpFloor:
|
||||||
vl = FcConfigEvaluate (p, e->u.tree.left);
|
vl = FcConfigEvaluate (p, e->u.tree.left);
|
||||||
switch (vl.type) {
|
switch ((int) vl.type) {
|
||||||
case FcTypeInteger:
|
case FcTypeInteger:
|
||||||
v = vl;
|
v = vl;
|
||||||
break;
|
break;
|
||||||
|
@ -1147,7 +1147,7 @@ FcConfigEvaluate (FcPattern *p, FcExpr *e)
|
||||||
break;
|
break;
|
||||||
case FcOpCeil:
|
case FcOpCeil:
|
||||||
vl = FcConfigEvaluate (p, e->u.tree.left);
|
vl = FcConfigEvaluate (p, e->u.tree.left);
|
||||||
switch (vl.type) {
|
switch ((int) vl.type) {
|
||||||
case FcTypeInteger:
|
case FcTypeInteger:
|
||||||
v = vl;
|
v = vl;
|
||||||
break;
|
break;
|
||||||
|
@ -1163,7 +1163,7 @@ FcConfigEvaluate (FcPattern *p, FcExpr *e)
|
||||||
break;
|
break;
|
||||||
case FcOpRound:
|
case FcOpRound:
|
||||||
vl = FcConfigEvaluate (p, e->u.tree.left);
|
vl = FcConfigEvaluate (p, e->u.tree.left);
|
||||||
switch (vl.type) {
|
switch ((int) vl.type) {
|
||||||
case FcTypeInteger:
|
case FcTypeInteger:
|
||||||
v = vl;
|
v = vl;
|
||||||
break;
|
break;
|
||||||
|
@ -1179,7 +1179,7 @@ FcConfigEvaluate (FcPattern *p, FcExpr *e)
|
||||||
break;
|
break;
|
||||||
case FcOpTrunc:
|
case FcOpTrunc:
|
||||||
vl = FcConfigEvaluate (p, e->u.tree.left);
|
vl = FcConfigEvaluate (p, e->u.tree.left);
|
||||||
switch (vl.type) {
|
switch ((int) vl.type) {
|
||||||
case FcTypeInteger:
|
case FcTypeInteger:
|
||||||
v = vl;
|
v = vl;
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -358,7 +358,7 @@ skip_percent (FcFormatContext *c)
|
||||||
|
|
||||||
/* skip an optional width specifier */
|
/* skip an optional width specifier */
|
||||||
if (strtol ((const char *) c->format, (char **) &c->format, 10))
|
if (strtol ((const char *) c->format, (char **) &c->format, 10))
|
||||||
/* don't care */;
|
{/* don't care */}
|
||||||
|
|
||||||
if (!expect_char (c, '{'))
|
if (!expect_char (c, '{'))
|
||||||
return FcFalse;
|
return FcFalse;
|
||||||
|
|
|
@ -1005,7 +1005,6 @@ static const FcStringConst slantConsts[] = {
|
||||||
|
|
||||||
#define NUM_SLANT_CONSTS (int) (sizeof (slantConsts) / sizeof (slantConsts[0]))
|
#define NUM_SLANT_CONSTS (int) (sizeof (slantConsts) / sizeof (slantConsts[0]))
|
||||||
|
|
||||||
#define FcIsSlant(s) FcStringIsConst(s,slantConsts,NUM_SLANT_CONSTS)
|
|
||||||
#define FcContainsSlant(s) FcStringContainsConst (s,slantConsts,NUM_SLANT_CONSTS)
|
#define FcContainsSlant(s) FcStringContainsConst (s,slantConsts,NUM_SLANT_CONSTS)
|
||||||
|
|
||||||
static const FcStringConst decorativeConsts[] = {
|
static const FcStringConst decorativeConsts[] = {
|
||||||
|
@ -1019,7 +1018,6 @@ static const FcStringConst decorativeConsts[] = {
|
||||||
|
|
||||||
#define NUM_DECORATIVE_CONSTS (int) (sizeof (decorativeConsts) / sizeof (decorativeConsts[0]))
|
#define NUM_DECORATIVE_CONSTS (int) (sizeof (decorativeConsts) / sizeof (decorativeConsts[0]))
|
||||||
|
|
||||||
#define FcIsDecorative(s) FcStringIsConst(s,decorativeConsts,NUM_DECORATIVE_CONSTS)
|
|
||||||
#define FcContainsDecorative(s) FcStringContainsConst (s,decorativeConsts,NUM_DECORATIVE_CONSTS)
|
#define FcContainsDecorative(s) FcStringContainsConst (s,decorativeConsts,NUM_DECORATIVE_CONSTS)
|
||||||
|
|
||||||
static double
|
static double
|
||||||
|
@ -2262,7 +2260,7 @@ FcFreeTypeCheckGlyph (FT_Face face, FcChar32 ucs4,
|
||||||
|
|
||||||
*advance = slot->metrics.horiAdvance;
|
*advance = slot->metrics.horiAdvance;
|
||||||
|
|
||||||
switch (slot->format) {
|
switch ((int) slot->format) {
|
||||||
case ft_glyph_format_bitmap:
|
case ft_glyph_format_bitmap:
|
||||||
/*
|
/*
|
||||||
* Bitmaps are assumed to be reasonable; if
|
* Bitmaps are assumed to be reasonable; if
|
||||||
|
@ -2598,7 +2596,7 @@ addtag(FcChar8 *complex_, FT_ULong tag)
|
||||||
|
|
||||||
if (*complex_ != '\0')
|
if (*complex_ != '\0')
|
||||||
strcat ((char *) complex_, " ");
|
strcat ((char *) complex_, " ");
|
||||||
strcat ((char *) complex_, "otlayout:");
|
strcat ((char *) complex_, OTLAYOUT_HEAD);
|
||||||
strcat ((char *) complex_, (char *) tagstring);
|
strcat ((char *) complex_, (char *) tagstring);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -33,7 +33,7 @@ FcCompareNumber (FcValue *value1, FcValue *value2)
|
||||||
{
|
{
|
||||||
double v1, v2, v;
|
double v1, v2, v;
|
||||||
|
|
||||||
switch (value1->type) {
|
switch ((int) value1->type) {
|
||||||
case FcTypeInteger:
|
case FcTypeInteger:
|
||||||
v1 = (double) value1->u.i;
|
v1 = (double) value1->u.i;
|
||||||
break;
|
break;
|
||||||
|
@ -43,7 +43,7 @@ FcCompareNumber (FcValue *value1, FcValue *value2)
|
||||||
default:
|
default:
|
||||||
return -1.0;
|
return -1.0;
|
||||||
}
|
}
|
||||||
switch (value2->type) {
|
switch ((int) value2->type) {
|
||||||
case FcTypeInteger:
|
case FcTypeInteger:
|
||||||
v2 = (double) value2->u.i;
|
v2 = (double) value2->u.i;
|
||||||
break;
|
break;
|
||||||
|
@ -86,9 +86,9 @@ FcCompareLang (FcValue *v1, FcValue *v2)
|
||||||
FcLangResult result;
|
FcLangResult result;
|
||||||
FcValue value1 = FcValueCanonicalize(v1), value2 = FcValueCanonicalize(v2);
|
FcValue value1 = FcValueCanonicalize(v1), value2 = FcValueCanonicalize(v2);
|
||||||
|
|
||||||
switch (value1.type) {
|
switch ((int) value1.type) {
|
||||||
case FcTypeLangSet:
|
case FcTypeLangSet:
|
||||||
switch (value2.type) {
|
switch ((int) value2.type) {
|
||||||
case FcTypeLangSet:
|
case FcTypeLangSet:
|
||||||
result = FcLangSetCompare (value1.u.l, value2.u.l);
|
result = FcLangSetCompare (value1.u.l, value2.u.l);
|
||||||
break;
|
break;
|
||||||
|
@ -101,7 +101,7 @@ FcCompareLang (FcValue *v1, FcValue *v2)
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case FcTypeString:
|
case FcTypeString:
|
||||||
switch (value2.type) {
|
switch ((int) value2.type) {
|
||||||
case FcTypeLangSet:
|
case FcTypeLangSet:
|
||||||
result = FcLangSetHasLang (value2.u.l, value1.u.s);
|
result = FcLangSetHasLang (value2.u.l, value1.u.s);
|
||||||
break;
|
break;
|
||||||
|
@ -146,7 +146,7 @@ FcCompareSize (FcValue *value1, FcValue *value2)
|
||||||
{
|
{
|
||||||
double v1, v2, v;
|
double v1, v2, v;
|
||||||
|
|
||||||
switch (value1->type) {
|
switch ((int) value1->type) {
|
||||||
case FcTypeInteger:
|
case FcTypeInteger:
|
||||||
v1 = value1->u.i;
|
v1 = value1->u.i;
|
||||||
break;
|
break;
|
||||||
|
@ -156,7 +156,7 @@ FcCompareSize (FcValue *value1, FcValue *value2)
|
||||||
default:
|
default:
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
switch (value2->type) {
|
switch ((int) value2->type) {
|
||||||
case FcTypeInteger:
|
case FcTypeInteger:
|
||||||
v2 = value2->u.i;
|
v2 = value2->u.i;
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -296,7 +296,7 @@ FcObjectValidType (FcObject object, FcType type)
|
||||||
FcObjectType *t = FcObjectFindById (object);
|
FcObjectType *t = FcObjectFindById (object);
|
||||||
|
|
||||||
if (t) {
|
if (t) {
|
||||||
switch (t->type) {
|
switch ((int) t->type) {
|
||||||
case FcTypeDouble:
|
case FcTypeDouble:
|
||||||
case FcTypeInteger:
|
case FcTypeInteger:
|
||||||
if (type == FcTypeDouble || type == FcTypeInteger)
|
if (type == FcTypeDouble || type == FcTypeInteger)
|
||||||
|
@ -579,7 +579,7 @@ FcNameConvert (FcType type, FcChar8 *string)
|
||||||
FcMatrix m;
|
FcMatrix m;
|
||||||
|
|
||||||
v.type = type;
|
v.type = type;
|
||||||
switch (v.type) {
|
switch ((int) v.type) {
|
||||||
case FcTypeInteger:
|
case FcTypeInteger:
|
||||||
if (!FcNameConstant (string, &v.u.i))
|
if (!FcNameConstant (string, &v.u.i))
|
||||||
v.u.i = atoi ((char *) string);
|
v.u.i = atoi ((char *) string);
|
||||||
|
@ -717,7 +717,7 @@ FcNameParse (const FcChar8 *name)
|
||||||
if ((c = FcNameGetConstant (save)))
|
if ((c = FcNameGetConstant (save)))
|
||||||
{
|
{
|
||||||
t = FcNameGetObjectType ((char *) c->object);
|
t = FcNameGetObjectType ((char *) c->object);
|
||||||
switch (t->type) {
|
switch ((int) t->type) {
|
||||||
case FcTypeInteger:
|
case FcTypeInteger:
|
||||||
case FcTypeDouble:
|
case FcTypeDouble:
|
||||||
if (!FcPatternAddInteger (pat, c->object, c->value))
|
if (!FcPatternAddInteger (pat, c->object, c->value))
|
||||||
|
|
16
src/fcpat.c
16
src/fcpat.c
|
@ -45,7 +45,7 @@ FcPatternCreate (void)
|
||||||
void
|
void
|
||||||
FcValueDestroy (FcValue v)
|
FcValueDestroy (FcValue v)
|
||||||
{
|
{
|
||||||
switch (v.type) {
|
switch ((int) v.type) {
|
||||||
case FcTypeString:
|
case FcTypeString:
|
||||||
if (!FcSharedStrFree (v.u.s))
|
if (!FcSharedStrFree (v.u.s))
|
||||||
FcStrFree ((FcChar8 *) v.u.s);
|
FcStrFree ((FcChar8 *) v.u.s);
|
||||||
|
@ -69,7 +69,7 @@ FcValueCanonicalize (const FcValue *v)
|
||||||
{
|
{
|
||||||
FcValue new;
|
FcValue new;
|
||||||
|
|
||||||
switch (v->type)
|
switch ((int) v->type)
|
||||||
{
|
{
|
||||||
case FcTypeString:
|
case FcTypeString:
|
||||||
new.u.s = FcValueString(v);
|
new.u.s = FcValueString(v);
|
||||||
|
@ -93,7 +93,7 @@ FcValueCanonicalize (const FcValue *v)
|
||||||
FcValue
|
FcValue
|
||||||
FcValueSave (FcValue v)
|
FcValueSave (FcValue v)
|
||||||
{
|
{
|
||||||
switch (v.type) {
|
switch ((int) v.type) {
|
||||||
case FcTypeString:
|
case FcTypeString:
|
||||||
v.u.s = FcSharedStr (v.u.s);
|
v.u.s = FcSharedStr (v.u.s);
|
||||||
if (!v.u.s)
|
if (!v.u.s)
|
||||||
|
@ -140,7 +140,7 @@ FcValueListDestroy (FcValueListPtr l)
|
||||||
FcValueListPtr next;
|
FcValueListPtr next;
|
||||||
for (; l; l = next)
|
for (; l; l = next)
|
||||||
{
|
{
|
||||||
switch (l->value.type) {
|
switch ((int) l->value.type) {
|
||||||
case FcTypeString:
|
case FcTypeString:
|
||||||
if (!FcSharedStrFree ((FcChar8 *)l->value.u.s))
|
if (!FcSharedStrFree ((FcChar8 *)l->value.u.s))
|
||||||
FcStrFree ((FcChar8 *)l->value.u.s);
|
FcStrFree ((FcChar8 *)l->value.u.s);
|
||||||
|
@ -892,7 +892,7 @@ FcPatternObjectGetInteger (const FcPattern *p, FcObject object, int id, int *i)
|
||||||
r = FcPatternObjectGet (p, object, id, &v);
|
r = FcPatternObjectGet (p, object, id, &v);
|
||||||
if (r != FcResultMatch)
|
if (r != FcResultMatch)
|
||||||
return r;
|
return r;
|
||||||
switch (v.type) {
|
switch ((int) v.type) {
|
||||||
case FcTypeDouble:
|
case FcTypeDouble:
|
||||||
*i = (int) v.u.d;
|
*i = (int) v.u.d;
|
||||||
break;
|
break;
|
||||||
|
@ -921,7 +921,7 @@ FcPatternObjectGetDouble (const FcPattern *p, FcObject object, int id, double *d
|
||||||
r = FcPatternObjectGet (p, object, id, &v);
|
r = FcPatternObjectGet (p, object, id, &v);
|
||||||
if (r != FcResultMatch)
|
if (r != FcResultMatch)
|
||||||
return r;
|
return r;
|
||||||
switch (v.type) {
|
switch ((int) v.type) {
|
||||||
case FcTypeDouble:
|
case FcTypeDouble:
|
||||||
*d = v.u.d;
|
*d = v.u.d;
|
||||||
break;
|
break;
|
||||||
|
@ -1293,7 +1293,7 @@ FcValueListSerializeAlloc (FcSerialize *serialize, const FcValueList *vl)
|
||||||
{
|
{
|
||||||
if (!FcSerializeAlloc (serialize, vl, sizeof (FcValueList)))
|
if (!FcSerializeAlloc (serialize, vl, sizeof (FcValueList)))
|
||||||
return FcFalse;
|
return FcFalse;
|
||||||
switch (vl->value.type) {
|
switch ((int) vl->value.type) {
|
||||||
case FcTypeString:
|
case FcTypeString:
|
||||||
if (!FcStrSerializeAlloc (serialize, vl->value.u.s))
|
if (!FcStrSerializeAlloc (serialize, vl->value.u.s))
|
||||||
return FcFalse;
|
return FcFalse;
|
||||||
|
@ -1339,7 +1339,7 @@ FcValueListSerialize (FcSerialize *serialize, const FcValueList *vl)
|
||||||
|
|
||||||
vl_serialized->next = NULL;
|
vl_serialized->next = NULL;
|
||||||
vl_serialized->value.type = vl->value.type;
|
vl_serialized->value.type = vl->value.type;
|
||||||
switch (vl->value.type) {
|
switch ((int) vl->value.type) {
|
||||||
case FcTypeInteger:
|
case FcTypeInteger:
|
||||||
vl_serialized->value.u.i = vl->value.u.i;
|
vl_serialized->value.u.i = vl->value.u.i;
|
||||||
break;
|
break;
|
||||||
|
|
20
src/fcxml.c
20
src/fcxml.c
|
@ -1175,7 +1175,7 @@ FcParseBlank (FcConfigParse *parse)
|
||||||
if (!parse->config->blanks)
|
if (!parse->config->blanks)
|
||||||
goto bail;
|
goto bail;
|
||||||
}
|
}
|
||||||
switch (v->tag) {
|
switch ((int) v->tag) {
|
||||||
case FcVStackInteger:
|
case FcVStackInteger:
|
||||||
if (!FcBlanksAdd (parse->config->blanks, v->u.integer))
|
if (!FcBlanksAdd (parse->config->blanks, v->u.integer))
|
||||||
goto bail;
|
goto bail;
|
||||||
|
@ -1368,7 +1368,7 @@ FcParseRange (FcConfigParse *parse)
|
||||||
FcConfigMessage (parse, FcSevereError, "too many elements in range");
|
FcConfigMessage (parse, FcSevereError, "too many elements in range");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
switch (vstack->tag) {
|
switch ((int) vstack->tag) {
|
||||||
case FcVStackInteger:
|
case FcVStackInteger:
|
||||||
n = vstack->u.integer;
|
n = vstack->u.integer;
|
||||||
break;
|
break;
|
||||||
|
@ -1435,7 +1435,7 @@ FcParseCharSet (FcConfigParse *parse)
|
||||||
|
|
||||||
while ((vstack = FcVStackPeek (parse)))
|
while ((vstack = FcVStackPeek (parse)))
|
||||||
{
|
{
|
||||||
switch (vstack->tag) {
|
switch ((int) vstack->tag) {
|
||||||
case FcVStackInteger:
|
case FcVStackInteger:
|
||||||
if (!FcCharSetAddChar (charset, vstack->u.integer))
|
if (!FcCharSetAddChar (charset, vstack->u.integer))
|
||||||
{
|
{
|
||||||
|
@ -1479,7 +1479,7 @@ FcParseLangSet (FcConfigParse *parse)
|
||||||
|
|
||||||
while ((vstack = FcVStackPeek (parse)))
|
while ((vstack = FcVStackPeek (parse)))
|
||||||
{
|
{
|
||||||
switch (vstack->tag) {
|
switch ((int) vstack->tag) {
|
||||||
case FcVStackString:
|
case FcVStackString:
|
||||||
if (!FcLangSetAdd (langset, vstack->u.string))
|
if (!FcLangSetAdd (langset, vstack->u.string))
|
||||||
{
|
{
|
||||||
|
@ -1602,7 +1602,7 @@ FcParseAlias (FcConfigParse *parse)
|
||||||
return;
|
return;
|
||||||
while ((vstack = FcVStackPeek (parse)))
|
while ((vstack = FcVStackPeek (parse)))
|
||||||
{
|
{
|
||||||
switch (vstack->tag) {
|
switch ((int) vstack->tag) {
|
||||||
case FcVStackFamily:
|
case FcVStackFamily:
|
||||||
if (family)
|
if (family)
|
||||||
{
|
{
|
||||||
|
@ -1731,7 +1731,7 @@ FcPopExpr (FcConfigParse *parse)
|
||||||
FcExpr *expr = 0;
|
FcExpr *expr = 0;
|
||||||
if (!vstack)
|
if (!vstack)
|
||||||
return 0;
|
return 0;
|
||||||
switch (vstack->tag) {
|
switch ((int) vstack->tag) {
|
||||||
case FcVStackNone:
|
case FcVStackNone:
|
||||||
break;
|
break;
|
||||||
case FcVStackString:
|
case FcVStackString:
|
||||||
|
@ -2349,7 +2349,7 @@ FcParseMatch (FcConfigParse *parse)
|
||||||
}
|
}
|
||||||
while ((vstack = FcVStackPeek (parse)))
|
while ((vstack = FcVStackPeek (parse)))
|
||||||
{
|
{
|
||||||
switch (vstack->tag) {
|
switch ((int) vstack->tag) {
|
||||||
case FcVStackTest:
|
case FcVStackTest:
|
||||||
vstack->u.test->next = test;
|
vstack->u.test->next = test;
|
||||||
test = vstack->u.test;
|
test = vstack->u.test;
|
||||||
|
@ -2383,7 +2383,7 @@ FcParseAcceptRejectFont (FcConfigParse *parse, FcElement element)
|
||||||
|
|
||||||
while ((vstack = FcVStackPeek (parse)))
|
while ((vstack = FcVStackPeek (parse)))
|
||||||
{
|
{
|
||||||
switch (vstack->tag) {
|
switch ((int) vstack->tag) {
|
||||||
case FcVStackGlob:
|
case FcVStackGlob:
|
||||||
if (!FcConfigGlobAdd (parse->config,
|
if (!FcConfigGlobAdd (parse->config,
|
||||||
vstack->u.string,
|
vstack->u.string,
|
||||||
|
@ -2422,7 +2422,7 @@ FcPopValue (FcConfigParse *parse)
|
||||||
if (!vstack)
|
if (!vstack)
|
||||||
return value;
|
return value;
|
||||||
|
|
||||||
switch (vstack->tag) {
|
switch ((int) vstack->tag) {
|
||||||
case FcVStackString:
|
case FcVStackString:
|
||||||
value.u.s = FcSharedStr (vstack->u.string);
|
value.u.s = FcSharedStr (vstack->u.string);
|
||||||
if (value.u.s)
|
if (value.u.s)
|
||||||
|
@ -2521,7 +2521,7 @@ FcParsePattern (FcConfigParse *parse)
|
||||||
|
|
||||||
while ((vstack = FcVStackPeek (parse)))
|
while ((vstack = FcVStackPeek (parse)))
|
||||||
{
|
{
|
||||||
switch (vstack->tag) {
|
switch ((int) vstack->tag) {
|
||||||
case FcVStackPattern:
|
case FcVStackPattern:
|
||||||
if (!FcPatternAppend (pattern, vstack->u.pattern))
|
if (!FcPatternAppend (pattern, vstack->u.pattern))
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue