From 9461e6875024a5636fef274ea7704693e4d11bb9 Mon Sep 17 00:00:00 2001 From: Quincey Koziol Date: Fri, 9 Feb 2001 11:00:45 -0500 Subject: [svn-r3384] Purpose: Bug Fix Description: The 'carry' variable in the general floating point-to-floating point conversion routine wasn't getting initialized correctly and was causing problems while converting certain sequences of floating point numbers on the Cray SV1. Solution: Added 'else carry=0;' line to always reset the carry variable to a known value. Platforms tested: Cray SV1 (killeen) --- src/H5Tconv.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/H5Tconv.c b/src/H5Tconv.c index b9b90e9..ae4d9b8 100644 --- a/src/H5Tconv.c +++ b/src/H5Tconv.c @@ -2554,7 +2554,7 @@ H5T_conv_f_f (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, hsize_t nelmts, size_t msize=0; /*useful size of mantissa in src*/ size_t mpos; /*offset to useful mant is src */ size_t mrsh; /*amount to right shift mantissa*/ - hbool_t carry; /*carry after rounding mantissa */ + hbool_t carry=0; /*carry after rounding mantissa */ size_t i; /*miscellaneous counters */ hsize_t implied; /*destination implied bits */ @@ -2825,6 +2825,8 @@ H5T_conv_f_f (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, hsize_t nelmts, carry = H5T_bit_inc(s, mpos+bitno-1, 1+msize-bitno); if (carry) implied = 2; } + else + carry=0; /* * Write the mantissa to the destination -- cgit v0.12