Commit dc736a6ac0d6abe15da0139a00e205e84f82deec

David Turner 2005-03-03T14:09:10

* src/sfnt/ttsbit0.c, src/truetype/ttpload.c: removing compiler warnings

diff --git a/ChangeLog b/ChangeLog
index 7a2bc98..3175eb8 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,16 @@
+2005-03-04  David Turner  <david@freetype.org>
+
+    * include/freetype/internal/{ftmemory.h,ftserv.h}: removing
+    compiler warnings with GCC 3.3 and above...
+
+    * include/freetype/internal/ftobjs.h, src/base/ftutil.c (ft_highpow2),
+    src/pfr/pfrload.c, src/pfr/pfrobjs.c, src/pfr/pfrtypes.h: implement
+    FT_OPTIMIZE_MEMORY, the kerning table is not loaded into the heap
+    anymore.
+
+    * src/sfnt/ttsbit0.c, src/truetype/ttpload.c: removing compiler
+    warnings
+
 2005-03-03  Werner Lemberg  <wl@gnu.org>
 
 	* devel/ftoption.h: Updated to recent changes.
@@ -21,7 +34,7 @@
 	(tt_face_load_metrics): Remove compiler warnings
 	-- redundant variables, missing initializations, etc.
 
-	* src/sfnt/ttsbit.h: Handle FT_OPTIMIZE_MEMORY.	
+	* src/sfnt/ttsbit.h: Handle FT_OPTIMIZE_MEMORY.
 
 	* src/autofit/rules.mk, src/autofit/module.mk,
 	src/autofit/afangles.h: New files.
diff --git a/src/sfnt/ttsbit0.c b/src/sfnt/ttsbit0.c
index fb9462e..5233de7 100644
--- a/src/sfnt/ttsbit0.c
+++ b/src/sfnt/ttsbit0.c
@@ -791,7 +791,8 @@
     goto NoBitmap;
 
   FoundRange:
-    p = decoder->eblc_base + decoder->strike_index_array + FT_NEXT_ULONG( p );
+    image_offset = FT_NEXT_ULONG(p);
+    p = decoder->eblc_base + decoder->strike_index_array + image_offset;
     if ( p + 8 > p_limit )
       goto NoBitmap;
 
@@ -948,6 +949,9 @@
     TT_SBitDecoderRec  decoder[1];
     FT_Error           error;
 
+    FT_UNUSED(map);
+    FT_UNUSED(stream);
+    FT_UNUSED(load_flags);
 
     error = tt_sbit_decoder_init( decoder, face, strike_index, metrics );
     if ( !error )
diff --git a/src/truetype/ttpload.c b/src/truetype/ttpload.c
index ae3e4aa..f60341b 100644
--- a/src/truetype/ttpload.c
+++ b/src/truetype/ttpload.c
@@ -65,7 +65,6 @@
                      FT_Stream  stream )
   {
     FT_Error   error;
-    FT_Memory  memory = stream->memory;
     FT_ULong   table_len;