Fix gcc 4.6 compiler warnings. * src/autofit/afcjk.c (af_cjk_metrics_init_blues): Use casts and remove unused variables. * src/autofit/aflatin.c (af_latin_hints_compute_edges): Comment out `up_dir'. * src/smooth/ftsmooth.c (ft_smooth_render_generic): Use `height_org' and `width_org' conditionalized.
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
diff --git a/ChangeLog b/ChangeLog
index 79a3e07..f9149be 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2011-05-30 Werner Lemberg <wl@gnu.org>
+
+ Fix gcc 4.6 compiler warnings.
+
+ * src/autofit/afcjk.c (af_cjk_metrics_init_blues): Use casts and
+ remove unused variables.
+ * src/autofit/aflatin.c (af_latin_hints_compute_edges): Comment out
+ `up_dir'.
+ * src/smooth/ftsmooth.c (ft_smooth_render_generic): Use `height_org'
+ and `width_org' conditionalized.
+
2011-05-27 Werner Lemberg <wl@gnu.org>
[autofit] Improve tracing of hinting process.
diff --git a/src/autofit/afcjk.c b/src/autofit/afcjk.c
index d7670f4..0acef9c 100644
--- a/src/autofit/afcjk.c
+++ b/src/autofit/afcjk.c
@@ -281,10 +281,16 @@
FT_GlyphSlot glyph = face->glyph;
#ifdef FT_DEBUG_LEVEL_TRACE
- FT_String* cjk_blue_name[AF_CJK_BLUE_MAX] = { "top", "bottom",
- "left", "right" };
- FT_String* cjk_blue_type_name[AF_CJK_BLUE_TYPE_MAX] = { "filled",
- "unfilled" };
+ FT_String* cjk_blue_name[AF_CJK_BLUE_MAX] = {
+ (FT_String*)"top",
+ (FT_String*)"bottom",
+ (FT_String*)"left",
+ (FT_String*)"right"
+ };
+ FT_String* cjk_blue_type_name[AF_CJK_BLUE_TYPE_MAX] = {
+ (FT_String*)"filled",
+ (FT_String*)"unfilled"
+ };
#endif
@@ -321,7 +327,7 @@
{
FT_UInt glyph_index;
FT_Pos best_pos; /* same as points.y */
- FT_Int best_point, best_first, best_last;
+ FT_Int best_point;
FT_Vector* points;
@@ -346,8 +352,6 @@
points = glyph->outline.points;
best_point = -1;
best_pos = 0; /* make compiler happy */
- best_first = 0; /* ditto */
- best_last = 0; /* ditto */
{
FT_Int nn;
@@ -359,7 +363,6 @@
nn < glyph->outline.n_contours;
first = last + 1, nn++ )
{
- FT_Int old_best_point = best_point;
FT_Int pp;
@@ -413,12 +416,6 @@
default:
;
}
-
- if ( best_point != old_best_point )
- {
- best_first = first;
- best_last = last;
- }
}
FT_TRACE5(( "best_pos=%5ld\n", best_pos ));
}
diff --git a/src/autofit/aflatin.c b/src/autofit/aflatin.c
index b939938..9bb2ef8 100644
--- a/src/autofit/aflatin.c
+++ b/src/autofit/aflatin.c
@@ -1046,7 +1046,9 @@
AF_Segment segment_limit = segments + axis->num_segments;
AF_Segment seg;
+#if 0
AF_Direction up_dir;
+#endif
FT_Fixed scale;
FT_Pos edge_distance_threshold;
FT_Pos segment_length_threshold;
@@ -1057,8 +1059,10 @@
scale = ( dim == AF_DIMENSION_HORZ ) ? hints->x_scale
: hints->y_scale;
+#if 0
up_dir = ( dim == AF_DIMENSION_HORZ ) ? AF_DIR_UP
: AF_DIR_RIGHT;
+#endif
/*
* We ignore all segments that are less than 1 pixel in length
diff --git a/src/smooth/ftsmooth.c b/src/smooth/ftsmooth.c
index eb12f18..1350a56 100644
--- a/src/smooth/ftsmooth.c
+++ b/src/smooth/ftsmooth.c
@@ -4,7 +4,7 @@
/* */
/* Anti-aliasing renderer interface (body). */
/* */
-/* Copyright 2000-2001, 2002, 2003, 2004, 2005, 2006, 2009, 2010 by */
+/* Copyright 2000-2006, 2009-2011 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -105,7 +105,10 @@
FT_Error error;
FT_Outline* outline = NULL;
FT_BBox cbox;
- FT_UInt width, height, height_org, width_org, pitch;
+ FT_UInt width, height, pitch;
+#ifndef FT_CONFIG_OPTION_SUBPIXEL_RENDERING
+ FT_UInt height_org, width_org;
+#endif
FT_Bitmap* bitmap;
FT_Memory memory;
FT_Int hmul = mode == FT_RENDER_MODE_LCD;
@@ -163,8 +166,10 @@
bitmap = &slot->bitmap;
memory = render->root.memory;
+#ifndef FT_CONFIG_OPTION_SUBPIXEL_RENDERING
width_org = width;
height_org = height;
+#endif
/* release old bitmap buffer */
if ( slot->internal->flags & FT_GLYPH_OWN_BITMAP )