Commit 7ac76b50da64efc6c9bf2d1e52c1daf42abc54d5

Werner Lemberg 2014-03-04T04:29:17

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.

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 */