Eliminate some compiler warnings, avoid seg fault when matching missing
values
This commit is contained in:
parent
2a41214a25
commit
88c747e206
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* $XFree86: xc/lib/fontconfig/src/fccfg.c,v 1.7 2002/05/29 08:21:33 keithp Exp $
|
||||
* $XFree86: xc/lib/fontconfig/src/fccfg.c,v 1.8 2002/06/02 19:51:36 keithp Exp $
|
||||
*
|
||||
* Copyright © 2000 Keith Packard, member of The XFree86 Project, Inc.
|
||||
*
|
||||
|
@ -1158,7 +1158,7 @@ FcConfigSubstitute (FcConfig *config,
|
|||
* If there was a test, then replace the matched
|
||||
* value with the new list of values
|
||||
*/
|
||||
if (t)
|
||||
if (t && st[i].elt)
|
||||
{
|
||||
FcValueList *thisValue = st[i].value;
|
||||
FcValueList *nextValue = thisValue ? thisValue->next : 0;
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* $XFree86: $
|
||||
* $XFree86: xc/lib/fontconfig/src/fcdbg.c,v 1.2 2002/02/18 22:29:28 keithp Exp $
|
||||
*
|
||||
* Copyright © 2000 Keith Packard, member of The XFree86 Project, Inc.
|
||||
*
|
||||
|
@ -51,6 +51,9 @@ FcValuePrint (FcValue v)
|
|||
case FcTypeCharSet: /* XXX */
|
||||
printf (" set");
|
||||
break;
|
||||
case FcTypeFTFace:
|
||||
printf (" face");
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* $XFree86: xc/lib/fontconfig/src/fclist.c,v 1.2 2002/02/28 16:51:48 keithp Exp $
|
||||
* $XFree86: xc/lib/fontconfig/src/fclist.c,v 1.3 2002/05/21 17:06:22 keithp Exp $
|
||||
*
|
||||
* Copyright © 2000 Keith Packard, member of The XFree86 Project, Inc.
|
||||
*
|
||||
|
@ -224,6 +224,8 @@ FcListValueHash (FcValue v)
|
|||
return FcListMatrixHash (v.u.m);
|
||||
case FcTypeCharSet:
|
||||
return FcCharSetCount (v.u.c);
|
||||
case FcTypeFTFace:
|
||||
return (FcChar32) v.u.f;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* $XFree86: xc/lib/fontconfig/src/fcmatch.c,v 1.7 2002/05/29 22:07:33 keithp Exp $
|
||||
* $XFree86: xc/lib/fontconfig/src/fcmatch.c,v 1.8 2002/05/31 04:42:42 keithp Exp $
|
||||
*
|
||||
* Copyright © 2000 Keith Packard, member of The XFree86 Project, Inc.
|
||||
*
|
||||
|
@ -465,7 +465,7 @@ FcSortCompare (const void *aa, const void *ab)
|
|||
FcSortNode *b = *(FcSortNode **) ab;
|
||||
double *as = &a->score[0];
|
||||
double *bs = &b->score[0];
|
||||
double ad, bd;
|
||||
double ad = 0, bd = 0;
|
||||
int i;
|
||||
|
||||
i = NUM_MATCHER;
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* $XFree86: xc/lib/fontconfig/src/fcname.c,v 1.4 2002/05/29 22:07:33 keithp Exp $
|
||||
* $XFree86: xc/lib/fontconfig/src/fcname.c,v 1.5 2002/06/02 20:52:06 keithp Exp $
|
||||
*
|
||||
* Copyright © 2000 Keith Packard, member of The XFree86 Project, Inc.
|
||||
*
|
||||
|
@ -464,6 +464,8 @@ FcNameUnparseValue (FcStrBuf *buf,
|
|||
return FcNameUnparseString (buf, temp, 0);
|
||||
case FcTypeCharSet:
|
||||
return FcNameUnparseCharSet (buf, v.u.c);
|
||||
case FcTypeFTFace:
|
||||
return FcTrue;
|
||||
}
|
||||
return FcFalse;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue