From a81f23c0cecdc5d4cb7a443fdd4527b5f0dbca8a Mon Sep 17 00:00:00 2001 From: Patrick Lam Date: Tue, 7 Feb 2006 03:53:32 +0000 Subject: [PATCH] Fix hidden variable warning. --- ChangeLog | 6 ++++++ fc-lang/de.orth | 1 + fc-lang/el.orth | 1 + fc-lang/en.orth | 1 + fc-lang/es.orth | 1 + fc-lang/fc-lang.c | 6 +++--- fc-lang/fi.orth | 2 +- fc-lang/fr.orth | 1 + fc-lang/it.orth | 1 + fc-lang/nl.orth | 1 + fc-lang/pt.orth | 1 + src/fccache.c | 1 - src/fccharset.c | 9 +++++---- 13 files changed, 23 insertions(+), 9 deletions(-) diff --git a/ChangeLog b/ChangeLog index 098f167..c602061 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,4 +1,10 @@ +2006-02-07 Patrick Lam + * src/fccache.c (FcCacheReadString): + + Fix hidden variable warning. + 2006-02-07 Dirk Mueller + reviewed by: plam * src/fccache.c (FcCacheReadString, FcCacheSkipString): diff --git a/fc-lang/de.orth b/fc-lang/de.orth index 20bac03..b9a4dc2 100644 --- a/fc-lang/de.orth +++ b/fc-lang/de.orth @@ -47,3 +47,4 @@ #201c # double quotes #201e # double quotes #2039-203a # angle quotes +20AC # EURO SIGN diff --git a/fc-lang/el.orth b/fc-lang/el.orth index bae0c89..0e5a732 100644 --- a/fc-lang/el.orth +++ b/fc-lang/el.orth @@ -30,3 +30,4 @@ 038c 038e-03a1 03a3-03ce +20AC # EURO SIGN diff --git a/fc-lang/en.orth b/fc-lang/en.orth index 94988b3..7e504fa 100644 --- a/fc-lang/en.orth +++ b/fc-lang/en.orth @@ -38,3 +38,4 @@ 00f6 #2018-2019 # single quotes #201c-201d # double quotes +20AC # EURO SIGN diff --git a/fc-lang/es.orth b/fc-lang/es.orth index 10798f6..77947f3 100644 --- a/fc-lang/es.orth +++ b/fc-lang/es.orth @@ -47,4 +47,5 @@ 00F3 # LATIN SMALL LETTER O WITH ACUTE 00FA # LATIN SMALL LETTER U WITH ACUTE 00FC # LATIN SMALL LETTER U WITH DIAERESIS +20AC # EURO SIGN # diff --git a/fc-lang/fc-lang.c b/fc-lang/fc-lang.c index 936a00b..97ffa65 100644 --- a/fc-lang/fc-lang.c +++ b/fc-lang/fc-lang.c @@ -37,9 +37,9 @@ * functions are also needed in slightly modified form */ -const FcChar16 *langBankNumbers = 0; -const FcCharLeaf *langBankLeaves = 0; -const int *langBankLeafIdx = 0; +const FcChar16 langBankNumbers[1]; /* place holders so that externs resolve */ +const FcCharLeaf langBankLeaves[1]; +const int langBankLeafIdx[1]; void FcMemAlloc (int kind, int size) diff --git a/fc-lang/fi.orth b/fc-lang/fi.orth index 3c53ea4..971bb83 100644 --- a/fc-lang/fi.orth +++ b/fc-lang/fi.orth @@ -49,4 +49,4 @@ #2019 # single quote #201d # double quote #203a # angle quote - +20AC # EURO SIGN diff --git a/fc-lang/fr.orth b/fc-lang/fr.orth index 7b8b7d3..e3cc052 100644 --- a/fc-lang/fr.orth +++ b/fc-lang/fr.orth @@ -56,3 +56,4 @@ 00FF # LATIN SMALL LETTER Y WITH DIAERESIS 00C6 # LATIN CAPITAL LETTER AE (ash) * 00E6 # LATIN SMALL LETTER AE (ash) * +20AC # EURO SIGN diff --git a/fc-lang/it.orth b/fc-lang/it.orth index 3d00647..04e8703 100644 --- a/fc-lang/it.orth +++ b/fc-lang/it.orth @@ -49,3 +49,4 @@ 00f2-00f3 00f9 00fa +20AC # EURO SIGN diff --git a/fc-lang/nl.orth b/fc-lang/nl.orth index d6e0088..c07dd46 100644 --- a/fc-lang/nl.orth +++ b/fc-lang/nl.orth @@ -60,4 +60,5 @@ 00fb 00fc #0132-0133 # IJ and ij ligatures +20AC # EURO SIGN diff --git a/fc-lang/pt.orth b/fc-lang/pt.orth index 4b0a72b..cca7bf0 100644 --- a/fc-lang/pt.orth +++ b/fc-lang/pt.orth @@ -62,3 +62,4 @@ 00fc ##203a # angle quote # +20AC # EURO SIGN diff --git a/src/fccache.c b/src/fccache.c index dd03322..aafc485 100644 --- a/src/fccache.c +++ b/src/fccache.c @@ -92,7 +92,6 @@ FcCacheReadString (int fd, char *dest, int len) if (size > 0) { - int slen; dest[size] = '\0'; slen = strlen (dest); diff --git a/src/fccharset.c b/src/fccharset.c index 8a66cc2..85b3947 100644 --- a/src/fccharset.c +++ b/src/fccharset.c @@ -38,9 +38,9 @@ static int charset_leaf_ptr, charset_leaf_count; static int ** leaf_idx = 0; static int charset_leaf_idx_ptr, charset_leaf_idx_count; -extern const FcChar16 *langBankNumbers; -extern const FcCharLeaf *langBankLeaves; -extern const int *langBankLeafIdx; +extern const FcChar16 langBankNumbers[]; +extern const FcCharLeaf langBankLeaves[]; +extern const int langBankLeafIdx[]; static FcBool FcCharSetEnsureBank (int bi); @@ -263,7 +263,8 @@ FcCharSetInsertLeaf (FcCharSet *fcs, FcChar32 ucs4, FcCharLeaf *leaf) } else { - leaves[fcs->bank][leaf_idx[fcs->bank][fcs->u.stat.leafidx_offset]+pos] = *leaf; + int bi = FcCacheBankToIndex(fcs->bank); + leaves[bi][leaf_idx[fcs->bank][fcs->u.stat.leafidx_offset]+pos] = *leaf; } return FcTrue; } -- 2.39.5