Fix g++4.6 compiler warnings in module drivers. The background is same with previous commit. * src/truetype/ttgxvar.c (ft_var_readpackedpoints): Init `points'. (TT_Vary_Get_Glyph_Deltas): Init `delta_xy'. (TT_Get_MM_Var): Init `mmvar'. * src/type1/t1load.c (T1_Get_MM_Var): Ditto. * src/cff/cffdrivr.c (cff_ps_get_font_info): Init `font_info'. * src/cff/cffload.c (cff_index_get_pointers): Init `t'. (cff_font_load): Init `sub'. * src/cff/cffobjs.c (cff_size_init): Init `internal'. (cff_face_init): Init `cff'. * src/pfr/pfrload.c (pfr_extra_item_load_stem_snaps): Init `snaps'. * src/pcf/pcfread.c (pcf_get_properties): Init `properties'. (pcf_get_bitmaps): Init `offsets'. (pcf_get_encodings): Init `tmpEncoding'. * src/sfnt/ttload.c (tt_face_load_gasp): Init `gaspranges'. * src/sfnt/ttsbit.c (Load_SBit_Image): Init `components'. * src/cache/ftcmru.c (FTC_MruList_New): Init `node'. * src/gzip/ftgzip.c (FT_Stream_OpenGzip): Init `zip' and `zip_buff'. * src/lzw/ftlzw.c (FT_Stream_OpenLZW): Init `zip'. * src/bzip2/ftbzip2.c (FT_Stream_OpenBzip2): Init `zip'.
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 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275
diff --git a/ChangeLog b/ChangeLog
index d7a294b..11801cb 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,34 @@
2011-06-14 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+ Fix g++4.6 compiler warnings in module drivers.
+
+ The background is same with previous commit.
+
+ * src/truetype/ttgxvar.c (ft_var_readpackedpoints):
+ Init `points'. (TT_Vary_Get_Glyph_Deltas): Init
+ `delta_xy'. (TT_Get_MM_Var): Init `mmvar'.
+ * src/type1/t1load.c (T1_Get_MM_Var): Ditto.
+ * src/cff/cffdrivr.c (cff_ps_get_font_info): Init
+ `font_info'.
+ * src/cff/cffload.c (cff_index_get_pointers): Init `t'.
+ (cff_font_load): Init `sub'.
+ * src/cff/cffobjs.c (cff_size_init): Init `internal'.
+ (cff_face_init): Init `cff'.
+ * src/pfr/pfrload.c (pfr_extra_item_load_stem_snaps):
+ Init `snaps'.
+ * src/pcf/pcfread.c (pcf_get_properties): Init `properties'.
+ (pcf_get_bitmaps): Init `offsets'. (pcf_get_encodings):
+ Init `tmpEncoding'.
+ * src/sfnt/ttload.c (tt_face_load_gasp): Init `gaspranges'.
+ * src/sfnt/ttsbit.c (Load_SBit_Image): Init `components'.
+ * src/cache/ftcmru.c (FTC_MruList_New): Init `node'.
+ * src/gzip/ftgzip.c (FT_Stream_OpenGzip): Init `zip' and
+ `zip_buff'.
+ * src/lzw/ftlzw.c (FT_Stream_OpenLZW): Init `zip'.
+ * src/bzip2/ftbzip2.c (FT_Stream_OpenBzip2): Init `zip'.
+
+2011-06-14 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
+
[base] Fix g++4.6 compiler warnings in src/base/*.c.
Passing uninitialized pointer to FT_NEW() families is
diff --git a/src/bzip2/ftbzip2.c b/src/bzip2/ftbzip2.c
index 1daffb7..e443dc8 100644
--- a/src/bzip2/ftbzip2.c
+++ b/src/bzip2/ftbzip2.c
@@ -456,7 +456,7 @@
{
FT_Error error;
FT_Memory memory = source->memory;
- FT_BZip2File zip;
+ FT_BZip2File zip = NULL;
/*
diff --git a/src/cache/ftcmru.c b/src/cache/ftcmru.c
index 9944b58..5b11346 100644
--- a/src/cache/ftcmru.c
+++ b/src/cache/ftcmru.c
@@ -238,7 +238,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 39f04ee..4fd3436 100644
--- a/src/cff/cffdrivr.c
+++ b/src/cff/cffdrivr.c
@@ -328,7 +328,7 @@
if ( cff && cff->font_info == NULL )
{
CFF_FontRecDict dict = &cff->top_font.font_dict;
- PS_FontInfoRec *font_info;
+ PS_FontInfoRec *font_info = NULL;
FT_Memory memory = face->root.memory;
diff --git a/src/cff/cffload.c b/src/cff/cffload.c
index 000cbe3..98d8e1c 100644
--- a/src/cff/cffload.c
+++ b/src/cff/cffload.c
@@ -387,7 +387,7 @@
{
FT_Error error = CFF_Err_Ok;
FT_Memory memory = idx->stream->memory;
- FT_Byte** t;
+ FT_Byte** t = NULL;
FT_Byte* new_bytes = NULL;
@@ -1514,7 +1514,7 @@
if ( dict->cid_registry != 0xFFFFU )
{
CFF_IndexRec fd_index;
- CFF_SubFont sub;
+ CFF_SubFont sub = NULL;
FT_UInt idx;
diff --git a/src/cff/cffobjs.c b/src/cff/cffobjs.c
index fdb58a4..cd38676 100644
--- a/src/cff/cffobjs.c
+++ b/src/cff/cffobjs.c
@@ -161,7 +161,7 @@
{
CFF_Face face = (CFF_Face)cffsize->face;
CFF_Font font = (CFF_Font)face->extra.data;
- CFF_Internal internal;
+ CFF_Internal internal = NULL;
PS_PrivateRec priv;
FT_Memory memory = cffsize->face->memory;
@@ -568,7 +568,7 @@
/* now load and parse the CFF table in the file */
{
- CFF_Font cff;
+ CFF_Font cff = NULL;
CFF_FontRecDict dict;
FT_Memory memory = cffface->memory;
FT_Int32 flags;
diff --git a/src/gzip/ftgzip.c b/src/gzip/ftgzip.c
index 8d90979..52966ec 100644
--- a/src/gzip/ftgzip.c
+++ b/src/gzip/ftgzip.c
@@ -588,7 +588,7 @@
{
FT_Error error;
FT_Memory memory = source->memory;
- FT_GZipFile zip;
+ FT_GZipFile zip = NULL;
/*
@@ -628,7 +628,7 @@
if ( zip_size != 0 && zip_size < 40 * 1024 )
{
- FT_Byte* zip_buff;
+ FT_Byte* zip_buff = NULL;
if ( !FT_ALLOC( zip_buff, zip_size ) )
diff --git a/src/lzw/ftlzw.c b/src/lzw/ftlzw.c
index 0b798fe..7f25499 100644
--- a/src/lzw/ftlzw.c
+++ b/src/lzw/ftlzw.c
@@ -349,7 +349,7 @@
{
FT_Error error;
FT_Memory memory = source->memory;
- FT_LZWFile zip;
+ FT_LZWFile zip = NULL;
/*
diff --git a/src/pcf/pcfread.c b/src/pcf/pcfread.c
index f732623..f8c2a23 100644
--- a/src/pcf/pcfread.c
+++ b/src/pcf/pcfread.c
@@ -399,7 +399,7 @@ THE SOFTWARE.
PCF_Face face )
{
PCF_ParseProperty props = 0;
- PCF_Property properties;
+ PCF_Property properties = NULL;
FT_ULong nprops, i;
FT_ULong format, size;
FT_Error error;
@@ -663,9 +663,9 @@ THE SOFTWARE.
pcf_get_bitmaps( FT_Stream stream,
PCF_Face face )
{
- FT_Error error = PCF_Err_Ok;
- FT_Memory memory = FT_FACE(face)->memory;
- FT_Long* offsets;
+ FT_Error error = PCF_Err_Ok;
+ FT_Memory memory = FT_FACE(face)->memory;
+ FT_Long* offsets = NULL;
FT_Long bitmapSizes[GLYPHPADOPTIONS];
FT_ULong format, size;
FT_ULong nbitmaps, i, sizebitmaps = 0;
@@ -772,7 +772,7 @@ THE SOFTWARE.
int firstRow, lastRow;
int nencoding, encodingOffset;
int i, j;
- PCF_Encoding tmpEncoding, encoding = 0;
+ PCF_Encoding tmpEncoding = NULL, encoding = 0;
error = pcf_seek_to_table_type( stream,
diff --git a/src/pfr/pfrload.c b/src/pfr/pfrload.c
index e919fa5..325322e 100644
--- a/src/pfr/pfrload.c
+++ b/src/pfr/pfrload.c
@@ -476,7 +476,7 @@
PFR_PhyFont phy_font )
{
FT_UInt count, num_vert, num_horz;
- FT_Int* snaps;
+ FT_Int* snaps = NULL;
FT_Error error = PFR_Err_Ok;
FT_Memory memory = phy_font->memory;
diff --git a/src/sfnt/ttload.c b/src/sfnt/ttload.c
index 20bac73..5fb9aea 100644
--- a/src/sfnt/ttload.c
+++ b/src/sfnt/ttload.c
@@ -1213,7 +1213,7 @@
FT_Memory memory = stream->memory;
FT_UInt j,num_ranges;
- TT_GaspRange gaspranges;
+ TT_GaspRange gaspranges = NULL;
/* the gasp table is optional */
diff --git a/src/sfnt/ttsbit.c b/src/sfnt/ttsbit.c
index faa8f88..283ba7e 100644
--- a/src/sfnt/ttsbit.c
+++ b/src/sfnt/ttsbit.c
@@ -1343,7 +1343,7 @@
/* All right, we have a compound format. First of all, read */
/* the array of elements. */
{
- TT_SBit_Component components;
+ TT_SBit_Component components = NULL;
TT_SBit_Component comp;
FT_UShort num_components, count;
diff --git a/src/truetype/ttgxvar.c b/src/truetype/ttgxvar.c
index 47bb9fc..37bbe6d 100644
--- a/src/truetype/ttgxvar.c
+++ b/src/truetype/ttgxvar.c
@@ -123,7 +123,7 @@
ft_var_readpackedpoints( FT_Stream stream,
FT_UInt *point_cnt )
{
- FT_UShort *points;
+ FT_UShort *points = NULL;
FT_Int n;
FT_Int runcnt;
FT_Int i;
@@ -622,7 +622,7 @@
FT_Error error = TT_Err_Ok;
FT_ULong fvar_start;
FT_Int i, j;
- FT_MM_Var* mmvar;
+ FT_MM_Var* mmvar = NULL;
FT_Fixed* next_coords;
FT_String* next_name;
FT_Var_Axis* a;
@@ -1325,7 +1325,7 @@
FT_Stream stream = face->root.stream;
FT_Memory memory = stream->memory;
GX_Blend blend = face->blend;
- FT_Vector* delta_xy;
+ FT_Vector* delta_xy = NULL;
FT_Error error;
FT_ULong glyph_start;
diff --git a/src/type1/t1load.c b/src/type1/t1load.c
index c9b6c1d..09fe6ad 100644
--- a/src/type1/t1load.c
+++ b/src/type1/t1load.c
@@ -303,7 +303,7 @@
FT_MM_Var* *master )
{
FT_Memory memory = face->root.memory;
- FT_MM_Var *mmvar;
+ FT_MM_Var *mmvar = NULL;
FT_Multi_Master mmaster;
FT_Error error;
FT_UInt i;