* builds/freetype.mk (FT_CFLAGS): Use $(INCLUDE_FLAGS) first. * src/cache/ftccache.c (ftc_cache_resize): Mark `error' as unused to avoid compiler warning. * src/cff/cffload.c (CFF_Get_String): Ditto. * src/cff/cffobjs.c (CFF_StrCopy): Ditto. * src/psaux/psobjs.c (PS_Table_Done): Ditto. * src/pcf/pcfread.c (pcf_seek_to_table_type): Ditto. * src/sfnt/sfdriver.c (get_sfnt_postscript_name): Ditto. (pcf_get_bitmaps): The same for `sizebitmaps'. * src/psaux/t1decode.c (T1_Decode_Parse_Charstrings): The same for `orig_y'. (t1operator_seac): Comment out more dead code. * src/pshinter/pshalgo2.c (ps2_hints_apply): Add `DEBUG_HINTER' conditional. * src/truetype/ttgload.c (TT_Process_Simple_Glyph, load_truetype_glyph): Add `TT_CONFIG_OPTION_BYTECODE_INTERPRETER' conditional.
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 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264
diff --git a/ChangeLog b/ChangeLog
index 403c5ad..bc3c303 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,24 @@
+2002-02-19 Werner Lemberg <wl@gnu.org>
+
+ * builds/freetype.mk (FT_CFLAGS): Use $(INCLUDE_FLAGS) first.
+
+ * src/cache/ftccache.c (ftc_cache_resize): Mark `error' as unused
+ to avoid compiler warning.
+ * src/cff/cffload.c (CFF_Get_String): Ditto.
+ * src/cff/cffobjs.c (CFF_StrCopy): Ditto.
+ * src/psaux/psobjs.c (PS_Table_Done): Ditto.
+ * src/pcf/pcfread.c (pcf_seek_to_table_type): Ditto.
+ * src/sfnt/sfdriver.c (get_sfnt_postscript_name): Ditto.
+ (pcf_get_bitmaps): The same for `sizebitmaps'.
+ * src/psaux/t1decode.c (T1_Decode_Parse_Charstrings): The same for
+ `orig_y'.
+ (t1operator_seac): Comment out more dead code.
+ * src/pshinter/pshalgo2.c (ps2_hints_apply): Add `DEBUG_HINTER'
+ conditional.
+ * src/truetype/ttgload.c (TT_Process_Simple_Glyph,
+ load_truetype_glyph): Add `TT_CONFIG_OPTION_BYTECODE_INTERPRETER'
+ conditional.
+
2002-02-18 Werner Lemberg <wl@gnu.org>
* src/autohint/ahglyph.c (ah_outline_link_segments): Remove unused
diff --git a/builds/freetype.mk b/builds/freetype.mk
index 53f0e85..426f6f6 100644
--- a/builds/freetype.mk
+++ b/builds/freetype.mk
@@ -139,7 +139,10 @@ INCLUDE_FLAGS = $(INCLUDES:%=$I%)
# least the paths for the `base' and `builds/<system>' directories;
# debug/optimization/warning flags + ansi compliance if needed.
#
-FT_CFLAGS = $(CFLAGS) $(INCLUDE_FLAGS)
+# $(INCLUDE_FLAGS) should come before $(CFLAGS) to avoid problems with
+# old FreeType versions.
+#
+FT_CFLAGS = $(INCLUDE_FLAGS) $(CFLAGS)
FT_CC = $(CC) $(FT_CFLAGS)
FT_COMPILE = $(CC) $(ANSIFLAGS) $(FT_CFLAGS)
diff --git a/src/cache/ftccache.c b/src/cache/ftccache.c
index bd334aa..4d1d197 100644
--- a/src/cache/ftccache.c
+++ b/src/cache/ftccache.c
@@ -383,6 +383,8 @@
cache->buckets = new_buckets;
cache->size = new_size;
+
+ FT_UNUSED( error );
}
}
diff --git a/src/cff/cffload.c b/src/cff/cffload.c
index 8d144d0..155bba4 100644
--- a/src/cff/cffload.c
+++ b/src/cff/cffload.c
@@ -1328,8 +1328,8 @@
if ( adobe_name )
{
- FT_Memory memory = index->stream->memory;
- FT_Error error;
+ FT_Memory memory = index->stream->memory;
+ FT_Error error;
len = (FT_UInt)strlen( adobe_name );
@@ -1338,6 +1338,8 @@
MEM_Copy( name, adobe_name, len );
name[len] = 0;
}
+
+ FT_UNUSED( error );
}
return name;
diff --git a/src/cff/cffobjs.c b/src/cff/cffobjs.c
index 0211b8e..a869839 100644
--- a/src/cff/cffobjs.c
+++ b/src/cff/cffobjs.c
@@ -241,6 +241,9 @@
MEM_Copy( result, source, len );
result[len] = 0;
}
+
+ FT_UNUSED( error );
+
return result;
}
diff --git a/src/pcf/pcfread.c b/src/pcf/pcfread.c
index 407613c..272b467 100644
--- a/src/pcf/pcfread.c
+++ b/src/pcf/pcfread.c
@@ -252,8 +252,8 @@ THE SOFTWARE.
FT_ULong *aformat,
FT_ULong *asize )
{
- FT_Error error;
- FT_Int i;
+ FT_Error error;
+ FT_Int i;
for ( i = 0; i < ntables; i++ )
@@ -271,6 +271,8 @@ THE SOFTWARE.
return PCF_Err_Ok;
}
+ FT_UNUSED( error );
+
return PCF_Err_Invalid_File_Format;
}
@@ -618,6 +620,8 @@ THE SOFTWARE.
PCF_GLYPH_PAD_INDEX( format ) ));
FT_TRACE4(( "bitmap size = %d\n", sizebitmaps ));
+ FT_UNUSED( sizebitmaps ); /* only used for debugging */
+
for ( i = 0; i < nbitmaps; i++ )
face->metrics[i].bits = stream->pos + offsets[i];
diff --git a/src/psaux/psobjs.c b/src/psaux/psobjs.c
index 5c5fbe0..c497190 100644
--- a/src/psaux/psobjs.c
+++ b/src/psaux/psobjs.c
@@ -227,6 +227,8 @@
table->capacity = table->cursor;
FREE( old_base );
+
+ FT_UNUSED( error );
}
diff --git a/src/psaux/t1decode.c b/src/psaux/t1decode.c
index 7280781..0a90394 100644
--- a/src/psaux/t1decode.c
+++ b/src/psaux/t1decode.c
@@ -183,8 +183,11 @@
FT_Int achar )
{
FT_Error error;
- FT_Int bchar_index, achar_index, n_base_points;
+ FT_Int bchar_index, achar_index;
+#if 0
+ FT_Int n_base_points;
FT_Outline* base = decoder->builder.base;
+#endif
FT_Vector left_bearing, advance;
@@ -258,7 +261,9 @@
if ( error )
goto Exit;
+#if 0
n_base_points = base->n_points;
+#endif
/* save the left bearing and width of the base character */
/* as they will be erased by the next load. */
@@ -761,6 +766,8 @@
orig_x = builder->last.x = x = builder->pos_x + top[0];
orig_y = builder->last.y = y = builder->pos_y;
+ FT_UNUSED( orig_y );
+
/* the `metrics_only' indicates that we only want to compute */
/* the glyph's metrics (lsb + advance width), not load the */
/* rest of it; so exit immediately */
diff --git a/src/pshinter/pshalgo2.c b/src/pshinter/pshalgo2.c
index 27ee5c1..a1d874c 100644
--- a/src/pshinter/pshalgo2.c
+++ b/src/pshinter/pshalgo2.c
@@ -1500,12 +1500,15 @@
PSH2_GlyphRec glyphrec;
PSH2_Glyph glyph = &glyphrec;
FT_Error error;
+#ifdef DEBUG_HINTER
FT_Memory memory;
+#endif
FT_Int dimension;
- memory = globals->memory;
#ifdef DEBUG_HINTER
+ memory = globals->memory;
+
if ( ps2_debug_glyph )
{
psh2_glyph_done( ps2_debug_glyph );
diff --git a/src/sfnt/sfdriver.c b/src/sfnt/sfdriver.c
index 48fa643..e023c0b 100644
--- a/src/sfnt/sfdriver.c
+++ b/src/sfnt/sfdriver.c
@@ -151,6 +151,9 @@
face->root.internal->postscript_name = result;
}
+
+ FT_UNUSED( error );
+
return result;
}
}
diff --git a/src/truetype/ttgload.c b/src/truetype/ttgload.c
index 7b2a0f6..d7104d7 100644
--- a/src/truetype/ttgload.c
+++ b/src/truetype/ttgload.c
@@ -609,14 +609,18 @@
FT_GlyphLoader* gloader = load->gloader;
FT_Outline* outline = &gloader->current.outline;
FT_UInt n_points = outline->n_points;
+#ifdef TT_CONFIG_OPTION_BYTECODE_INTERPRETER
FT_UInt n_ins;
+#endif
TT_GlyphZone* zone = &load->zone;
FT_Error error = TT_Err_Ok;
FT_UNUSED( debug ); /* used by truetype interpreter only */
+#ifdef TT_CONFIG_OPTION_BYTECODE_INTERPRETER
n_ins = load->glyph->control_len;
+#endif
/* add shadow points */
@@ -915,19 +919,26 @@
else
{
TT_GlyphSlot glyph = (TT_GlyphSlot)loader->glyph;
- FT_UInt start_point, start_contour;
+ FT_UInt start_point;
+#ifdef TT_CONFIG_OPTION_BYTECODE_INTERPRETER
+ FT_UInt start_contour;
FT_ULong ins_pos; /* position of composite instructions, if any */
+#endif
/* for each subglyph, read composite header */
start_point = gloader->base.outline.n_points;
+#ifdef TT_CONFIG_OPTION_BYTECODE_INTERPRETER
start_contour = gloader->base.outline.n_contours;
+#endif
error = face->read_composite_glyph( loader );
if ( error )
goto Fail;
+#ifdef TT_CONFIG_OPTION_BYTECODE_INTERPRETER
ins_pos = loader->ins_pos;
+#endif
face->forget_glyph_frame( loader );
opened_frame = 0;