From 2a541881142429adfd6dd87ec4f7f3b17ce07222 Mon Sep 17 00:00:00 2001 From: David Turner Date: Thu, 22 Aug 2002 20:35:36 +0000 Subject: [PATCH] * src/base/ftobject.c, src/base/ftsynth.c, src/base/ftstroker.c, src/bdf/bdfdrivr.c: removed compiler warnings --- ChangeLog | 5 +++++ src/base/ftobject.c | 41 +++++++++++++++++++++++++---------------- src/base/ftstroker.c | 21 ++++++++++++++------- src/base/ftsynth.c | 1 + src/bdf/bdfdrivr.c | 4 ++-- 5 files changed, 47 insertions(+), 25 deletions(-) diff --git a/ChangeLog b/ChangeLog index 45f527f25..5478243e1 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2002-08-22 David Turner + + * src/base/ftobject.c, src/base/ftsynth.c, src/base/ftstroker.c, + src/bdf/bdfdrivr.c: removed compiler warnings + 2002-08-21 Werner Lemberg * src/pshinter/pshalgo3.c (psh3_glyph_compute_inflections, diff --git a/src/base/ftobject.c b/src/base/ftobject.c index 1a5d68e19..34e41e943 100644 --- a/src/base/ftobject.c +++ b/src/base/ftobject.c @@ -30,7 +30,31 @@ /*******************************************************************/ /* forward declaration */ - static const FT_TypeRec ft_meta_class_type; + FT_BASE_DEF( FT_Error ) + ft_metaclass_init( FT_MetaClass meta, + FT_Library library ); + + /* forward declaration */ + FT_BASE_DEF( void ) + ft_metaclass_done( FT_MetaClass meta ); + + + /* class type for the meta-class itself */ + static const FT_TypeRec ft_meta_class_type = + { + "FT2.MetaClass", + NULL, + + sizeof( FT_MetaClassRec ), + (FT_Object_InitFunc) ft_metaclass_init, + (FT_Object_DoneFunc) ft_metaclass_done, + + sizeof( FT_ClassRec ), + (FT_Object_InitFunc) NULL, + (FT_Object_DoneFunc) NULL + }; + + /* destroy a given class */ @@ -262,21 +286,6 @@ } - static const FT_TypeRec ft_meta_class_type = - { - "FT2.MetaClass", - NULL, - - sizeof( FT_MetaClassRec ), - (FT_Object_InitFunc) ft_metaclass_init, - (FT_Object_DoneFunc) ft_metaclass_done, - - sizeof( FT_ClassRec ), - (FT_Object_InitFunc) NULL, - (FT_Object_DoneFunc) NULL - }; - - diff --git a/src/base/ftstroker.c b/src/base/ftstroker.c index 2c9e95629..7f6b3de53 100644 --- a/src/base/ftstroker.c +++ b/src/base/ftstroker.c @@ -51,7 +51,7 @@ { FT_Vector d1, d2; FT_Angle theta; - FT_Bool close1, close2; + FT_Int close1, close2; d1.x = base[1].x - base[2].x; d1.y = base[1].y - base[2].y; @@ -79,7 +79,8 @@ } theta = ft_pos_abs( FT_Angle_Diff( *angle_in, *angle_out ) ); - return ( theta < FT_SMALL_CONIC_THRESHOLD ); + + return FT_BOOL( theta < FT_SMALL_CONIC_THRESHOLD ); } @@ -119,7 +120,7 @@ { FT_Vector d1, d2, d3; FT_Angle theta1, theta2; - FT_Bool close1, close2, close3; + FT_Int close1, close2, close3; d1.x = base[2].x - base[3].x; d1.y = base[2].y - base[3].y; @@ -163,8 +164,9 @@ } theta1 = ft_pos_abs( FT_Angle_Diff( *angle_in, *angle_mid ) ); theta2 = ft_pos_abs( FT_Angle_Diff( *angle_mid, *angle_out ) ); - return ( theta1 < FT_SMALL_CUBIC_THRESHOLD && - theta2 < FT_SMALL_CUBIC_THRESHOLD ); + + return FT_BOOL( theta1 < FT_SMALL_CUBIC_THRESHOLD && + theta2 < FT_SMALL_CUBIC_THRESHOLD ); } @@ -546,7 +548,7 @@ } } - outline->n_points += border->num_points; + outline->n_points = (short)( outline->n_points + border->num_points ); FT_ASSERT( FT_Outline_Check( outline ) == 0 ); } @@ -1006,7 +1008,9 @@ while ( arc >= bez_stack ) { FT_Angle angle_in, angle_out; - + + angle_in = angle_out = 0; /* remove compiler warnings */ + if ( arc < limit && !ft_conic_is_small_enough( arc, &angle_in, &angle_out ) ) { @@ -1099,6 +1103,9 @@ { FT_Angle angle_in, angle_mid, angle_out; + /* remove compiler warnings */ + angle_in = angle_out = angle_mid = 0; + if ( arc < limit && !ft_cubic_is_small_enough( arc, &angle_in, &angle_mid, &angle_out ) ) { diff --git a/src/base/ftsynth.c b/src/base/ftsynth.c index 2e10fbe4c..437ea031a 100644 --- a/src/base/ftsynth.c +++ b/src/base/ftsynth.c @@ -232,6 +232,7 @@ v_first = points[first]; v_prev = points[last]; + v_cur = v_first; for ( n = first; n <= last; n++ ) { diff --git a/src/bdf/bdfdrivr.c b/src/bdf/bdfdrivr.c index 391dec869..967cecaf6 100644 --- a/src/bdf/bdfdrivr.c +++ b/src/bdf/bdfdrivr.c @@ -308,11 +308,11 @@ THE SOFTWARE. prop = bdf_get_font_property( font, (char *)"AVERAGE_WIDTH" ); if ( ( prop != NULL ) && ( prop->value.int32 >= 10 ) ) - root->available_sizes->width = prop->value.int32 / 10; + root->available_sizes->width = (short)( prop->value.int32 / 10 ); prop = bdf_get_font_property( font, (char *)"PIXEL_SIZE" ); if ( prop != NULL ) - root->available_sizes->height = prop->value.int32; + root->available_sizes->height = (short) prop->value.int32; else { prop = bdf_get_font_property( font, (char *)"POINT_SIZE" );