summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWerner Lemberg <wl@gnu.org>2007-01-15 06:42:40 +0000
committerWerner Lemberg <wl@gnu.org>2007-01-15 06:42:40 +0000
commit8c4120d0a390f00beef69859f09da3de4f731feb (patch)
tree12cfb628115ef9f209489e1109c3102355506082
parent6164a9d13b5127614bee9ca9228bae54eec2c065 (diff)
downloadfreetype2-8c4120d0a390f00beef69859f09da3de4f731feb.tar.gz
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.
-rw-r--r--ChangeLog16
-rw-r--r--docs/CHANGES2
-rw-r--r--src/autofit/aftypes.h4
-rw-r--r--src/base/ftobjs.c6
-rw-r--r--src/cff/cffobjs.c8
-rw-r--r--src/cff/cffobjs.h4
-rw-r--r--src/gxvalid/gxvmorx5.c8
-rw-r--r--src/pcf/pcfread.c3
-rw-r--r--src/truetype/ttdriver.c8
-rw-r--r--src/truetype/ttinterp.c1
-rw-r--r--src/type42/t42objs.h4
11 files changed, 41 insertions, 23 deletions
diff --git a/ChangeLog b/ChangeLog
index 1bc07dad3..11ba2caef 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 2a1e0dc02..d49c18925 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 d1459a420..a78585d1a 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 7eb2efcce..7c9d312b4 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 2d1204e38..eb6159f74 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 cc4ab644c..f18b5d932 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 2920f5471..d9115618c 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 8ef7b46b6..466042637 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 828b264e5..e1b3d7e8f 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 e43261322..c636406e9 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 aff26751f..289dedcc6 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 )