summaryrefslogtreecommitdiffstats
path: root/src/H5Tconv.c
diff options
context:
space:
mode:
authorRaymond Lu <songyulu@hdfgroup.org>2005-08-17 15:05:08 (GMT)
committerRaymond Lu <songyulu@hdfgroup.org>2005-08-17 15:05:08 (GMT)
commitdc2bc37c39fd23acd22c6fbca48aca992862ed2c (patch)
tree36163850d2253b6a36aa88383cd598de1f3e23de /src/H5Tconv.c
parent7e33c92e6b2a61e219d1af5a45ce042f485cfb20 (diff)
downloadhdf5-dc2bc37c39fd23acd22c6fbca48aca992862ed2c.zip
hdf5-dc2bc37c39fd23acd22c6fbca48aca992862ed2c.tar.gz
hdf5-dc2bc37c39fd23acd22c6fbca48aca992862ed2c.tar.bz2
[svn-r11254] Purpose: Bug fix
Description: In some macro definition, some constant values like D_MIN and D_MAX were not casted to the destination type. They may cause problems for some system like TFLOPS. Solution: Cast them to destination type. Platforms tested: fuss - very simple changes.
Diffstat (limited to 'src/H5Tconv.c')
-rw-r--r--src/H5Tconv.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/H5Tconv.c b/src/H5Tconv.c
index 2076a7c..cb1c38a 100644
--- a/src/H5Tconv.c
+++ b/src/H5Tconv.c
@@ -328,7 +328,7 @@ H5FL_BLK_DEFINE_STATIC(array_seq);
} \
else \
*((DT*)D) = 0; \
- } else if (sizeof(ST)>sizeof(DT) && *((ST*)S) > (D_MAX)) { \
+ } else if (sizeof(ST)>sizeof(DT) && *((ST*)S) > (DT)(D_MAX)) { \
if(cb_struct.func) { \
H5T_conv_ret_t except_ret; /*callback return*/ \
\
@@ -389,7 +389,7 @@ H5FL_BLK_DEFINE_STATIC(array_seq);
#define H5T_CONV_us_CORE(S,D,STYPE,DTYPE,ST,DT,D_MIN,D_MAX) { \
/* Assumes memory format of unsigned & signed integers is same */ \
- if (*((ST*)S) > (D_MAX)) { \
+ if (*((ST*)S) > (DT)(D_MAX)) { \
if(cb_struct.func) { \
H5T_conv_ret_t except_ret; /*callback return*/ \
\
@@ -436,7 +436,7 @@ H5FL_BLK_DEFINE_STATIC(array_seq);
} \
else \
*((DT*)D) = (H5T_NATIVE_FLOAT_POS_INF_g); \
- } else if (*((ST*)S) < (D_MIN)) { \
+ } else if (*((ST*)S) < (DT)(D_MIN)) { \
if(cb_struct.func) { \
H5T_conv_ret_t except_ret; /*callback return*/ \
\