Fix clang++ warnings.

* src/*: Initialize some variables to NULL.
This commit is contained in:
Werner Lemberg 2021-11-16 22:07:28 +01:00
parent e4f7673e46
commit 238245cd66
9 changed files with 16 additions and 16 deletions

View File

@ -3744,7 +3744,7 @@
FT_Error error; FT_Error error;
FT_Face face; FT_Face face;
FT_Memory memory; FT_Memory memory;
FT_CMap cmap; FT_CMap cmap = NULL;
if ( !clazz || !charmap || !charmap->face ) if ( !clazz || !charmap || !charmap->face )
@ -4459,7 +4459,7 @@
FT_Library library = module->library; FT_Library library = module->library;
FT_Memory memory = library->memory; FT_Memory memory = library->memory;
FT_Error error; FT_Error error;
FT_ListNode node; FT_ListNode node = NULL;
if ( FT_QNEW( node ) ) if ( FT_QNEW( node ) )

View File

@ -357,7 +357,7 @@
{ {
FT_Error error; FT_Error error;
FT_Memory memory; FT_Memory memory;
FTC_Manager manager; FTC_Manager manager = NULL;
if ( !library ) if ( !library )

2
src/cache/ftcmru.c vendored
View File

@ -237,7 +237,7 @@
FTC_MruNode *anode ) FTC_MruNode *anode )
{ {
FT_Error error; FT_Error error;
FTC_MruNode node; FTC_MruNode node = NULL;
FT_Memory memory = list->memory; FT_Memory memory = list->memory;

View File

@ -473,9 +473,9 @@
if ( cff && !cff->font_info ) if ( cff && !cff->font_info )
{ {
CFF_FontRecDict dict = &cff->top_font.font_dict; CFF_FontRecDict dict = &cff->top_font.font_dict;
FT_Memory memory = face->root.memory; FT_Memory memory = face->root.memory;
PS_FontInfoRec* font_info; PS_FontInfoRec* font_info = NULL;
if ( FT_QNEW( font_info ) ) if ( FT_QNEW( font_info ) )
@ -517,9 +517,9 @@
if ( cff && !cff->font_extra ) if ( cff && !cff->font_extra )
{ {
CFF_FontRecDict dict = &cff->top_font.font_dict; CFF_FontRecDict dict = &cff->top_font.font_dict;
FT_Memory memory = face->root.memory; FT_Memory memory = face->root.memory;
PS_FontExtraRec* font_extra; PS_FontExtraRec* font_extra = NULL;
FT_String* embedded_postscript; FT_String* embedded_postscript;

View File

@ -54,8 +54,8 @@
FT_Error* e, FT_Error* e,
FT_UInt stackSize ) FT_UInt stackSize )
{ {
FT_Error error; /* for FT_QNEW */ FT_Error error; /* for FT_QNEW */
CF2_Stack stack; CF2_Stack stack = NULL;
if ( FT_QNEW( stack ) ) if ( FT_QNEW( stack ) )

View File

@ -3171,7 +3171,7 @@
black_PRaster *araster ) black_PRaster *araster )
{ {
FT_Error error; FT_Error error;
black_PRaster raster; black_PRaster raster = NULL;
if ( !FT_NEW( raster ) ) if ( !FT_NEW( raster ) )

View File

@ -1177,7 +1177,7 @@
BSDF_PRaster* araster ) BSDF_PRaster* araster )
{ {
FT_Error error; FT_Error error;
BSDF_PRaster raster; BSDF_PRaster raster = NULL;
if ( !FT_NEW( raster ) ) if ( !FT_NEW( raster ) )

View File

@ -3710,7 +3710,7 @@
SDF_PRaster* araster ) SDF_PRaster* araster )
{ {
FT_Error error; FT_Error error;
SDF_PRaster raster; SDF_PRaster raster = NULL;
if ( !FT_NEW( raster ) ) if ( !FT_NEW( raster ) )

View File

@ -2151,7 +2151,7 @@ typedef ptrdiff_t FT_PtrDist;
gray_PRaster* araster ) gray_PRaster* araster )
{ {
FT_Error error; FT_Error error;
gray_PRaster raster; gray_PRaster raster = NULL;
if ( !FT_NEW( raster ) ) if ( !FT_NEW( raster ) )