freetype-commit
[Top][All Lists]
Advanced

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

[freetype2] master 4cdbac0 43/43: Fix compiler warnings.


From: Werner LEMBERG
Subject: [freetype2] master 4cdbac0 43/43: Fix compiler warnings.
Date: Mon, 25 Sep 2017 03:29:31 -0400 (EDT)

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

    Fix compiler warnings.
    
    * src/psaux/psft.c (cf2_initLocalRegionBuffer): Remove redundant
    test.
    
    * src/psaux/psintrp.c (cf2_interpT2CharString)
    <cf2_escCALLOTHERSUBR>: Add casts.
    
    * src/psaux/psobjs.c (ps_decoder_init): Add cast.
---
 ChangeLog           | 12 ++++++++++++
 src/psaux/psft.c    |  2 +-
 src/psaux/psintrp.c |  8 ++++----
 src/psaux/psobjs.c  |  2 +-
 4 files changed, 18 insertions(+), 6 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 6930a85..459182d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,15 @@
+2017-09-25  Werner Lemberg  <address@hidden>
+
+       [psaux] Fix compiler warnings.
+
+       * src/psaux/psft.c (cf2_initLocalRegionBuffer): Remove redundant
+       test.
+
+       * src/psaux/psintrp.c (cf2_interpT2CharString)
+       <cf2_escCALLOTHERSUBR>: Add casts.
+
+       * src/psaux/psobjs.c (ps_decoder_init): Add cast.
+
 2017-09-25  Ewald Hew  <address@hidden>
 
        [psaux] Minor fixes.
diff --git a/src/psaux/psft.c b/src/psaux/psft.c
index 89e168a..8ddabc2 100644
--- a/src/psaux/psft.c
+++ b/src/psaux/psft.c
@@ -793,7 +793,7 @@
     FT_ZERO( buf );
 
     idx = (CF2_UInt)( subrNum + decoder->locals_bias );
-    if ( idx < 0 || idx >= decoder->num_locals )
+    if ( idx >= decoder->num_locals )
       return TRUE;     /* error */
 
     FT_ASSERT( decoder->locals );
diff --git a/src/psaux/psintrp.c b/src/psaux/psintrp.c
index 61fc8f8..9e67187 100644
--- a/src/psaux/psintrp.c
+++ b/src/psaux/psintrp.c
@@ -1642,9 +1642,9 @@
                     /* stack pointer as necessary                              
*/
 
                     count = cf2_stack_count( opStack );
-                    FT_ASSERT( arg_cnt <= count );
+                    FT_ASSERT( (CF2_UInt)arg_cnt <= count );
 
-                    opIdx += count - arg_cnt;
+                    opIdx += count - (CF2_UInt)arg_cnt;
 
                     known_othersubr_result_cnt = 0;
                     result_cnt = 0;
@@ -1840,7 +1840,7 @@
                         cf2_stack_setReal( opStack, values++, tmp );
                       }
                       cf2_stack_pop( opStack,
-                                     arg_cnt - num_points );
+                                     (CF2_UInt)arg_cnt - num_points );
 
                       known_othersubr_result_cnt = (FT_Int)num_points;
                       break;
@@ -2052,7 +2052,7 @@
                     default:
                       if ( arg_cnt >= 0 && subr_no >= 0 )
                       {
-                        FT_UInt  i;
+                        FT_Int  i;
 
                         FT_ERROR(( "cf2_interpT2CharString (Type 1 mode):"
                                    " unknown othersubr [%d %d], wish me 
luck\n",
diff --git a/src/psaux/psobjs.c b/src/psaux/psobjs.c
index 0baba7a..1b0b094 100644
--- a/src/psaux/psobjs.c
+++ b/src/psaux/psobjs.c
@@ -2368,7 +2368,7 @@
       ps_decoder->hint_mode          =  t1_decoder->hint_mode;
       ps_decoder->blend              =  t1_decoder->blend;
 
-      ps_decoder->num_locals         =  t1_decoder->num_subrs;
+      ps_decoder->num_locals         =  (FT_UInt)t1_decoder->num_subrs;
       ps_decoder->locals             =  t1_decoder->subrs;
       ps_decoder->locals_len         =  t1_decoder->subrs_len;
       ps_decoder->locals_hash        =  t1_decoder->subrs_hash;



reply via email to

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