mirror of
https://github.com/HDFGroup/hdf5.git
synced 2025-03-13 16:47:58 +08:00
[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:
parent
d01a78001f
commit
a61b205aff
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user