shithub: freetype+ttf2subf

Download patch

ref: 1e03fff62b1e9c1577858551924f531adeaa76e0
parent: 5bc063da2ebb22627c78a9d088b1735718026e23
author: David Turner <[email protected]>
date: Tue Mar 1 17:57:25 EST 2005

removing compiler warnings

git/fs: mount .git/fs: mount/attach disallowed
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 2005-03-01  David Turner  <[email protected]>
 
+    * src/sfnt/{ttkern.c,ttsbit.h,ttsbit0.c,ttload.c},: removing compiler
+    warnings
+
     * src/autofit/{rules.mk,module.mk,afangles.h}: adding missing files
 
     * src/autofit/afloader.c: fixing small bug that could crash the engine
--- a/src/sfnt/ttkern.c
+++ b/src/sfnt/ttkern.c
@@ -48,7 +48,6 @@
                      FT_Stream  stream )
   {
     FT_Error   error;
-    FT_Memory  memory = stream->memory;
     FT_ULong   table_size;
     FT_Byte*   p;
     FT_Byte*   p_limit;
@@ -184,7 +183,6 @@
     FT_Int    result = 0;
     FT_UInt   count, mask = 1;
     FT_Byte*  p       = face->kern_table;
-    FT_Byte*  p_limit = p + face->kern_table_size;
 
 
     p   += 4;
@@ -199,6 +197,7 @@
       FT_UInt  coverage = FT_NEXT_USHORT( p );
       FT_Int   value    = 0;
 
+      FT_UNUSED(version);
 
       next = base + length;
 
@@ -222,7 +221,6 @@
           {
             FT_UInt   min = 0;
             FT_UInt   max = num_pairs;
-            FT_Byte*  q;
 
 
             while ( min < max )
@@ -287,7 +285,6 @@
       p = next;
     }
 
-  Exit:
     return result;
   }
 
--- a/src/sfnt/ttload.c
+++ b/src/sfnt/ttload.c
@@ -808,7 +808,6 @@
                         FT_Bool    vertical )
   {
     FT_Error   error;
-    FT_Memory  memory = stream->memory;
     FT_ULong   table_size;
     FT_Byte**  ptable;
     FT_ULong*  ptable_size;
--- a/src/sfnt/ttsbit.h
+++ b/src/sfnt/ttsbit.h
@@ -41,6 +41,7 @@
                            FT_UInt    y_ppem,
                            FT_ULong  *astrike_index );
 
+#ifndef FT_OPTIMIZE_MEMORY
   FT_LOCAL( FT_Error )
   tt_find_sbit_image( TT_Face          face,
                       FT_UInt          glyph_index,
@@ -53,6 +54,7 @@
   tt_load_sbit_metrics( FT_Stream        stream,
                         TT_SBit_Range    range,
                         TT_SBit_Metrics  metrics );
+#endif /* !FT_OPTIMIZE_MEMORY */
 
   FT_LOCAL( FT_Error )
   tt_face_load_sbit_image( TT_Face              face,
--- a/src/sfnt/ttsbit0.c
+++ b/src/sfnt/ttsbit0.c
@@ -90,10 +90,8 @@
                              FT_Stream  stream )
   {
     FT_Error   error  = SFNT_Err_Ok;
-    FT_Memory  memory = stream->memory;
     FT_Fixed   version;
     FT_ULong   num_strikes, table_size;
-    FT_ULong   table_base;
     FT_Byte*   p;
     FT_Byte*   p_limit;
     FT_UInt    nn, count;
@@ -453,7 +451,6 @@
     FT_Byte*    line;
     FT_Int      bit_height, bit_width, pitch, width, height, h;
     FT_Bitmap*  bitmap;
-    FT_UInt     rval;
 
 
     if ( !decoder->bitmap_allocated )
@@ -468,6 +465,7 @@
     bit_width  = bitmap->width;
     bit_height = bitmap->rows;
     pitch      = bitmap->pitch;
+    line       = bitmap->buffer;
 
     width  = decoder->metrics->width;
     height = decoder->metrics->height;
@@ -562,6 +560,7 @@
     bit_width  = bitmap->width;
     bit_height = bitmap->rows;
     pitch      = bitmap->pitch;
+    line       = bitmap->buffer;
 
     width  = decoder->metrics->width;
     height = decoder->metrics->height;
@@ -630,7 +629,7 @@
                                  FT_Int          x_pos,
                                  FT_Int          y_pos )
   {
-    FT_Error  error;
+    FT_Error  error = 0;
     FT_UInt   num_components, nn;
 
 
@@ -772,7 +771,7 @@
     FT_Byte*  p          = decoder->eblc_base + decoder->strike_index_array;
     FT_Byte*  p_limit    = decoder->eblc_limit;
     FT_ULong  num_ranges = decoder->strike_index_count;
-    FT_UInt   start, end, offset, index_format, image_format;
+    FT_UInt   start, end, index_format, image_format;
     FT_ULong  image_start, image_end, image_offset;