Commit d583561e1d674ef10116bc3dfdaf5591cd1a9a09

Werner Lemberg 2016-05-21T11:20:42

Minor clang++ fixes. * src/base/ftobjs.c (FT_Add_Module), src/psaux/psobjs.c (ps_parser_load_field), src/type1/t1load.c (parse_subrs): Add initializer. * src/cache/ftccache.h (FTC_CACHE_TRYLOOP_END): Avoid implicit conversion from NULL to boolean.

diff --git a/ChangeLog b/ChangeLog
index 130f5e7..76521e7 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,16 @@
 2016-05-21  Werner Lemberg  <wl@gnu.org>
 
+	Minor clang++ fixes.
+
+	* src/base/ftobjs.c (FT_Add_Module), src/psaux/psobjs.c
+	(ps_parser_load_field), src/type1/t1load.c (parse_subrs): Add
+	initializer.
+
+	* src/cache/ftccache.h (FTC_CACHE_TRYLOOP_END): Avoid implicit
+	conversion from NULL to boolean.
+
+2016-05-21  Werner Lemberg  <wl@gnu.org>
+
 	Work around a bug of the C 8.0.0.1 compiler on AIX 5.3 (#47955).
 
 	* include/freetype/internal/ftmemory.h (cplusplus_typeof): Use
diff --git a/src/base/ftobjs.c b/src/base/ftobjs.c
index ff6ac11..a41b771 100644
--- a/src/base/ftobjs.c
+++ b/src/base/ftobjs.c
@@ -4323,7 +4323,7 @@
   {
     FT_Error   error;
     FT_Memory  memory;
-    FT_Module  module;
+    FT_Module  module = NULL;
     FT_UInt    nn;
 
 
diff --git a/src/cache/ftccache.h b/src/cache/ftccache.h
index efe830d..1b12959 100644
--- a/src/cache/ftccache.h
+++ b/src/cache/ftccache.h
@@ -325,7 +325,7 @@ FT_BEGIN_HEADER
         break;                                                    \
                                                                   \
       _try_done = FTC_Manager_FlushN( _try_manager, _try_count ); \
-      if ( _try_done > 0 && ( list_changed ) )                    \
+      if ( _try_done > 0 && ( list_changed != NULL ) )            \
         *(FT_Bool*)( list_changed ) = TRUE;                       \
                                                                   \
       if ( _try_done == 0 )                                       \
diff --git a/src/psaux/psobjs.c b/src/psaux/psobjs.c
index 70f8fdd..f208b5f 100644
--- a/src/psaux/psobjs.c
+++ b/src/psaux/psobjs.c
@@ -1087,9 +1087,9 @@
 
     for ( ; count > 0; count--, idx++ )
     {
-      FT_Byte*    q = (FT_Byte*)objects[idx] + field->offset;
+      FT_Byte*    q      = (FT_Byte*)objects[idx] + field->offset;
       FT_Long     val;
-      FT_String*  string;
+      FT_String*  string = NULL;
 
 
       skip_spaces( &cur, limit );
@@ -1217,7 +1217,7 @@
       case T1_FIELD_TYPE_MM_BBOX:
         {
           FT_Memory  memory = parser->memory;
-          FT_Fixed*  temp;
+          FT_Fixed*  temp   = NULL;
           FT_Int     result;
           FT_UInt    i;
 
diff --git a/src/type1/t1load.c b/src/type1/t1load.c
index ccf00b4..c981adc 100644
--- a/src/type1/t1load.c
+++ b/src/type1/t1load.c
@@ -1544,7 +1544,7 @@
       /*                                                         */
       if ( face->type1.private_dict.lenIV >= 0 )
       {
-        FT_Byte*  temp;
+        FT_Byte*  temp = NULL;
 
 
         /* some fonts define empty subr records -- this is not totally */
@@ -1748,7 +1748,7 @@
         if ( face->type1.private_dict.lenIV >= 0 &&
              n < num_glyphs + TABLE_EXTEND       )
         {
-          FT_Byte*  temp;
+          FT_Byte*  temp = NULL;
 
 
           if ( size <= (FT_ULong)face->type1.private_dict.lenIV )