removing 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
diff --git a/ChangeLog b/ChangeLog
index c198795..7027a73 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
2005-03-01 David Turner <david@freetype.org>
+ * 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
diff --git a/src/sfnt/ttkern.c b/src/sfnt/ttkern.c
index a488404..2b6a168 100644
--- 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;
}
diff --git a/src/sfnt/ttload.c b/src/sfnt/ttload.c
index f59ef40..8caef37 100644
--- 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;
diff --git a/src/sfnt/ttsbit.h b/src/sfnt/ttsbit.h
index f1b63b7..e5b486c 100644
--- a/src/sfnt/ttsbit.h
+++ b/src/sfnt/ttsbit.h
@@ -41,6 +41,7 @@ FT_BEGIN_HEADER
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 @@ FT_BEGIN_HEADER
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,
diff --git a/src/sfnt/ttsbit0.c b/src/sfnt/ttsbit0.c
index 74bb789..c27786d 100644
--- 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;