Fix several clang static analyzer dead store warnings. * src/autofit/afhints.c (af_glyph_hints_reload, af_glyph_hints_align_weak_points): Remove unnecessary assignments. * src/bdf/bdflib.c (bdf_font_load): Ditto. * src/pshinter/pshalgo.c (psh_glyph_compute_extrema, psh_glyph_interpolate_other_points): Ditto. * src/type1/t1load.c (T1_Set_MM_Blend): Ditto.
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
diff --git a/ChangeLog b/ChangeLog
index bed2733..55f08fd 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,17 @@
+2014-03-04 Sean McBride <sean@rogue-research.com>
+
+ Fix several clang static analyzer dead store warnings.
+
+ * src/autofit/afhints.c (af_glyph_hints_reload,
+ af_glyph_hints_align_weak_points): Remove unnecessary assignments.
+
+ * src/bdf/bdflib.c (bdf_font_load): Ditto.
+
+ * src/pshinter/pshalgo.c (psh_glyph_compute_extrema,
+ psh_glyph_interpolate_other_points): Ditto.
+
+ * src/type1/t1load.c (T1_Set_MM_Blend): Ditto.
+
2014-03-03 Werner Lemberg <wl@gnu.org>
Rewrite library option handling in `configure'.
diff --git a/src/autofit/afhints.c b/src/autofit/afhints.c
index b89d20d..270a06b 100644
--- a/src/autofit/afhints.c
+++ b/src/autofit/afhints.c
@@ -821,7 +821,6 @@
in_x = out_x;
in_y = out_y;
- prev = point;
}
}
}
@@ -1257,7 +1256,6 @@
}
first_touched = point;
- last_touched = point;
for (;;)
{
diff --git a/src/bdf/bdflib.c b/src/bdf/bdflib.c
index b0ec292..83e4392 100644
--- a/src/bdf/bdflib.c
+++ b/src/bdf/bdflib.c
@@ -2399,7 +2399,6 @@
{
/* If the font is not proportional, set the font's monowidth */
/* field to the width of the font bounding box. */
- memory = p->font->memory;
if ( p->font->spacing != BDF_PROPORTIONAL )
p->font->monowidth = p->font->bbx.width;
diff --git a/src/pshinter/pshalgo.c b/src/pshinter/pshalgo.c
index 343472d..644c76d 100644
--- a/src/pshinter/pshalgo.c
+++ b/src/pshinter/pshalgo.c
@@ -4,7 +4,7 @@
/* */
/* PostScript hinting algorithm (body). */
/* */
-/* Copyright 2001-2010, 2012, 2013 by */
+/* Copyright 2001-2010, 2012-2014 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used */
@@ -1406,7 +1406,6 @@
point = first;
before = point;
- after = point;
do
{
@@ -2079,8 +2078,6 @@
start = first;
do
{
- point = first;
-
/* skip consecutive fitted points */
for (;;)
{
diff --git a/src/type1/t1load.c b/src/type1/t1load.c
index e2da956..fd06432 100644
--- a/src/type1/t1load.c
+++ b/src/type1/t1load.c
@@ -377,8 +377,6 @@
if ( blend && blend->num_axis == num_coords )
{
/* recompute the weight vector from the blend coordinates */
- error = FT_Err_Ok;
-
for ( n = 0; n < blend->num_designs; n++ )
{
FT_Fixed result = 0x10000L; /* 1.0 fixed */