ref: 328aa3b203fc061c207fb01e9cbabea7cb3c9272
parent: 06e31e9b5e210a498067d392f27c81aa0199b4bf
author: Werner Lemberg <[email protected]>
date: Mon Aug 27 07:23:41 EDT 2012
[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.
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,28 @@
2012-08-27 Werner Lemberg <[email protected]>
+ [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 <[email protected]>
+
[truetype] Fix compilation warning.
* src/truetype/ttgload.c (IS_HINTED): Move macro to...
--- a/include/freetype/internal/ftdriver.h
+++ b/include/freetype/internal/ftdriver.h
@@ -415,7 +415,7 @@
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 @@
interface_, \
init_, \
done_, \
- get_interface_) \
+ get_interface_ ) \
\
clazz->face_object_size = face_object_size_; \
clazz->size_object_size = size_object_size_; \
--- a/include/freetype/internal/ftobjs.h
+++ b/include/freetype/internal/ftobjs.h
@@ -1282,7 +1282,7 @@
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_Module_Class** output_class ) \
{ \
FT_Memory memory = library->memory; \
- FT_Module_Class* clazz; \
+ FT_Module_Class* clazz = NULL; \
FT_Error error; \
\
\
--- a/include/freetype/internal/ftserv.h
+++ b/include/freetype/internal/ftserv.h
@@ -288,7 +288,7 @@
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_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_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_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_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_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; \
\
--- 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;
--- 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;
--- 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;
--- 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;
--- 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;
--- 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;
--- 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;
--- 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;
--- 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;
--- 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;
--- 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;
--- 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;