summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2000-09-26 20:29:40 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2000-09-26 20:29:40 (GMT)
commita61b205aff182dac910918c8d72c8575791aa66c (patch)
treedfbe43847c3c1b0851fde36c70dfcce6105e7d2e
parentd01a78001faa924fd31ae27bb748648442c8913a (diff)
downloadhdf5-a61b205aff182dac910918c8d72c8575791aa66c.zip
hdf5-a61b205aff182dac910918c8d72c8575791aa66c.tar.gz
hdf5-a61b205aff182dac910918c8d72c8575791aa66c.tar.bz2
[svn-r2597] Purpose:
Fix compiler warning Description: "HUGE_VAL" (a double value) was being put into a float type and generating a warning during compile time. Solution: Replaced "HUGE_VAL" with "FLT_MAX" Platforms tested: FreeBSD 4.1
-rw-r--r--src/H5Tconv.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/H5Tconv.c b/src/H5Tconv.c
index 9cab897..16883b1 100644
--- a/src/H5Tconv.c
+++ b/src/H5Tconv.c
@@ -5904,12 +5904,12 @@ H5T_conv_double_float (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
if (*((double*)s) > FLT_MAX) {
if (!H5T_overflow_g ||
(H5T_overflow_g)(src_id, dst_id, s, d)<0) {
- *((float*)d) = HUGE_VAL;
+ *((float*)d) = FLT_MAX;
}
} else if (*((double*)s) < -FLT_MAX) {
if (!H5T_overflow_g ||
(H5T_overflow_g)(src_id, dst_id, s, d)<0) {
- *((float*)d) = -HUGE_VAL;
+ *((float*)d) = -FLT_MAX;
}
} else {
*((float*)d) = *((double*)s);