Remove compiler warning.

Reported by Krzysztof Kowalczyk <kkowalczyk@gmail.com>.

* src/autofit/aflatin2.c (af_latin2_hint_edges): Move declaration of
`n_edges' into `#if' block.
This commit is contained in:
Werner Lemberg 2009-05-28 07:07:48 +02:00
parent c32019b64a
commit b4df875196
3 changed files with 52 additions and 39 deletions

View File

@ -1,3 +1,11 @@
2009-05-28 Werner Lemberg <wl@gnu.org>
Remove compiler warning.
Reported by Krzysztof Kowalczyk <kkowalczyk@gmail.com>.
* src/autofit/aflatin2.c (af_latin2_hint_edges): Move declaration of
`n_edges' into `#if' block.
2009-05-28 Werner Lemberg <wl@gnu.org>
Make compilation work with FT_CONFIG_OPTION_USE_ZLIB not defined.

View File

@ -1,6 +1,6 @@
# FreeType 2 src/autofit Jamfile
#
# Copyright 2003, 2004, 2005, 2006, 2007 by
# Copyright 2003, 2004, 2005, 2006, 2007, 2009 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
@ -14,7 +14,7 @@ SubDir FT2_TOP src autofit ;
{
local _sources ;
# define FT2_AUTOFIT2 do enable to experimental latin hinter replacement
# define FT2_AUTOFIT2 to enable experimental latin hinter replacement
if $(FT2_AUTOFIT2)
{
DEFINES += FT_OPTION_AUTOFIT2 ;

View File

@ -4,7 +4,7 @@
/* */
/* Auto-fitter hinting routines for latin script (body). */
/* */
/* Copyright 2003, 2004, 2005, 2006, 2007, 2008 by */
/* Copyright 2003, 2004, 2005, 2006, 2007, 2008, 2009 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@ -1788,7 +1788,6 @@
AF_AxisHints axis = &hints->axis[dim];
AF_Edge edges = axis->edges;
AF_Edge edge_limit = edges + axis->num_edges;
FT_Int n_edges;
AF_Edge edge;
AF_Edge anchor = 0;
FT_Int has_serifs = 0;
@ -2099,8 +2098,12 @@
/* We don't handle horizontal edges since we can't easily assure that */
/* the third (lowest) stem aligns with the base line; it might end up */
/* one pixel higher or lower. */
#if 0
n_edges = edge_limit - edges;
{
FT_Int n_edges = edge_limit - edges;
if ( dim == AF_DIMENSION_HORZ && ( n_edges == 6 || n_edges == 12 ) )
{
AF_Edge edge1, edge2, edge3;
@ -2146,7 +2149,9 @@
edge3->link->flags |= AF_EDGE_DONE;
}
}
}
#endif
if ( has_serifs || !anchor )
{
/*