From a3edbfa983ba609673bfbd8a35727d7c3524d25a Mon Sep 17 00:00:00 2001 From: Werner Lemberg Date: Mon, 14 Dec 2020 16:11:06 +0100 Subject: [PATCH] [type42] Pacify static analysis tools (#59682). * src/type42/t42objs.c (T42_Size_Init, T42_GlyphSlot_Init): Avoid warnings about uninitialized variables. --- ChangeLog | 7 +++++++ src/type42/t42objs.c | 6 ++++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index ddb0dd914..9a5796e92 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2020-12-14 Werner Lemberg + + [type42] Pacify static analysis tools (#59682). + + * src/type42/t42objs.c (T42_Size_Init, T42_GlyphSlot_Init): Avoid + warnings about uninitialized variables. + 2020-12-07 Werner Lemberg * builds/unix/configure.raw: Don't set `FT_DEBUG_LOGGING`. diff --git a/src/type42/t42objs.c b/src/type42/t42objs.c index 6acfcdf40..a06290fa1 100644 --- a/src/type42/t42objs.c +++ b/src/type42/t42objs.c @@ -510,7 +510,8 @@ error = FT_New_Size( t42face->ttf_face, &ttsize ); - t42size->ttsize = ttsize; + if ( !error ) + t42size->ttsize = ttsize; FT_Activate_Size( ttsize ); @@ -593,7 +594,8 @@ else { error = FT_New_GlyphSlot( t42face->ttf_face, &ttslot ); - slot->ttslot = ttslot; + if ( !error ) + slot->ttslot = ttslot; } return error;