From 22e812a8c4ffb8d9281570a559f60b7b27765ca9 Mon Sep 17 00:00:00 2001 From: Werner Lemberg Date: Sun, 11 Mar 2001 13:11:43 +0000 Subject: [PATCH] * src/pcf/pcfread.c: Put READ_Fields() always in a conditional to avoid compiler warnings. --- ChangeLog | 3 +++ src/pcf/pcfread.c | 36 +++++++++++++++++++++++------------- 2 files changed, 26 insertions(+), 13 deletions(-) diff --git a/ChangeLog b/ChangeLog index 528b6174b..751665ae2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -2,6 +2,9 @@ * TODO: Updated. + * src/pcf/pcfread.c: Put READ_Fields() always in a conditional to + avoid compiler warnings. + 2001-03-10 Tom Kacvinsky * TODO: New file. diff --git a/src/pcf/pcfread.c b/src/pcf/pcfread.c index 67016eba4..f73346ad0 100644 --- a/src/pcf/pcfread.c +++ b/src/pcf/pcfread.c @@ -205,9 +205,10 @@ THE SOFTWARE. FT_Error error = FT_Err_Ok; - (void)READ_Fields( header, metric ); + if ( READ_Fields( header, metric ) ) + return error; - return error; + return FT_Err_Ok; } @@ -219,7 +220,8 @@ THE SOFTWARE. FT_Error error = FT_Err_Ok; - (void)READ_Fields( pcf_compressed_metric_header, &compr_metric ); + if ( READ_Fields( pcf_compressed_metric_header, &compr_metric ) ) + return error; metric->leftSideBearing = (FT_Short)compr_metric.leftSideBearing - 0x80; metric->rightSideBearing = (FT_Short)compr_metric.rightSideBearing - 0x80; @@ -228,7 +230,7 @@ THE SOFTWARE. metric->descent = (FT_Short)compr_metric.descent - 0x80; metric->attributes = 0; - return error; + return FT_Err_Ok; } @@ -394,11 +396,15 @@ THE SOFTWARE. for ( i = 0; i < nprops; i++ ) { if ( PCF_BYTE_ORDER( format ) == MSBFirst ) - (void)READ_Fields( pcf_property_msb_header, props + i ); + { + if ( READ_Fields( pcf_property_msb_header, props + i ) ) + goto Bail; + } else - (void)READ_Fields( pcf_property_header, props + i ); - if ( error ) - goto Bail; + { + if ( READ_Fields( pcf_property_header, props + i ) ) + goto Bail; + } } /* pad the property array */ @@ -811,12 +817,16 @@ THE SOFTWARE. !PCF_FORMAT_MATCH( format, PCF_ACCEL_W_INKBOUNDS ) ) goto Bail; - if ( PCF_BYTE_ORDER( format ) == MSBFirst ) - (void)READ_Fields( pcf_accel_msb_header , accel ); + if ( PCF_BYTE_ORDER( format ) == MSBFirst ) + { + if ( READ_Fields( pcf_accel_msb_header, accel ) ) + goto Bail; + } else - (void)READ_Fields( pcf_accel_header, accel ); - if ( error ) - goto Bail; + { + if ( READ_Fields( pcf_accel_header, accel ) ) + goto Bail; + } error = pcf_get_metric( stream, format, &(accel->minbounds) ); if ( error )