freetype-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[freetype2] master bd0438a: Minor fixes for some clang warnings.


From: Werner LEMBERG
Subject: [freetype2] master bd0438a: Minor fixes for some clang warnings.
Date: Wed, 16 Sep 2015 16:06:02 +0000

branch: master
commit bd0438a461d352590ae20e2516cfc14cf582d6ad
Author: Werner Lemberg <address@hidden>
Commit: Werner Lemberg <address@hidden>

    Minor fixes for some clang warnings.
    
    * src/base/ftoutln.c (FT_Outline_EmboldenXY): Cast, possible missing
    initialization.
    
    * src/truetype/ttgload.c (TT_Process_Composite_Component): Cast.
---
 ChangeLog              |    9 +++++++++
 src/base/ftoutln.c     |    4 ++--
 src/truetype/ttgload.c |    8 +++++---
 3 files changed, 16 insertions(+), 5 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 0c689c0..19f0926 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2015-09-16  Werner Lemberg  <address@hidden>
+
+       Minor fixes for some clang warnings.
+
+       * src/base/ftoutln.c (FT_Outline_EmboldenXY): Cast, possible missing
+       initialization.
+
+       * src/truetype/ttgload.c (TT_Process_Composite_Component): Cast.
+
 2015-09-15  Werner Lemberg  <address@hidden>
 
        [type1, type42] Fix memory leaks (#45966).
diff --git a/src/base/ftoutln.c b/src/base/ftoutln.c
index cab0245..35cc9f5 100644
--- a/src/base/ftoutln.c
+++ b/src/base/ftoutln.c
@@ -935,7 +935,7 @@
     for ( c = 0; c < outline->n_contours; c++ )
     {
       FT_Vector  in, out, anchor, shift;
-      FT_Fixed   l_in, l_out, l_anchor, l, q, d;
+      FT_Fixed   l_in, l_out, l_anchor = 0, l, q, d;
       FT_Int     i, j, k;
 
 
@@ -952,7 +952,7 @@
         {
           out.x = points[j].x - points[i].x;
           out.y = points[j].y - points[i].y;
-          l_out = FT_Vector_NormLen( &out );
+          l_out = (FT_Fixed)FT_Vector_NormLen( &out );
 
           if ( l_out == 0 )
             continue;
diff --git a/src/truetype/ttgload.c b/src/truetype/ttgload.c
index 61951b4..a322d31 100644
--- a/src/truetype/ttgload.c
+++ b/src/truetype/ttgload.c
@@ -998,14 +998,16 @@
                                   FT_UInt      start_point,
                                   FT_UInt      num_base_points )
   {
-    FT_GlyphLoader  gloader    = loader->gloader;
+    FT_GlyphLoader  gloader = loader->gloader;
     FT_Outline      current;
     FT_Bool         have_scale;
     FT_Pos          x, y;
 
 
-    current.points   = gloader->base.outline.points + num_base_points;
-    current.n_points = gloader->base.outline.n_points - num_base_points;
+    current.points   = gloader->base.outline.points +
+                         num_base_points;
+    current.n_points = gloader->base.outline.n_points -
+                         (short)num_base_points;
 
     have_scale = FT_BOOL( subglyph->flags & ( WE_HAVE_A_SCALE     |
                                               WE_HAVE_AN_XY_SCALE |



reply via email to

[Prev in Thread] Current Thread [Next in Thread]