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.
This commit is contained in:
Werner Lemberg 2007-01-15 06:42:40 +00:00
parent 6164a9d13b
commit 8c4120d0a3
11 changed files with 41 additions and 23 deletions

View File

@ -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.

View File

@ -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

View File

@ -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

View File

@ -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;
}

View File

@ -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 */

View File

@ -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

View File

@ -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;

View File

@ -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;
}

View File

@ -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 */

View File

@ -5249,6 +5249,7 @@
{
if ( CUR.pedantic_hinting )
CUR.error = TT_Err_Invalid_Reference;
*refp = 0;
return FAILURE;
}

View File

@ -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 )