From 1e03fff62b1e9c1577858551924f531adeaa76e0 Mon Sep 17 00:00:00 2001 From: David Turner Date: Tue, 1 Mar 2005 22:57:25 +0000 Subject: [PATCH] removing compiler warnings --- ChangeLog | 3 +++ src/sfnt/ttkern.c | 5 +---- src/sfnt/ttload.c | 1 - src/sfnt/ttsbit.h | 2 ++ src/sfnt/ttsbit0.c | 9 ++++----- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/ChangeLog b/ChangeLog index c19879540..7027a7306 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2005-03-01 David Turner + * 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 a488404d8..2b6a1687d 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 f59ef40da..8caef37d3 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 f1b63b7ec..e5b486c6c 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 74bb7892a..c27786db3 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;