[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
This commit is contained in:
Quincey Koziol 2000-09-26 15:29:40 -05:00
parent d01a78001f
commit a61b205aff

View File

@ -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);