shithub: freetype+ttf2subf

Download patch

ref: a28bc4c71d6effcbb2f24734602d971b92ce5475
parent: a0911343eee9bbe6004bf97d5afba0f4849435b6
author: Wu, Chia-I (吳佳一) <[email protected]>
date: Tue Nov 29 21:39:10 EST 2005

* src/sfnt/ttcmap.c (tt_cmap4_char_map_binary,
tt_cmap12_char_map_binary): Fix compiler warnings.

git/fs: mount .git/fs: mount/attach disallowed
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2005-11-30  Chia-I Wu  <[email protected]>
+
+	* src/sfnt/ttcmap.c (tt_cmap4_char_map_binary,
+	tt_cmap12_char_map_binary): Fix compiler warnings.
+
 2005-11-29  Chia-I Wu  <[email protected]>
 
 	Major update to distinguish between unsorted and overlapped segments
--- a/src/sfnt/ttcmap.c
+++ b/src/sfnt/ttcmap.c
@@ -1044,10 +1044,14 @@
     p = cmap->data + 6;
     num_segs2 = FT_PAD_FLOOR( TT_PEEK_USHORT( p ), 2 );
 
+    if ( !num_segs2 )
+      return 0;
+
     num_segs = num_segs2 >> 1;
 
-    if ( !num_segs )
-      return 0;
+    /* make compiler happy */
+    mid = num_segs;
+    end = 0xFFFFU;
 
     if ( next )
       charcode++;
@@ -2052,6 +2056,10 @@
 
     if ( !num_groups )
       return 0;
+
+    /* make compiler happy */
+    mid = num_groups;
+    end = 0xFFFFFFFFUL;
 
     if ( next )
       char_code++;