freetype-commit
[Top][All Lists]
Advanced

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

[freetype2] master 20c6ef4: [smooth] Remove compiler warnings.


From: Werner LEMBERG
Subject: [freetype2] master 20c6ef4: [smooth] Remove compiler warnings.
Date: Tue, 21 Jun 2016 09:39:44 +0000 (UTC)

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

    [smooth] Remove compiler warnings.
    
    * src/smooth/ftgrays.c (gray_convert_glyph): Fix reports from clang.
---
 ChangeLog            |    6 ++++++
 src/smooth/ftgrays.c |   12 ++++++------
 2 files changed, 12 insertions(+), 6 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 14a7975..e64765d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2016-06-20  Werner Lemberg  <address@hidden>
+
+       [smooth] Remove compiler warnings.
+
+       * src/smooth/ftgrays.c (gray_convert_glyph): Fix reports from clang.
+
 2016-06-20  Alexei Podtelezhnikov  <address@hidden>
 
        [smooth] Sanitize memory managenent.
diff --git a/src/smooth/ftgrays.c b/src/smooth/ftgrays.c
index aef6a47..cf0cd13 100644
--- a/src/smooth/ftgrays.c
+++ b/src/smooth/ftgrays.c
@@ -1940,21 +1940,21 @@ typedef ptrdiff_t  FT_PtrDist;
 
         /* memory management */
         {
-          int    ycount = band->max - band->min;
-          int    cell_start;
+          unsigned long  ycount = (unsigned long)( band->max - band->min );
+          unsigned long  cell_start;
 
 
-          cell_start = ( ycount * sizeof( PCell ) + sizeof( TCell ) - 1 ) /
-                       sizeof( TCell );
+          cell_start = ( ycount * sizeof ( PCell ) + sizeof ( TCell ) - 1 ) /
+                       sizeof ( TCell );
 
           if ( FT_MAX_GRAY_POOL - cell_start < 2 )
             goto ReduceBands;
 
           ras.cells     = (PCell)ras.buffer + cell_start;
-          ras.max_cells = FT_MAX_GRAY_POOL - cell_start;
+          ras.max_cells = (FT_PtrDist)( FT_MAX_GRAY_POOL - cell_start );
 
           ras.ycells = (PCell*)ras.buffer;
-          ras.ycount = ycount;
+          ras.ycount = (TPos)ycount;
           while ( ycount )
             ras.ycells[--ycount] = NULL;
         }



reply via email to

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