* src/base/ftobject.c, src/base/ftsynth.c, src/base/ftstroker.c, src/bdf/bdfdrivr.c: removed compiler warnings
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176
diff --git a/ChangeLog b/ChangeLog
index 45f527f..5478243 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2002-08-22 David Turner <david@freetype.org>
+
+ * src/base/ftobject.c, src/base/ftsynth.c, src/base/ftstroker.c,
+ src/bdf/bdfdrivr.c: removed compiler warnings
+
2002-08-21 Werner Lemberg <wl@gnu.org>
* src/pshinter/pshalgo3.c (psh3_glyph_compute_inflections,
diff --git a/src/base/ftobject.c b/src/base/ftobject.c
index 1a5d68e..34e41e9 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 2c9e956..7f6b3de 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 2e10fbe..437ea03 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 391dec8..967ceca 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" );