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.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94
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 )