summaryrefslogtreecommitdiffstats
path: root/src/H5Tconv.c
diff options
context:
space:
mode:
authorMuQun Yang <ymuqun@hdfgroup.org>2002-05-03 22:31:13 (GMT)
committerMuQun Yang <ymuqun@hdfgroup.org>2002-05-03 22:31:13 (GMT)
commit68d21ca78b509165fbf530ce34f6f904ad8dbd7c (patch)
tree87e17d180bf9d89929b954c4117521cd9829d091 /src/H5Tconv.c
parentc6ddcbe08cb9fd9679cdbd2304d4a4da9f2e9e1e (diff)
downloadhdf5-68d21ca78b509165fbf530ce34f6f904ad8dbd7c.zip
hdf5-68d21ca78b509165fbf530ce34f6f904ad8dbd7c.tar.gz
hdf5-68d21ca78b509165fbf530ce34f6f904ad8dbd7c.tar.bz2
[svn-r5350]
Purpose: code clean up to erase warnings on windows Description: most warnings are due to casting from data type of large size to that of small size Solution: Using H5_CHECK_OVERFLOW and H5_ASSIGN_OVERFLOW Platforms tested: linux 2.2.18 and windows 2000
Diffstat (limited to 'src/H5Tconv.c')
-rw-r--r--src/H5Tconv.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/H5Tconv.c b/src/H5Tconv.c
index b3c2e11..6db7550 100644
--- a/src/H5Tconv.c
+++ b/src/H5Tconv.c
@@ -2345,8 +2345,9 @@ H5T_conv_vlen(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, hsize_t nelmts,
/* Get length of sequences in bytes */
seq_len=(*(src->u.vlen.getlen))(src->u.vlen.f,s);
assert(seq_len>=0);
- src_size=seq_len*src_base_size;
- dst_size=seq_len*dst_base_size;
+ H5_CHECK_OVERFLOW(seq_len,hssize_t,size_t);
+ src_size=(size_t)seq_len*src_base_size;
+ dst_size=(size_t)seq_len*dst_base_size;
/* Check if conversion buffer is large enough, resize if
* necessary */
@@ -3203,7 +3204,8 @@ H5T_conv_f_f (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, hsize_t nelmts,
* accomodate that value. The mantissa of course is no
* longer normalized.
*/
- mrsh += 1-expo;
+ H5_ASSIGN_OVERFLOW(mrsh,(mrsh+1-expo),hssize_t,size_t);
+ /*mrsh += 1-expo;*/
expo = 0;
} else if (expo>=expo_max) {