ref: 71cc1a83d86526cb9423225e77dc796700646d4c
parent: 735e5abb7bbad8e74e56228176a7d93b345f071b
author: Werner Lemberg <[email protected]>
date: Mon May 30 03:20:37 EDT 2011
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.
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2011-05-30 Werner Lemberg <[email protected]>
+
+ 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 <[email protected]>
[autofit] Improve tracing of hinting process.
--- 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;
@@ -412,12 +415,6 @@
default:
;
- }
-
- if ( best_point != old_best_point )
- {
- best_first = first;
- best_last = last;
}
}
FT_TRACE5(( "best_pos=%5ld\n", best_pos ));
--- 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
--- 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 )