Fix clang++ warnings. * src/*: Initialize some variables to NULL.
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 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145
diff --git a/src/base/ftobjs.c b/src/base/ftobjs.c
index 19f794e..ee51095 100644
--- a/src/base/ftobjs.c
+++ b/src/base/ftobjs.c
@@ -3744,7 +3744,7 @@
FT_Error error;
FT_Face face;
FT_Memory memory;
- FT_CMap cmap;
+ FT_CMap cmap = NULL;
if ( !clazz || !charmap || !charmap->face )
@@ -4459,7 +4459,7 @@
FT_Library library = module->library;
FT_Memory memory = library->memory;
FT_Error error;
- FT_ListNode node;
+ FT_ListNode node = NULL;
if ( FT_QNEW( node ) )
diff --git a/src/cache/ftcmanag.c b/src/cache/ftcmanag.c
index b4aee40..512de8a 100644
--- a/src/cache/ftcmanag.c
+++ b/src/cache/ftcmanag.c
@@ -357,7 +357,7 @@
{
FT_Error error;
FT_Memory memory;
- FTC_Manager manager;
+ FTC_Manager manager = NULL;
if ( !library )
diff --git a/src/cache/ftcmru.c b/src/cache/ftcmru.c
index 40bbfe1..2cac6f9 100644
--- a/src/cache/ftcmru.c
+++ b/src/cache/ftcmru.c
@@ -237,7 +237,7 @@
FTC_MruNode *anode )
{
FT_Error error;
- FTC_MruNode node;
+ FTC_MruNode node = NULL;
FT_Memory memory = list->memory;
diff --git a/src/cff/cffdrivr.c b/src/cff/cffdrivr.c
index b33435b..59210f3 100644
--- a/src/cff/cffdrivr.c
+++ b/src/cff/cffdrivr.c
@@ -473,9 +473,9 @@
if ( cff && !cff->font_info )
{
- CFF_FontRecDict dict = &cff->top_font.font_dict;
- FT_Memory memory = face->root.memory;
- PS_FontInfoRec* font_info;
+ CFF_FontRecDict dict = &cff->top_font.font_dict;
+ FT_Memory memory = face->root.memory;
+ PS_FontInfoRec* font_info = NULL;
if ( FT_QNEW( font_info ) )
@@ -517,9 +517,9 @@
if ( cff && !cff->font_extra )
{
- CFF_FontRecDict dict = &cff->top_font.font_dict;
- FT_Memory memory = face->root.memory;
- PS_FontExtraRec* font_extra;
+ CFF_FontRecDict dict = &cff->top_font.font_dict;
+ FT_Memory memory = face->root.memory;
+ PS_FontExtraRec* font_extra = NULL;
FT_String* embedded_postscript;
diff --git a/src/psaux/psstack.c b/src/psaux/psstack.c
index ca8d422..7974865 100644
--- a/src/psaux/psstack.c
+++ b/src/psaux/psstack.c
@@ -54,8 +54,8 @@
FT_Error* e,
FT_UInt stackSize )
{
- FT_Error error; /* for FT_QNEW */
- CF2_Stack stack;
+ FT_Error error; /* for FT_QNEW */
+ CF2_Stack stack = NULL;
if ( FT_QNEW( stack ) )
diff --git a/src/raster/ftraster.c b/src/raster/ftraster.c
index c886f7e..bfc059c 100644
--- a/src/raster/ftraster.c
+++ b/src/raster/ftraster.c
@@ -3171,7 +3171,7 @@
black_PRaster *araster )
{
FT_Error error;
- black_PRaster raster;
+ black_PRaster raster = NULL;
if ( !FT_NEW( raster ) )
diff --git a/src/sdf/ftbsdf.c b/src/sdf/ftbsdf.c
index 0f414c8..8da5c9d 100644
--- a/src/sdf/ftbsdf.c
+++ b/src/sdf/ftbsdf.c
@@ -1177,7 +1177,7 @@
BSDF_PRaster* araster )
{
FT_Error error;
- BSDF_PRaster raster;
+ BSDF_PRaster raster = NULL;
if ( !FT_NEW( raster ) )
diff --git a/src/sdf/ftsdf.c b/src/sdf/ftsdf.c
index 784e247..f69cf49 100644
--- a/src/sdf/ftsdf.c
+++ b/src/sdf/ftsdf.c
@@ -3710,7 +3710,7 @@
SDF_PRaster* araster )
{
FT_Error error;
- SDF_PRaster raster;
+ SDF_PRaster raster = NULL;
if ( !FT_NEW( raster ) )
diff --git a/src/smooth/ftgrays.c b/src/smooth/ftgrays.c
index 380aea3..a6af8b9 100644
--- a/src/smooth/ftgrays.c
+++ b/src/smooth/ftgrays.c
@@ -2151,7 +2151,7 @@ typedef ptrdiff_t FT_PtrDist;
gray_PRaster* araster )
{
FT_Error error;
- gray_PRaster raster;
+ gray_PRaster raster = NULL;
if ( !FT_NEW( raster ) )