[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.
This commit is contained in:
Werner Lemberg 2012-08-27 11:23:41 +02:00
parent 06e31e9b5e
commit 328aa3b203
16 changed files with 50 additions and 27 deletions

View File

@ -1,3 +1,26 @@
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.

View File

@ -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_; \

View File

@ -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; \
\
\

View File

@ -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; \
\

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;