[FT_CONFIG_OPTION_PIC] Fix g++ 4.6.2 compiler warnings. * include/freetype/internal/ftdriver.h (FT_DEFINE_DRIVER), include/freetype/internal/ftobjs.h (FT_DEFINE_RENDERER, FT_DEFINE_MODULE), include/freetype/internal/ftserv.h (FT_DEFINE_SERVICEDESCREC1, FT_DEFINE_SERVICEDESCREC2, FT_DEFINE_SERVICEDESCREC3, FT_DEFINE_SERVICEDESCREC4, FT_DEFINE_SERVICEDESCREC5, FT_DEFINE_SERVICEDESCREC6), src/autofit/afpic.c (autofit_module_class_pic_init), src/base/basepic.c (ft_base_pic_init), src/base/ftinit.c (ft_create_default_module_classes), src/cff/cffparse.c (FT_Create_Class_cff_field_handlers), src/cff/cffpic.c (cff_driver_class_pic_init), src/pshinter/pshpic.c (pshinter_module_class_pic_init), src/psnames/pspic.c (psnames_module_class_pic_init), src/raster/rastpic.c (ft_raster1_renderer_class_pic_init), src/sfnt/sfntpic.c (sfnt_module_class_pic_init), src/sfnt/ttcmap.c (FT_Create_Class_tt_cmap_classes), src/smooth/ftspic.c (ft_smooth_renderer_class_pic_init), src/truetype/ttpic.c (tt_driver_class_pic_init): Initialize allocation variable.
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 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336
diff --git a/ChangeLog b/ChangeLog
index 456abdf..bb715df 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,28 @@
2012-08-27 Werner Lemberg <wl@gnu.org>
+ [FT_CONFIG_OPTION_PIC] Fix g++ 4.6.2 compiler warnings.
+
+ * include/freetype/internal/ftdriver.h (FT_DEFINE_DRIVER),
+ include/freetype/internal/ftobjs.h (FT_DEFINE_RENDERER,
+ FT_DEFINE_MODULE), include/freetype/internal/ftserv.h
+ (FT_DEFINE_SERVICEDESCREC1, FT_DEFINE_SERVICEDESCREC2,
+ FT_DEFINE_SERVICEDESCREC3, FT_DEFINE_SERVICEDESCREC4,
+ FT_DEFINE_SERVICEDESCREC5, FT_DEFINE_SERVICEDESCREC6),
+ src/autofit/afpic.c (autofit_module_class_pic_init),
+ src/base/basepic.c (ft_base_pic_init), src/base/ftinit.c
+ (ft_create_default_module_classes), src/cff/cffparse.c
+ (FT_Create_Class_cff_field_handlers), src/cff/cffpic.c
+ (cff_driver_class_pic_init), src/pshinter/pshpic.c
+ (pshinter_module_class_pic_init), src/psnames/pspic.c
+ (psnames_module_class_pic_init), src/raster/rastpic.c
+ (ft_raster1_renderer_class_pic_init), src/sfnt/sfntpic.c
+ (sfnt_module_class_pic_init), src/sfnt/ttcmap.c
+ (FT_Create_Class_tt_cmap_classes), src/smooth/ftspic.c
+ (ft_smooth_renderer_class_pic_init), src/truetype/ttpic.c
+ (tt_driver_class_pic_init): Initialize allocation variable.
+
+2012-08-27 Werner Lemberg <wl@gnu.org>
+
[truetype] Fix compilation warning.
* src/truetype/ttgload.c (IS_HINTED): Move macro to...
diff --git a/include/freetype/internal/ftdriver.h b/include/freetype/internal/ftdriver.h
index 8d396be..093b14b 100644
--- a/include/freetype/internal/ftdriver.h
+++ b/include/freetype/internal/ftdriver.h
@@ -415,7 +415,7 @@ FT_BEGIN_HEADER
FT_Create_Class_ ## class_( FT_Library library, \
FT_Module_Class** output_class ) \
{ \
- FT_Driver_Class clazz; \
+ FT_Driver_Class clazz = NULL; \
FT_Error error; \
FT_Memory memory = library->memory; \
\
@@ -438,7 +438,7 @@ FT_BEGIN_HEADER
interface_, \
init_, \
done_, \
- get_interface_) \
+ get_interface_ ) \
\
clazz->face_object_size = face_object_size_; \
clazz->size_object_size = size_object_size_; \
diff --git a/include/freetype/internal/ftobjs.h b/include/freetype/internal/ftobjs.h
index a30e984..28132a4 100644
--- a/include/freetype/internal/ftobjs.h
+++ b/include/freetype/internal/ftobjs.h
@@ -1282,7 +1282,7 @@ FT_BEGIN_HEADER
FT_Create_Class_ ## class_( FT_Library library, \
FT_Module_Class** output_class ) \
{ \
- FT_Renderer_Class* clazz; \
+ FT_Renderer_Class* clazz = NULL; \
FT_Error error; \
FT_Memory memory = library->memory; \
\
@@ -1532,7 +1532,7 @@ FT_BEGIN_HEADER
FT_Module_Class** output_class ) \
{ \
FT_Memory memory = library->memory; \
- FT_Module_Class* clazz; \
+ FT_Module_Class* clazz = NULL; \
FT_Error error; \
\
\
diff --git a/include/freetype/internal/ftserv.h b/include/freetype/internal/ftserv.h
index 12bef6f..658b215 100644
--- a/include/freetype/internal/ftserv.h
+++ b/include/freetype/internal/ftserv.h
@@ -288,7 +288,7 @@ FT_BEGIN_HEADER
FT_Create_Class_ ## class_( FT_Library library, \
FT_ServiceDescRec** output_class ) \
{ \
- FT_ServiceDescRec* clazz; \
+ FT_ServiceDescRec* clazz = NULL; \
FT_Error error; \
FT_Memory memory = library->memory; \
\
@@ -324,7 +324,7 @@ FT_BEGIN_HEADER
FT_Create_Class_ ## class_( FT_Library library, \
FT_ServiceDescRec** output_class ) \
{ \
- FT_ServiceDescRec* clazz; \
+ FT_ServiceDescRec* clazz = NULL; \
FT_Error error; \
FT_Memory memory = library->memory; \
\
@@ -363,7 +363,7 @@ FT_BEGIN_HEADER
FT_Create_Class_ ## class_( FT_Library library, \
FT_ServiceDescRec** output_class ) \
{ \
- FT_ServiceDescRec* clazz; \
+ FT_ServiceDescRec* clazz = NULL; \
FT_Error error; \
FT_Memory memory = library->memory; \
\
@@ -405,7 +405,7 @@ FT_BEGIN_HEADER
FT_Create_Class_ ## class_( FT_Library library, \
FT_ServiceDescRec** output_class ) \
{ \
- FT_ServiceDescRec* clazz; \
+ FT_ServiceDescRec* clazz = NULL; \
FT_Error error; \
FT_Memory memory = library->memory; \
\
@@ -450,7 +450,7 @@ FT_BEGIN_HEADER
FT_Create_Class_ ## class_( FT_Library library, \
FT_ServiceDescRec** output_class ) \
{ \
- FT_ServiceDescRec* clazz; \
+ FT_ServiceDescRec* clazz = NULL; \
FT_Error error; \
FT_Memory memory = library->memory; \
\
@@ -498,7 +498,7 @@ FT_BEGIN_HEADER
FT_Create_Class_ ## class_( FT_Library library, \
FT_ServiceDescRec** output_class) \
{ \
- FT_ServiceDescRec* clazz; \
+ FT_ServiceDescRec* clazz = NULL; \
FT_Error error; \
FT_Memory memory = library->memory; \
\
diff --git a/src/autofit/afpic.c b/src/autofit/afpic.c
index a395fae..36a9cca 100644
--- a/src/autofit/afpic.c
+++ b/src/autofit/afpic.c
@@ -61,7 +61,7 @@
FT_PIC_Container* pic_container = &library->pic_container;
FT_UInt ss;
FT_Error error = AF_Err_Ok;
- AFModulePIC* container;
+ AFModulePIC* container = NULL;
FT_Memory memory = library->memory;
diff --git a/src/base/basepic.c b/src/base/basepic.c
index 912a80b..5268e7c 100644
--- a/src/base/basepic.c
+++ b/src/base/basepic.c
@@ -70,7 +70,7 @@
{
FT_PIC_Container* pic_container = &library->pic_container;
FT_Error error = FT_Err_Ok;
- BasePIC* container;
+ BasePIC* container = NULL;
FT_Memory memory = library->memory;
diff --git a/src/base/ftinit.c b/src/base/ftinit.c
index 91f8e2a..0d8b568 100644
--- a/src/base/ftinit.c
+++ b/src/base/ftinit.c
@@ -4,7 +4,7 @@
/* */
/* FreeType initialization layer (body). */
/* */
-/* Copyright 1996-2001, 2002, 2005, 2007, 2009, 2012 by */
+/* Copyright 1996-2002, 2005, 2007, 2009, 2012 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -156,7 +156,7 @@
{
FT_Error error;
FT_Memory memory;
- FT_Module_Class* *classes;
+ FT_Module_Class* *classes = NULL;
FT_Module_Class* clazz;
FT_UInt i;
BasePIC* pic_container = (BasePIC*)library->pic_container.base;
diff --git a/src/cff/cffparse.c b/src/cff/cffparse.c
index 3d5f8bf..10abcf0 100644
--- a/src/cff/cffparse.c
+++ b/src/cff/cffparse.c
@@ -735,7 +735,7 @@
FT_Create_Class_cff_field_handlers( FT_Library library,
CFF_Field_Handler** output_class )
{
- CFF_Field_Handler* clazz;
+ CFF_Field_Handler* clazz = NULL;
FT_Error error;
FT_Memory memory = library->memory;
diff --git a/src/cff/cffpic.c b/src/cff/cffpic.c
index 1c19d58..fe4fa49 100644
--- a/src/cff/cffpic.c
+++ b/src/cff/cffpic.c
@@ -4,7 +4,7 @@
/* */
/* The FreeType position independent code services for cff module. */
/* */
-/* Copyright 2009, 2010 by */
+/* Copyright 2009, 2010, 2012 by */
/* Oran Agra and Mickey Gabel. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -103,7 +103,7 @@
{
FT_PIC_Container* pic_container = &library->pic_container;
FT_Error error = CFF_Err_Ok;
- CffModulePIC* container;
+ CffModulePIC* container = NULL;
FT_Memory memory = library->memory;
diff --git a/src/pshinter/pshpic.c b/src/pshinter/pshpic.c
index 914d1fe..bf7f200 100644
--- a/src/pshinter/pshpic.c
+++ b/src/pshinter/pshpic.c
@@ -50,7 +50,7 @@
{
FT_PIC_Container* pic_container = &library->pic_container;
FT_Error error = PSH_Err_Ok;
- PSHinterPIC* container;
+ PSHinterPIC* container = NULL;
FT_Memory memory = library->memory;
diff --git a/src/psnames/pspic.c b/src/psnames/pspic.c
index fe099a6..dc5374b 100644
--- a/src/psnames/pspic.c
+++ b/src/psnames/pspic.c
@@ -65,7 +65,7 @@
{
FT_PIC_Container* pic_container = &library->pic_container;
FT_Error error = PSnames_Err_Ok;
- PSModulePIC* container;
+ PSModulePIC* container = NULL;
FT_Memory memory = library->memory;
diff --git a/src/raster/rastpic.c b/src/raster/rastpic.c
index 2883e3f..8532863 100644
--- a/src/raster/rastpic.c
+++ b/src/raster/rastpic.c
@@ -4,7 +4,7 @@
/* */
/* The FreeType position independent code services for raster module. */
/* */
-/* Copyright 2009, 2010 by */
+/* Copyright 2009, 2010, 2012 by */
/* Oran Agra and Mickey Gabel. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -51,7 +51,7 @@
{
FT_PIC_Container* pic_container = &library->pic_container;
FT_Error error = Raster_Err_Ok;
- RasterPIC* container;
+ RasterPIC* container = NULL;
FT_Memory memory = library->memory;
diff --git a/src/sfnt/sfntpic.c b/src/sfnt/sfntpic.c
index a886b44..220998e 100644
--- a/src/sfnt/sfntpic.c
+++ b/src/sfnt/sfntpic.c
@@ -28,7 +28,7 @@
/* forward declaration of PIC init functions from sfdriver.c */
FT_Error
FT_Create_Class_sfnt_services( FT_Library library,
- FT_ServiceDescRec** ouput_class );
+ FT_ServiceDescRec** output_class );
void
FT_Destroy_Class_sfnt_services( FT_Library library,
@@ -103,7 +103,7 @@
{
FT_PIC_Container* pic_container = &library->pic_container;
FT_Error error = SFNT_Err_Ok;
- sfntModulePIC* container;
+ sfntModulePIC* container = NULL;
FT_Memory memory = library->memory;
diff --git a/src/sfnt/ttcmap.c b/src/sfnt/ttcmap.c
index 2fedef3..f1504d6 100644
--- a/src/sfnt/ttcmap.c
+++ b/src/sfnt/ttcmap.c
@@ -3388,7 +3388,7 @@
FT_Create_Class_tt_cmap_classes( FT_Library library,
TT_CMap_Class** output_class )
{
- TT_CMap_Class* clazz;
+ TT_CMap_Class* clazz = NULL;
TT_CMap_ClassRec* recs;
FT_Error error;
FT_Memory memory = library->memory;
diff --git a/src/smooth/ftspic.c b/src/smooth/ftspic.c
index 601bcf9..4714828 100644
--- a/src/smooth/ftspic.c
+++ b/src/smooth/ftspic.c
@@ -4,7 +4,7 @@
/* */
/* The FreeType position independent code services for smooth module. */
/* */
-/* Copyright 2009, 2010 by */
+/* Copyright 2009, 2010, 2012 by */
/* Oran Agra and Mickey Gabel. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -53,7 +53,7 @@
{
FT_PIC_Container* pic_container = &library->pic_container;
FT_Error error = Smooth_Err_Ok;
- SmoothPIC* container;
+ SmoothPIC* container = NULL;
FT_Memory memory = library->memory;
diff --git a/src/truetype/ttpic.c b/src/truetype/ttpic.c
index 47e0758..faece4e 100644
--- a/src/truetype/ttpic.c
+++ b/src/truetype/ttpic.c
@@ -68,7 +68,7 @@
{
FT_PIC_Container* pic_container = &library->pic_container;
FT_Error error = TT_Err_Ok;
- TTModulePIC* container;
+ TTModulePIC* container = NULL;
FT_Memory memory = library->memory;