freetype-commit
[Top][All Lists]
Advanced

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

[freetype2] master ba06ada: [woff2] Fix compiler warnings.


From: Werner LEMBERG
Subject: [freetype2] master ba06ada: [woff2] Fix compiler warnings.
Date: Sun, 29 Sep 2019 07:29:35 -0400 (EDT)

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

    [woff2] Fix compiler warnings.
    
    Problem reported by Alexei.
    
    * src/sfnt/sfwoff2.c (reconstruct_glyf): Initialize `x_min'.
    (reconstruct_font): Initialize `num_hmetrics'.
    (woff2_open_font): Initialize `info'.
---
 ChangeLog          | 10 ++++++++++
 src/sfnt/sfwoff2.c |  7 +++----
 2 files changed, 13 insertions(+), 4 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 1904cda..f0ffdd9 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2019-09-29  Werner Lemberg  <address@hidden>
+
+       [woff2] Fix compiler warnings.
+
+       Problem reported by Alexei.
+
+       * src/sfnt/sfwoff2.c (reconstruct_glyf): Initialize `x_min'.
+       (reconstruct_font): Initialize `num_hmetrics'.
+       (woff2_open_font): Initialize `info'.
+
 2019-09-28  Werner Lemberg  <address@hidden>
 
        * src/sfnt/sfwoff2.c (woff2_open_font): Fix sanity check.
diff --git a/src/sfnt/sfwoff2.c b/src/sfnt/sfwoff2.c
index daa9a7c..ca602d1 100644
--- a/src/sfnt/sfwoff2.c
+++ b/src/sfnt/sfwoff2.c
@@ -927,7 +927,6 @@
     if ( FT_NEW_ARRAY( glyph_buf, glyph_buf_size ) )
       goto Fail;
 
-    info->x_mins = NULL;
     if ( FT_NEW_ARRAY( info->x_mins, num_glyphs ) )
       goto Fail;
 
@@ -938,7 +937,7 @@
       FT_Bool    have_bbox  = FALSE;
       FT_Byte    bbox_bitmap;
       FT_ULong   bbox_offset;
-      FT_UShort  x_min;
+      FT_UShort  x_min      = 0;
 
 
       /* Set `have_bbox'. */
@@ -1493,7 +1492,7 @@
     FT_ULong   checksum      = 0;
     FT_ULong   loca_checksum = 0;
     FT_Int     nn            = 0;
-    FT_UShort  num_hmetrics;
+    FT_UShort  num_hmetrics  = 0;
     FT_ULong   font_checksum = info->header_checksum;
     FT_Bool    is_glyf_xform = FALSE;
 
@@ -1727,7 +1726,7 @@
     FT_Int     face_index;
 
     WOFF2_HeaderRec  woff2;
-    WOFF2_InfoRec    info;
+    WOFF2_InfoRec    info         = { 0, 0, 0, NULL };
     WOFF2_Table      tables       = NULL;
     WOFF2_Table*     indices      = NULL;
     WOFF2_Table*     temp_indices = NULL;



reply via email to

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