ref: 22e812a8c4ffb8d9281570a559f60b7b27765ca9
parent: 29bac136cbdba649fe47b98d1384e88e87dd940c
author: Werner Lemberg <[email protected]>
date: Sun Mar 11 08:11:43 EST 2001
* src/pcf/pcfread.c: Put READ_Fields() always in a conditional to avoid compiler warnings.
--- 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 <[email protected]>
* TODO: New file.
--- a/src/pcf/pcfread.c
+++ b/src/pcf/pcfread.c
@@ -205,9 +205,10 @@
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 @@
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 @@
metric->descent = (FT_Short)compr_metric.descent - 0x80;
metric->attributes = 0;
- return error;
+ return FT_Err_Ok;
}
@@ -394,11 +396,15 @@
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 @@
!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 )