Commit cf24d51531d41b1675753d39533c6ae562f8104b

Werner Lemberg 2001-06-18T14:23:45

Minor cleanups to remove compiler warnings. * include/freetype/cache/ftcmanag.h (FTC_MAX_BYTES_DEFAULT): Use `L' for constant. * include/freetype/config/ftoption.h (FT_RENDER_POOL_SIZE): Ditto. * src/base/ftcalc.c (FT_MulDiv): Use `L' for constant. * src/base/ftglyph.c (FT_Glyph_Get_CBox): Remove `error' variable. * src/base/fttrigon.c (ft_trig_arctan_table): Use `L' for constants. * src/base/ftobjs.c (FT_Done_Size): Fix return value. (FT_Set_Char_Size, FT_Set_Pixel_Sizes, FT_Get_Kerning): Remove unused `memory' variable. * src/autohint/ahglyph.c (ah_get_orientation): Use `L' for constant. * src/autohint/ahhint.c (ah_hint_edges_3, ah_hinter_align_edge_points): Remove unused `before' and `after' variables. (ah_hinter_align_weak_points): Remove unused `edge_limit' variable. (ah_hinter_load): Remove unused `new_advance', `start_contour', and `metrics' variables. * src/cff/cffload.c (CFF_Load_Encoding): Remove dead code to avoid compiler warning. * src/cff/cffobjs.c (CFF_Init_Face): Remove unused `base_offset' variable. * src/cff/cffgload.c (CFF_Parse_CharStrings): Remove unused `outline' variable. (cff_compute_bias): Use `U' for constant. * src/cid/cidload.c (cid_decrypt): Ditto. * src/psaux/psobjs.c (T1_Decrypt): Ditto. * src/psaux/t1decode.c (T1_Decoder_Parse_CharStrings): Ditto. * src/sfnt/ttload.c (TT_Load_Kern): Remove unused `version' variable. * src/sfnt/ttsbit.c (TT_Load_SBit_Image): Remove unused `top' variable. * src/truetype/ttgload.c (load_truetype_glyph): Remove unused `num_contours' and `ins_offset' variables. (compute_glyph_metrics): Remove unused `Top' and `x_scale' variables. (TT_Load_Glyph): Remove unused `memory' variable. * src/smooth/ftgrays.c (grays_raster_render): Use `L' for constants.

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
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
diff --git a/ChangeLog b/ChangeLog
index 521129b..7e672d4 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,46 @@
 2001-06-18  Werner Lemberg  <wl@gnu.org>
 
+	Minor cleanups to remove compiler warnings.
+
+	* include/freetype/cache/ftcmanag.h (FTC_MAX_BYTES_DEFAULT): Use
+	`L' for constant.
+	* include/freetype/config/ftoption.h (FT_RENDER_POOL_SIZE): Ditto.
+	* src/base/ftcalc.c (FT_MulDiv): Use `L' for constant.
+	* src/base/ftglyph.c (FT_Glyph_Get_CBox): Remove `error' variable.
+	* src/base/fttrigon.c (ft_trig_arctan_table): Use `L' for constants.
+	* src/base/ftobjs.c (FT_Done_Size): Fix return value.
+	(FT_Set_Char_Size, FT_Set_Pixel_Sizes, FT_Get_Kerning): Remove
+	unused `memory' variable.
+	* src/autohint/ahglyph.c (ah_get_orientation): Use `L' for constant.
+	* src/autohint/ahhint.c (ah_hint_edges_3,
+	ah_hinter_align_edge_points): Remove unused `before' and `after'
+	variables.
+	(ah_hinter_align_weak_points): Remove unused `edge_limit' variable.
+	(ah_hinter_load): Remove unused `new_advance', `start_contour',
+	and `metrics' variables.
+	* src/cff/cffload.c (CFF_Load_Encoding): Remove dead code to avoid
+	compiler warning.
+	* src/cff/cffobjs.c (CFF_Init_Face): Remove unused `base_offset'
+	variable.
+	* src/cff/cffgload.c (CFF_Parse_CharStrings): Remove unused
+	`outline' variable.
+	(cff_compute_bias): Use `U' for constant.
+	* src/cid/cidload.c (cid_decrypt): Ditto.
+	* src/psaux/psobjs.c (T1_Decrypt): Ditto.
+	* src/psaux/t1decode.c (T1_Decoder_Parse_CharStrings): Ditto.
+	* src/sfnt/ttload.c (TT_Load_Kern): Remove unused `version'
+	variable.
+	* src/sfnt/ttsbit.c (TT_Load_SBit_Image): Remove unused `top'
+	variable.
+	* src/truetype/ttgload.c (load_truetype_glyph): Remove unused
+	`num_contours' and `ins_offset' variables.
+	(compute_glyph_metrics): Remove unused `Top' and `x_scale'
+	variables.
+	(TT_Load_Glyph): Remove unused `memory' variable.
+	* src/smooth/ftgrays.c (grays_raster_render): Use `L' for constants.
+
+2001-06-18  Werner Lemberg  <wl@gnu.org>
+
 	Make the new error scheme source compatible with older FT versions
 	by introducing another layer.
 
diff --git a/include/freetype/cache/ftcmanag.h b/include/freetype/cache/ftcmanag.h
index a8b8a86..fc6d5bc 100644
--- a/include/freetype/cache/ftcmanag.h
+++ b/include/freetype/cache/ftcmanag.h
@@ -81,7 +81,7 @@ FT_BEGIN_HEADER
 
 #define FTC_MAX_FACES_DEFAULT  2
 #define FTC_MAX_SIZES_DEFAULT  4
-#define FTC_MAX_BYTES_DEFAULT  200000  /* 200kByte by default! */
+#define FTC_MAX_BYTES_DEFAULT  200000L  /* 200kByte by default! */
 
   /* maximum number of caches registered in a single manager */
 #define FTC_MAX_CACHES         16
diff --git a/include/freetype/config/ftoption.h b/include/freetype/config/ftoption.h
index dafcd3a..b0892bc 100644
--- a/include/freetype/config/ftoption.h
+++ b/include/freetype/config/ftoption.h
@@ -247,7 +247,7 @@ FT_BEGIN_HEADER
   /*                                                                       */
   /* This must be greater than 4kByte.                                     */
   /*                                                                       */
-#define FT_RENDER_POOL_SIZE  32768
+#define FT_RENDER_POOL_SIZE  32768L
 
 
   /*************************************************************************/
diff --git a/src/autohint/ahglyph.c b/src/autohint/ahglyph.c
index 7df9e41..d3affc1 100644
--- a/src/autohint/ahglyph.c
+++ b/src/autohint/ahglyph.c
@@ -230,8 +230,8 @@
     indices.xMax = -1;
     indices.yMax = -1;
 
-    box.xMin = box.yMin =  32767;
-    box.xMax = box.yMax = -32768;
+    box.xMin = box.yMin =  32767L;
+    box.xMax = box.yMax = -32768L;
 
     /* is it empty? */
     if ( outline->n_contours < 1 )
diff --git a/src/autohint/ahhint.c b/src/autohint/ahhint.c
index 1bfcd24..2b339c5 100644
--- a/src/autohint/ahhint.c
+++ b/src/autohint/ahhint.c
@@ -205,8 +205,6 @@
     for ( dimension = 1; dimension >= 0; dimension-- )
     {
       AH_Edge*  edge;
-      AH_Edge*  before = 0;
-      AH_Edge*  after  = 0;
       AH_Edge*  anchor = 0;
       int       has_serifs = 0;
 
@@ -264,8 +262,6 @@
 
       /* now, we will align all stem edges, trying to maintain the */
       /* relative order of stems in the glyph..                    */
-      before = 0;
-      after  = 0;
       for ( edge = edges; edge < edge_limit; edge++ )
       {
         AH_Edge  *edge2;
@@ -434,13 +430,8 @@
     for ( dimension = 1; dimension >= 0; dimension-- )
     {
       AH_Edge*   edge;
-      AH_Edge*   before;
-      AH_Edge*   after;
 
 
-      before = 0;
-      after  = 0;
-
       edge = edges;
       for ( ; edge < edge_limit; edge++ )
       {
@@ -706,7 +697,6 @@
     AH_Outline*  outline = hinter->glyph;
     FT_Int       dimension;
     AH_Edge*     edges;
-    AH_Edge*     edge_limit;
     AH_Point*    points;
     AH_Point*    point_limit;
     AH_Point**   contour_limit;
@@ -719,7 +709,6 @@
     /* PASS 1: Move segment points to edge positions */
 
     edges      = outline->horz_edges;
-    edge_limit = edges + outline->num_hedges;
     touch_flag = ah_flah_touch_y;
 
     contour_limit = outline->contours + outline->num_contours;
@@ -1012,7 +1001,6 @@
     FT_Slot_Internal  internal = slot->internal;
     FT_Fixed          x_scale  = face->size->metrics.x_scale;
     FT_Fixed          y_scale  = face->size->metrics.y_scale;
-    FT_Glyph_Metrics  metrics;  /* temporary metrics */
     FT_Error          error;
     AH_Outline*       outline  = hinter->glyph;
     AH_Loader*        gloader  = hinter->loader;
@@ -1042,9 +1030,6 @@
       FT_Vector_Transform( &hinter->trans_delta, &imatrix );
     }
 
-    /* save current glyph metrics */
-    metrics = slot->metrics;
-
     /* set linear horizontal metrics */
     slot->linearHoriAdvance = slot->metrics.horiAdvance;
     slot->linearVertAdvance = slot->metrics.vertAdvance;
@@ -1122,7 +1107,7 @@
       /* width/positioning that occured during the hinting process  */
       {
         FT_Pos    old_width, new_width;
-        FT_Pos    old_advance, new_advance;
+        FT_Pos    old_advance;
         FT_Pos    old_lsb, new_lsb;
         AH_Edge*  edge1 = outline->vert_edges;     /* leftmost edge  */
         AH_Edge*  edge2 = edge1 +
@@ -1136,9 +1121,6 @@
         old_lsb     = edge1->opos;
         new_lsb     = edge1->pos;
 
-        new_advance = old_advance +
-                      ( new_width + new_lsb - old_width - old_lsb );
-
         hinter->pp1.x = ( ( new_lsb - old_lsb ) + 32 ) & -64;
         hinter->pp2.x = ( ( edge2->pos +
                             ( old_advance - edge2->opos ) ) + 32 ) & -64;
@@ -1151,12 +1133,11 @@
     case ft_glyph_format_composite:
       {
         FT_UInt       nn, num_subglyphs = slot->num_subglyphs;
-        FT_UInt       num_base_subgs, start_point, start_contour;
+        FT_UInt       num_base_subgs, start_point;
         FT_SubGlyph*  subglyph;
 
 
         start_point   = gloader->base.outline.n_points;
-        start_contour = gloader->base.outline.n_contours;
 
         /* first of all, copy the subglyph descriptors in the glyph loader */
         error = ah_loader_check_subglyphs( gloader, num_subglyphs );
diff --git a/src/base/ftcalc.c b/src/base/ftcalc.c
index 8ced815..63c74a6 100644
--- a/src/base/ftcalc.c
+++ b/src/base/ftcalc.c
@@ -362,7 +362,7 @@
     s ^= b; b = ABS( b );
     s ^= c; c = ABS( c );
 
-    if ( a <= 46340 && b <= 46340 && c <= 176095L && c > 0 )
+    if ( a <= 46340L && b <= 46340L && c <= 176095L && c > 0 )
     {
       a = ( a * b + ( c >> 1 ) ) / c;
     }
diff --git a/src/base/ftglyph.c b/src/base/ftglyph.c
index 811820f..8df52fc 100644
--- a/src/base/ftglyph.c
+++ b/src/base/ftglyph.c
@@ -515,16 +515,20 @@
                                             FT_BBox  *acbox )
   {
     const FT_Glyph_Class*  clazz;
-    FT_Error               error = FT_Err_Ok;
 
 
-    if ( !acbox || !glyph || !glyph->clazz )
-      error = FT_Err_Invalid_Argument;
+    if ( !acbox )
+      return;
+
+    acbox->xMin = acbox->yMin = acbox->xMax = acbox->yMax = 0;
+
+    if ( !glyph || !glyph->clazz )
+      return;
     else
     {
       clazz = glyph->clazz;
       if ( !clazz->glyph_bbox )
-        error = FT_Err_Invalid_Glyph_Format;
+        return;
       else
       {
         /* retrieve bbox in 26.6 coordinates */
diff --git a/src/base/ftobjs.c b/src/base/ftobjs.c
index 11215bf..1fa50ce 100644
--- a/src/base/ftobjs.c
+++ b/src/base/ftobjs.c
@@ -1524,7 +1524,7 @@
     else
       error = FT_Err_Invalid_Size_Handle;
 
-    return FT_Err_Ok;
+    return error;
   }
 
 
@@ -1558,7 +1558,6 @@
   {
     FT_Error          error = FT_Err_Ok;
     FT_Driver         driver;
-    FT_Memory         memory;
     FT_Driver_Class*  clazz;
     FT_Size_Metrics*  metrics;
     FT_Long           dim_x, dim_y;
@@ -1584,7 +1583,6 @@
 
     driver = face->driver;
     clazz  = driver->clazz;
-    memory = driver->root.memory;
 
     /* default processing -- this can be overridden by the driver */
     if ( char_width  < 1 * 64 )
@@ -1628,7 +1626,6 @@
   {
     FT_Error          error = FT_Err_Ok;
     FT_Driver         driver;
-    FT_Memory         memory;
     FT_Driver_Class*  clazz;
     FT_Size_Metrics*  metrics = &face->size->metrics;
 
@@ -1638,7 +1635,6 @@
 
     driver = face->driver;
     clazz  = driver->clazz;
-    memory = driver->root.memory;
 
     /* default processing -- this can be overridden by the driver */
     if ( pixel_width == 0 )
@@ -1684,7 +1680,6 @@
   {
     FT_Error   error = FT_Err_Ok;
     FT_Driver  driver;
-    FT_Memory  memory;
 
 
     if ( !face )
@@ -1694,7 +1689,6 @@
       return FT_Err_Invalid_Argument;
 
     driver = face->driver;
-    memory = driver->root.memory;
 
     akerning->x = 0;
     akerning->y = 0;
diff --git a/src/base/fttrigon.c b/src/base/fttrigon.c
index 02d2f21..cca34cf 100644
--- a/src/base/fttrigon.c
+++ b/src/base/fttrigon.c
@@ -29,9 +29,9 @@
   static const FT_Fixed
   ft_trig_arctan_table[24] =
   {
-    4157273, 2949120, 1740967, 919879, 466945, 234379, 117304, 58666,
-    29335, 14668, 7334, 3667, 1833, 917, 458, 229, 115, 57, 29, 14, 7,
-    4, 2, 1
+    4157273L, 2949120L, 1740967L, 919879L, 466945L, 234379L, 117304L,
+    58666L, 29335L, 14668L, 7334L, 3667L, 1833L, 917L, 458L, 229L, 115L,
+    57L, 29L, 14L, 7L, 4L, 2L, 1L
   };
 
   /* the Cordic shrink factor, multiplied by 2^32 */
diff --git a/src/cff/cffgload.c b/src/cff/cffgload.c
index 557cd6e..8b71542 100644
--- a/src/cff/cffgload.c
+++ b/src/cff/cffgload.c
@@ -306,10 +306,10 @@
 
     if ( num_subrs < 1240 )
       result = 107;
-    else if ( num_subrs < 33900 )
+    else if ( num_subrs < 33900U )
       result = 1131;
     else
-      result = 32768;
+      result = 32768U;
 
     return result;
   }
@@ -695,7 +695,6 @@
     FT_Byte*           ip;
     FT_Byte*           limit;
     CFF_Builder*       builder = &decoder->builder;
-    FT_Outline*        outline;
     FT_Pos             x, y;
     FT_Fixed           seed;
     FT_Fixed*          stack;
@@ -725,8 +724,7 @@
     limit = zone->limit  = charstring_base + charstring_len;
     ip    = zone->cursor = zone->base;
 
-    error   = CFF_Err_Ok;
-    outline = builder->current;
+    error = CFF_Err_Ok;
 
     x = builder->pos_x;
     y = builder->pos_y;
diff --git a/src/cff/cffload.c b/src/cff/cffload.c
index e469dc7..78a93fb 100644
--- a/src/cff/cffload.c
+++ b/src/cff/cffload.c
@@ -1919,7 +1919,6 @@
         FT_ERROR(( "CFF_Load_Encoding: invalid table format!\n" ));
         error = CFF_Err_Invalid_File_Format;
         goto Exit;
-       break;
       }
     }
 
diff --git a/src/cff/cffobjs.c b/src/cff/cffobjs.c
index aa2457d..cf2386e 100644
--- a/src/cff/cffobjs.c
+++ b/src/cff/cffobjs.c
@@ -346,14 +346,11 @@
       FT_Memory  memory = face->root.memory;
       FT_Face    root;
       FT_UInt    flags;
-      FT_ULong   base_offset;
 
 
       if ( ALLOC( cff, sizeof ( *cff ) ) )
         goto Exit;
 
-      base_offset = FILE_Pos();
-
       face->extra.data = cff;
       error = CFF_Load_Font( stream, face_index, cff );
       if ( error )
diff --git a/src/cid/cidload.c b/src/cid/cidload.c
index a0e937f..fe4867b 100644
--- a/src/cid/cidload.c
+++ b/src/cid/cidload.c
@@ -71,7 +71,7 @@
 
 
       plain     = ( *buffer ^ ( seed >> 8 ) );
-      seed      = ( *buffer + seed ) * 52845 + 22719;
+      seed      = ( *buffer + seed ) * 52845U + 22719;
       *buffer++ = plain;
       length--;
     }
diff --git a/src/psaux/psobjs.c b/src/psaux/psobjs.c
index a2c6688..075d5e9 100644
--- a/src/psaux/psobjs.c
+++ b/src/psaux/psobjs.c
@@ -1283,7 +1283,7 @@
 
 
       plain     = ( *buffer ^ ( seed >> 8 ) );
-      seed      = ( *buffer + seed ) * 52845 + 22719;
+      seed      = ( *buffer + seed ) * 52845U + 22719;
       *buffer++ = plain;
       length--;
     }
diff --git a/src/psaux/t1decode.c b/src/psaux/t1decode.c
index 04f1654..dd1c97a 100644
--- a/src/psaux/t1decode.c
+++ b/src/psaux/t1decode.c
@@ -323,7 +323,6 @@
     FT_Byte*          ip;
     FT_Byte*          limit;
     T1_Builder*       builder = &decoder->builder;
-    FT_Outline*       outline;
     FT_Pos            x, y;
 
 
@@ -346,8 +345,7 @@
     limit = zone->limit  = charstring_base + charstring_len;
     ip    = zone->cursor = zone->base;
 
-    error   = PSaux_Err_Ok;
-    outline = builder->current;
+    error = PSaux_Err_Ok;
 
     x = builder->pos_x;
     y = builder->pos_y;
diff --git a/src/sfnt/ttload.c b/src/sfnt/ttload.c
index 1783b43..38d1247 100644
--- a/src/sfnt/ttload.c
+++ b/src/sfnt/ttload.c
@@ -1542,7 +1542,7 @@
     FT_Error   error;
     FT_Memory  memory = stream->memory;
 
-    FT_UInt    n, num_tables, version;
+    FT_UInt    n, num_tables;
 
 
     /* the kern table is optional; exit silently if it is missing */
@@ -1553,7 +1553,7 @@
     if ( ACCESS_Frame( 4L ) )
       goto Exit;
 
-    version    = GET_UShort();
+    (void)GET_UShort();         /* version */
     num_tables = GET_UShort();
 
     FORGET_Frame();
@@ -1567,7 +1567,7 @@
       if ( ACCESS_Frame( 6L ) )
         goto Exit;
 
-      version  = GET_UShort();      /* version                 */
+      (void)GET_UShort();           /* version                 */
       length   = GET_UShort() - 6;  /* substract header length */
       coverage = GET_UShort();
 
diff --git a/src/sfnt/ttsbit.c b/src/sfnt/ttsbit.c
index 46e0f31..18f2dac 100644
--- a/src/sfnt/ttsbit.c
+++ b/src/sfnt/ttsbit.c
@@ -1443,11 +1443,9 @@
     {
       /* in case of a horizontal strike only */
       FT_Int  advance;
-      FT_Int  top;
 
 
       advance = strike->hori.ascender - strike->hori.descender;
-      top     = advance / 10;
 
       /* some heuristic values */
 
diff --git a/src/smooth/ftgrays.c b/src/smooth/ftgrays.c
index 584d767..cb6ee2b 100644
--- a/src/smooth/ftgrays.c
+++ b/src/smooth/ftgrays.c
@@ -1876,10 +1876,10 @@
     }
     else
     {
-      ras.clip_box.xMin = -32768;
-      ras.clip_box.yMin = -32768;
-      ras.clip_box.xMax =  32767;
-      ras.clip_box.yMax =  32767;
+      ras.clip_box.xMin = -32768L;
+      ras.clip_box.yMin = -32768L;
+      ras.clip_box.xMax =  32767L;
+      ras.clip_box.yMax =  32767L;
     }
 
     ras.outline   = *outline;
diff --git a/src/truetype/ttgload.c b/src/truetype/ttgload.c
index 560e981..05c1d48 100644
--- a/src/truetype/ttgload.c
+++ b/src/truetype/ttgload.c
@@ -670,9 +670,8 @@
     TT_Face          face   = (TT_Face)loader->face;
     FT_ULong         offset;
     FT_Int           contours_count;
-    FT_UInt          index, num_points, num_contours, count;
+    FT_UInt          index, num_points, count;
     FT_Fixed         x_scale, y_scale;
-    FT_ULong         ins_offset;
     FT_GlyphLoader*  gloader = loader->gloader;
     FT_Bool          opened_frame = 0;
 
@@ -686,9 +685,7 @@
     }
 
     loader->glyph_index = glyph_index;
-    num_contours = 0;
     num_points   = 0;
-    ins_offset   = 0;
 
     x_scale = 0x10000L;
     y_scale = 0x10000L;
@@ -1119,18 +1116,14 @@
   {
     FT_BBox       bbox;
     TT_Face       face = (TT_Face)loader->face;
-    FT_Fixed      x_scale, y_scale;
+    FT_Fixed      y_scale;
     TT_GlyphSlot  glyph = loader->glyph;
     TT_Size       size = (TT_Size)loader->size;
 
 
-    x_scale = 0x10000L;
     y_scale = 0x10000L;
     if ( ( loader->load_flags & FT_LOAD_NO_SCALE ) == 0 )
-    {
-      x_scale = size->root.metrics.x_scale;
       y_scale = size->root.metrics.y_scale;
-    }
 
     if ( glyph->format != ft_glyph_format_composite )
     {
@@ -1190,7 +1183,6 @@
       FT_UShort  advance_height; /* vertical advance height   (EM units) */
 
       FT_Pos  left;     /* scaled vertical left side bearing         */
-      FT_Pos  Top;      /* scaled original vertical top side bearing */
       FT_Pos  top;      /* scaled vertical top side bearing          */
       FT_Pos  advance;  /* scaled vertical advance height            */
 
@@ -1244,14 +1236,12 @@
       /* scale the metrics */
       if ( !( loader->load_flags & FT_LOAD_NO_SCALE ) )
       {
-        Top     = FT_MulFix( top_bearing, y_scale );
         top     = FT_MulFix( top_bearing + loader->bbox.yMax, y_scale )
                     - bbox.yMax;
         advance = FT_MulFix( advance_height, y_scale );
       }
       else
       {
-        Top     = top_bearing;
         top     = top_bearing + loader->bbox.yMax - bbox.yMax;
         advance = advance_height;
       }
@@ -1332,7 +1322,6 @@
     SFNT_Interface*  sfnt;
     TT_Face          face;
     FT_Stream        stream;
-    FT_Memory        memory;
     FT_Error         error;
     TT_Loader        loader;
 
@@ -1340,7 +1329,6 @@
     face   = (TT_Face)glyph->face;
     sfnt   = (SFNT_Interface*)face->sfnt;
     stream = face->root.stream;
-    memory = face->root.memory;
     error  = 0;
 
     if ( !size || ( load_flags & FT_LOAD_NO_SCALE )   ||