summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2001-02-09 16:00:45 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2001-02-09 16:00:45 (GMT)
commit9461e6875024a5636fef274ea7704693e4d11bb9 (patch)
treed8e4c4f8d8fa738a8cd3fdfdda8d2c4e4e138fa3 /src
parent75d07f2adda7c5db6b09899a0edbb40bb063b2d8 (diff)
downloadhdf5-9461e6875024a5636fef274ea7704693e4d11bb9.zip
hdf5-9461e6875024a5636fef274ea7704693e4d11bb9.tar.gz
hdf5-9461e6875024a5636fef274ea7704693e4d11bb9.tar.bz2
[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)
Diffstat (limited to 'src')
-rw-r--r--src/H5Tconv.c4
1 files changed, 3 insertions, 1 deletions
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