Fix some clang compiler warnings.
* src/base/ftoutln.c (FT_Outline_EmboldenXY), src/cff/cf2intrp.c (cf2_interpT2CharString), src/truetype/ttgload.c (load_truetype_glyph), src/truetype/ttgxvar.c (tt_handle_deltas), src/truetype/ttinterp.c (Ins_INSTCTRL): Fix signedness issues.
This commit is contained in:
parent
5aaabb44bc
commit
eb1bba9be4
12
ChangeLog
12
ChangeLog
|
@ -1,3 +1,12 @@
|
||||||
|
2015-06-30 Werner Lemberg <wl@gnu.org>
|
||||||
|
|
||||||
|
Fix some clang compiler warnings.
|
||||||
|
|
||||||
|
* src/base/ftoutln.c (FT_Outline_EmboldenXY), src/cff/cf2intrp.c
|
||||||
|
(cf2_interpT2CharString), src/truetype/ttgload.c
|
||||||
|
(load_truetype_glyph), src/truetype/ttgxvar.c (tt_handle_deltas),
|
||||||
|
src/truetype/ttinterp.c (Ins_INSTCTRL): Fix signedness issues.
|
||||||
|
|
||||||
2015-06-29 Alexei Podtelezhnikov <apodtele@gmail.com>
|
2015-06-29 Alexei Podtelezhnikov <apodtele@gmail.com>
|
||||||
|
|
||||||
[truetype] Speed up bytecode interpreter.
|
[truetype] Speed up bytecode interpreter.
|
||||||
|
@ -8,7 +17,8 @@
|
||||||
|
|
||||||
[base] Speed up emboldening.
|
[base] Speed up emboldening.
|
||||||
|
|
||||||
* src/base/ftoutln.c (FT_Outline_EmboldenXY): Use `FT_Vector_NormLen'.
|
* src/base/ftoutln.c (FT_Outline_EmboldenXY): Use
|
||||||
|
`FT_Vector_NormLen'.
|
||||||
|
|
||||||
2015-06-29 Alexei Podtelezhnikov <apodtele@gmail.com>
|
2015-06-29 Alexei Podtelezhnikov <apodtele@gmail.com>
|
||||||
|
|
||||||
|
|
|
@ -302,9 +302,9 @@ FT_BEGIN_HEADER
|
||||||
/*
|
/*
|
||||||
* This function normalizes a vector and returns its original length.
|
* This function normalizes a vector and returns its original length.
|
||||||
* The normalized vector is a 16.16 fixed-point unit vector with length
|
* The normalized vector is a 16.16 fixed-point unit vector with length
|
||||||
* close to 0x10000. The accuracy of the returned length is limited to
|
* close to 0x10000. The accuracy of the returned length is limited to
|
||||||
* 16 bits also. The function utilizes quick inverse square root
|
* 16 bits also. The function utilizes quick inverse square root
|
||||||
* aproximation without divisions and square roots relying on Newton's
|
* approximation without divisions and square roots relying on Newton's
|
||||||
* iterations instead.
|
* iterations instead.
|
||||||
*/
|
*/
|
||||||
FT_BASE( FT_UInt32 )
|
FT_BASE( FT_UInt32 )
|
||||||
|
|
|
@ -946,7 +946,7 @@
|
||||||
/* compute incoming normalized vector */
|
/* compute incoming normalized vector */
|
||||||
in.x = v_cur.x - v_prev.x;
|
in.x = v_cur.x - v_prev.x;
|
||||||
in.y = v_cur.y - v_prev.y;
|
in.y = v_cur.y - v_prev.y;
|
||||||
l_in = FT_Vector_NormLen( &in );
|
l_in = (FT_Fixed)FT_Vector_NormLen( &in );
|
||||||
|
|
||||||
for ( n = first; n <= last; n++ )
|
for ( n = first; n <= last; n++ )
|
||||||
{
|
{
|
||||||
|
@ -958,7 +958,7 @@
|
||||||
/* compute outgoing normalized vector */
|
/* compute outgoing normalized vector */
|
||||||
out.x = v_next.x - v_cur.x;
|
out.x = v_next.x - v_cur.x;
|
||||||
out.y = v_next.y - v_cur.y;
|
out.y = v_next.y - v_cur.y;
|
||||||
l_out = FT_Vector_NormLen( &out );
|
l_out = (FT_Fixed)FT_Vector_NormLen( &out );
|
||||||
|
|
||||||
d = FT_MulFix( in.x, out.x ) + FT_MulFix( in.y, out.y );
|
d = FT_MulFix( in.x, out.x ) + FT_MulFix( in.y, out.y );
|
||||||
|
|
||||||
|
|
|
@ -1305,7 +1305,7 @@
|
||||||
/* if `cf2_stack_count' isn't of the form 4n or 4n+1, */
|
/* if `cf2_stack_count' isn't of the form 4n or 4n+1, */
|
||||||
/* we enforce it by clearing the second bit */
|
/* we enforce it by clearing the second bit */
|
||||||
/* (and sorting the stack indexing to suit) */
|
/* (and sorting the stack indexing to suit) */
|
||||||
count = count1 & ~2;
|
count = count1 & ~2U;
|
||||||
index += count1 - count;
|
index += count1 - count;
|
||||||
|
|
||||||
FT_TRACE4(( " vvcurveto\n" ));
|
FT_TRACE4(( " vvcurveto\n" ));
|
||||||
|
@ -1350,7 +1350,7 @@
|
||||||
/* if `cf2_stack_count' isn't of the form 4n or 4n+1, */
|
/* if `cf2_stack_count' isn't of the form 4n or 4n+1, */
|
||||||
/* we enforce it by clearing the second bit */
|
/* we enforce it by clearing the second bit */
|
||||||
/* (and sorting the stack indexing to suit) */
|
/* (and sorting the stack indexing to suit) */
|
||||||
count = count1 & ~2;
|
count = count1 & ~2U;
|
||||||
index += count1 - count;
|
index += count1 - count;
|
||||||
|
|
||||||
FT_TRACE4(( " hhcurveto\n" ));
|
FT_TRACE4(( " hhcurveto\n" ));
|
||||||
|
@ -1399,7 +1399,7 @@
|
||||||
/* 8n+4, or 8n+5, we enforce it by clearing the */
|
/* 8n+4, or 8n+5, we enforce it by clearing the */
|
||||||
/* second bit */
|
/* second bit */
|
||||||
/* (and sorting the stack indexing to suit) */
|
/* (and sorting the stack indexing to suit) */
|
||||||
count = count1 & ~2;
|
count = count1 & ~2U;
|
||||||
index += count1 - count;
|
index += count1 - count;
|
||||||
|
|
||||||
FT_TRACE4(( alternate ? " hvcurveto\n" : " vhcurveto\n" ));
|
FT_TRACE4(( alternate ? " hvcurveto\n" : " vhcurveto\n" ));
|
||||||
|
|
|
@ -1582,7 +1582,7 @@
|
||||||
error = TT_Vary_Apply_Glyph_Deltas( (TT_Face)(loader->face),
|
error = TT_Vary_Apply_Glyph_Deltas( (TT_Face)(loader->face),
|
||||||
glyph_index,
|
glyph_index,
|
||||||
&outline,
|
&outline,
|
||||||
outline.n_points );
|
(FT_UInt)outline.n_points );
|
||||||
if ( error )
|
if ( error )
|
||||||
goto Exit;
|
goto Exit;
|
||||||
|
|
||||||
|
@ -1679,7 +1679,7 @@
|
||||||
|
|
||||||
if ( face->doblend )
|
if ( face->doblend )
|
||||||
{
|
{
|
||||||
FT_UInt i, limit;
|
short i, limit;
|
||||||
FT_SubGlyph subglyph;
|
FT_SubGlyph subglyph;
|
||||||
|
|
||||||
FT_Outline outline;
|
FT_Outline outline;
|
||||||
|
@ -1690,11 +1690,11 @@
|
||||||
FT_Memory memory = face->root.memory;
|
FT_Memory memory = face->root.memory;
|
||||||
|
|
||||||
|
|
||||||
limit = gloader->current.num_subglyphs;
|
limit = (short)gloader->current.num_subglyphs;
|
||||||
|
|
||||||
/* construct an outline structure for */
|
/* construct an outline structure for */
|
||||||
/* communication with `TT_Vary_Apply_Glyph_Deltas' */
|
/* communication with `TT_Vary_Apply_Glyph_Deltas' */
|
||||||
outline.n_points = gloader->current.num_subglyphs + 4;
|
outline.n_points = (short)( gloader->current.num_subglyphs + 4 );
|
||||||
outline.n_contours = outline.n_points;
|
outline.n_contours = outline.n_points;
|
||||||
|
|
||||||
if ( FT_NEW_ARRAY( points, outline.n_points ) ||
|
if ( FT_NEW_ARRAY( points, outline.n_points ) ||
|
||||||
|
@ -1748,7 +1748,7 @@
|
||||||
face,
|
face,
|
||||||
glyph_index,
|
glyph_index,
|
||||||
&outline,
|
&outline,
|
||||||
outline.n_points ) ) != 0 )
|
(FT_UInt)outline.n_points ) ) != 0 )
|
||||||
goto Exit1;
|
goto Exit1;
|
||||||
|
|
||||||
subglyph = gloader->current.subglyphs + gloader->base.num_subglyphs;
|
subglyph = gloader->current.subglyphs + gloader->base.num_subglyphs;
|
||||||
|
|
|
@ -1649,13 +1649,13 @@
|
||||||
{
|
{
|
||||||
FT_Vector* out_points;
|
FT_Vector* out_points;
|
||||||
|
|
||||||
FT_UInt first_point;
|
FT_Int first_point;
|
||||||
FT_UInt end_point;
|
FT_Int end_point;
|
||||||
|
|
||||||
FT_UInt first_delta;
|
FT_Int first_delta;
|
||||||
FT_UInt cur_delta;
|
FT_Int cur_delta;
|
||||||
|
|
||||||
FT_UInt point;
|
FT_Int point;
|
||||||
FT_Short contour;
|
FT_Short contour;
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -5147,11 +5147,11 @@
|
||||||
Ins_INSTCTRL( TT_ExecContext exc,
|
Ins_INSTCTRL( TT_ExecContext exc,
|
||||||
FT_Long* args )
|
FT_Long* args )
|
||||||
{
|
{
|
||||||
FT_Long K, L, Kf;
|
FT_ULong K, L, Kf;
|
||||||
|
|
||||||
|
|
||||||
K = args[1];
|
K = (FT_ULong)args[1];
|
||||||
L = args[0];
|
L = (FT_ULong)args[0];
|
||||||
|
|
||||||
/* selector values cannot be `OR'ed; */
|
/* selector values cannot be `OR'ed; */
|
||||||
/* they are indices starting with index 1, not flags */
|
/* they are indices starting with index 1, not flags */
|
||||||
|
|
Loading…
Reference in New Issue