* src/pcf/pcfread.c: Put READ_Fields() always in a conditional to avoid compiler warnings.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92
diff --git a/ChangeLog b/ChangeLog
index 528b617..751665a 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 <tjk@ams.org>
* TODO: New file.
diff --git a/src/pcf/pcfread.c b/src/pcf/pcfread.c
index 67016eb..f73346a 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 )