Fix various compiler warnings. * src/truetype/ttdriver.c (tt_size_select), src/cff/cffobjs.h, src/cff/cffobjs.c (cff_size_request), src/type42/t42objs.h: s/index/strike_index/. * src/base/ftobjs.c (FT_Match_Size): s/index/size_index/. * src/gxvalid/gxvmorx5.c (gxv_morx_subtable_type5_InsertList_validate): s/index/table_index/. * src/truetype/ttinterp.c (Compute_Point_Displacement), src/pcf/pcfread.c (pcf_seek_to_table_type): Avoid possibly uninitialized variables.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255
diff --git a/ChangeLog b/ChangeLog
index 1bc07da..11ba2ca 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,19 @@
+2007-01-14 Detlef Würkner <TetiSoft@apg.lahn.de>
+
+ Fix various compiler warnings.
+
+ * src/truetype/ttdriver.c (tt_size_select), src/cff/cffobjs.h,
+ src/cff/cffobjs.c (cff_size_request), src/type42/t42objs.h:
+ s/index/strike_index/.
+ * src/base/ftobjs.c (FT_Match_Size): s/index/size_index/.
+
+ * src/gxvalid/gxvmorx5.c
+ (gxv_morx_subtable_type5_InsertList_validate): s/index/table_index/.
+
+ * src/truetype/ttinterp.c (Compute_Point_Displacement),
+ src/pcf/pcfread.c (pcf_seek_to_table_type): Avoid possibly
+ uninitialized variables.
+
2007-01-13 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
* docs/CHANGES, docs/INSTALL.MAC: Improvements.
diff --git a/docs/CHANGES b/docs/CHANGES
index 2a1e0dc..d49c189 100644
--- a/docs/CHANGES
+++ b/docs/CHANGES
@@ -117,7 +117,7 @@ CHANGES BETWEEN 2.3.0 and 2.2.1
OS X-only version.
- III. MISCELLANEOUS
+ IV. MISCELLANEOUS
- Various performance and memory footprint optimizations have been
performed on the TrueType and CFF font loaders, sometimes with
diff --git a/src/autofit/aftypes.h b/src/autofit/aftypes.h
index d1459a4..a78585d 100644
--- a/src/autofit/aftypes.h
+++ b/src/autofit/aftypes.h
@@ -4,7 +4,7 @@
/* */
/* Auto-fitter types (specification only). */
/* */
-/* Copyright 2003, 2004, 2005, 2006 by */
+/* Copyright 2003, 2004, 2005, 2006, 2007 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -54,7 +54,7 @@ FT_BEGIN_HEADER
/*************************************************************************/
#define xxAF_USE_WARPER /* only define to use warp hinting */
-#define AF_DEBUG
+#define xxAF_DEBUG
#ifdef AF_DEBUG
diff --git a/src/base/ftobjs.c b/src/base/ftobjs.c
index 7eb2efc..7c9d312 100644
--- a/src/base/ftobjs.c
+++ b/src/base/ftobjs.c
@@ -2089,7 +2089,7 @@
FT_Match_Size( FT_Face face,
FT_Size_Request req,
FT_Bool ignore_width,
- FT_ULong* index )
+ FT_ULong* size_index )
{
FT_Int i;
FT_Long w, h;
@@ -2123,8 +2123,8 @@
if ( w == FT_PIX_ROUND( bsize->x_ppem ) || ignore_width )
{
- if ( index )
- *index = (FT_ULong)i;
+ if ( size_index )
+ *size_index = (FT_ULong)i;
return FT_Err_Ok;
}
diff --git a/src/cff/cffobjs.c b/src/cff/cffobjs.c
index 2d1204e..eb6159f 100644
--- a/src/cff/cffobjs.c
+++ b/src/cff/cffobjs.c
@@ -4,7 +4,7 @@
/* */
/* OpenType objects manager (body). */
/* */
-/* Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006 by */
+/* Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006, 2007 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -207,13 +207,13 @@
{
CFF_Face cffface = (CFF_Face)size->face;
SFNT_Service sfnt = (SFNT_Service)cffface->sfnt;
- FT_ULong index;
+ FT_ULong strike_index;
- if ( sfnt->set_sbit_strike( cffface, req, &index ) )
+ if ( sfnt->set_sbit_strike( cffface, req, &strike_index ) )
cffsize->strike_index = 0xFFFFFFFFUL;
else
- return cff_size_select( size, index );
+ return cff_size_select( size, strike_index );
}
#endif /* TT_CONFIG_OPTION_EMBEDDED_BITMAPS */
diff --git a/src/cff/cffobjs.h b/src/cff/cffobjs.h
index cc4ab64..f18b5d9 100644
--- a/src/cff/cffobjs.h
+++ b/src/cff/cffobjs.h
@@ -4,7 +4,7 @@
/* */
/* OpenType objects manager (specification). */
/* */
-/* Copyright 1996-2001, 2002, 2003, 2004, 2006 by */
+/* Copyright 1996-2001, 2002, 2003, 2004, 2006, 2007 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -120,7 +120,7 @@ FT_BEGIN_HEADER
FT_LOCAL( FT_Error )
cff_size_select( FT_Size size,
- FT_ULong index );
+ FT_ULong strike_index );
#endif
diff --git a/src/gxvalid/gxvmorx5.c b/src/gxvalid/gxvmorx5.c
index 2920f54..d911561 100644
--- a/src/gxvalid/gxvmorx5.c
+++ b/src/gxvalid/gxvmorx5.c
@@ -5,7 +5,7 @@
/* TrueTypeGX/AAT morx table validation */
/* body for type5 (Contextual Glyph Insertion) subtable. */
/* */
-/* Copyright 2005 by suzuki toshiya, Masatake YAMATO, Red Hat K.K., */
+/* Copyright 2005, 2007 by suzuki toshiya, Masatake YAMATO, Red Hat K.K., */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -109,16 +109,16 @@
static void
- gxv_morx_subtable_type5_InsertList_validate( FT_UShort index,
+ gxv_morx_subtable_type5_InsertList_validate( FT_UShort table_index,
FT_UShort count,
FT_Bytes table,
FT_Bytes limit,
GXV_Validator valid )
{
- FT_Bytes p = table + index * 2;
+ FT_Bytes p = table + table_index * 2;
- while ( p < table + count * 2 + index * 2 )
+ while ( p < table + count * 2 + table_index * 2 )
{
FT_UShort insert_glyphID;
diff --git a/src/pcf/pcfread.c b/src/pcf/pcfread.c
index 8ef7b46..4660426 100644
--- a/src/pcf/pcfread.c
+++ b/src/pcf/pcfread.c
@@ -2,7 +2,7 @@
FreeType font driver for pcf fonts
- Copyright 2000, 2001, 2002, 2003, 2004, 2005, 2006 by
+ Copyright 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007 by
Francesco Zappa Nardelli
Permission is hereby granted, free of charge, to any person obtaining a copy
@@ -321,6 +321,7 @@ THE SOFTWARE.
}
Fail:
+ *asize = 0;
return error;
}
diff --git a/src/truetype/ttdriver.c b/src/truetype/ttdriver.c
index 828b264..e1b3d7e 100644
--- a/src/truetype/ttdriver.c
+++ b/src/truetype/ttdriver.c
@@ -4,7 +4,7 @@
/* */
/* TrueType font driver implementation (body). */
/* */
-/* Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006 by */
+/* Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006, 2007 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -187,15 +187,15 @@
{
TT_Face ttface = (TT_Face)size->face;
SFNT_Service sfnt = (SFNT_Service) ttface->sfnt;
- FT_ULong index;
+ FT_ULong strike_index;
- error = sfnt->set_sbit_strike( ttface, req, &index );
+ error = sfnt->set_sbit_strike( ttface, req, &strike_index );
if ( error )
ttsize->strike_index = 0xFFFFFFFFUL;
else
- return tt_size_select( size, index );
+ return tt_size_select( size, strike_index );
}
#endif /* TT_CONFIG_OPTION_EMBEDDED_BITMAPS */
diff --git a/src/truetype/ttinterp.c b/src/truetype/ttinterp.c
index e432613..c636406 100644
--- a/src/truetype/ttinterp.c
+++ b/src/truetype/ttinterp.c
@@ -5249,6 +5249,7 @@
{
if ( CUR.pedantic_hinting )
CUR.error = TT_Err_Invalid_Reference;
+ *refp = 0;
return FAILURE;
}
diff --git a/src/type42/t42objs.h b/src/type42/t42objs.h
index aff2675..289dedc 100644
--- a/src/type42/t42objs.h
+++ b/src/type42/t42objs.h
@@ -4,7 +4,7 @@
/* */
/* Type 42 objects manager (specification). */
/* */
-/* Copyright 2002, 2003, 2006 by Roberto Alameda. */
+/* Copyright 2002, 2003, 2006, 2007 by Roberto Alameda. */
/* */
/* This file is part of the FreeType project, and may only be used, */
/* modified, and distributed under the terms of the FreeType project */
@@ -86,7 +86,7 @@ FT_BEGIN_HEADER
FT_LOCAL( FT_Error )
T42_Size_Select( T42_Size size,
- FT_ULong index );
+ FT_ULong strike_index );
FT_LOCAL( void )