shithub: freetype+ttf2subf

Download patch

ref: 5c0d3a4dcaf04d5c16bb5803556a89b3505cc8bc
parent: edbcbde7033e05ce97333af946084d835c833d93
author: David Turner <[email protected]>
date: Thu Aug 22 16:35:36 EDT 2002

* src/base/ftobject.c, src/base/ftsynth.c, src/base/ftstroker.c,
        src/bdf/bdfdrivr.c: removed compiler warnings

git/fs: mount .git/fs: mount/attach disallowed
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2002-08-22  David Turner  <[email protected]>
+
+        * src/base/ftobject.c, src/base/ftsynth.c, src/base/ftstroker.c,
+        src/bdf/bdfdrivr.c: removed compiler warnings
+
 2002-08-21  Werner Lemberg  <[email protected]>
 
 	* src/pshinter/pshalgo3.c (psh3_glyph_compute_inflections,
--- a/src/base/ftobject.c
+++ b/src/base/ftobject.c
@@ -30,9 +30,33 @@
  /*******************************************************************/
 
  /* 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 */
   static void
   ft_class_hnode_destroy( FT_ClassHNode  node )
@@ -260,21 +284,6 @@
   Exit:
     return  (FT_Class) clazz;
   }
-
-
-  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
-  };
 
 
 
--- 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 ) )
       {
@@ -1098,6 +1102,9 @@
     while ( arc >= bez_stack )
     {
       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 ) )
--- 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++ )
       {
--- a/src/bdf/bdfdrivr.c
+++ b/src/bdf/bdfdrivr.c
@@ -308,11 +308,11 @@
 
       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" );