diff options
author | MuQun Yang <ymuqun@hdfgroup.org> | 2002-05-06 16:44:06 (GMT) |
---|---|---|
committer | MuQun Yang <ymuqun@hdfgroup.org> | 2002-05-06 16:44:06 (GMT) |
commit | b757e8f9ace4b56418ecacf0376971bea847fa4f (patch) | |
tree | eeb6bac44358acb5b93b1806c412ea9a065d51d8 /src/H5Tconv.c | |
parent | 3239989544c0f822fbf05642c0efc924234449b5 (diff) | |
download | hdf5-b757e8f9ace4b56418ecacf0376971bea847fa4f.zip hdf5-b757e8f9ace4b56418ecacf0376971bea847fa4f.tar.gz hdf5-b757e8f9ace4b56418ecacf0376971bea847fa4f.tar.bz2 |
[svn-r5359]
Purpose:
1. code clean-up
2. bug fix
Description:
1. windows complian data casting from large size to small size
use H5_ASSIGN_OVERFLOW and H5_CHECK_OVERFLOW to erase some warnings
2. in H5TB.c, cmp_addr is used to compare two different address. However, cmp_addr is defined as
an unsigned integer which may cause problems when the difference is negative.
Solution:
2. Use H5Fcmp_address macro to replace cmp_addr in H5TB.c.
Platforms tested:
linux 2.2.18 and windows 2000
Diffstat (limited to 'src/H5Tconv.c')
-rw-r--r-- | src/H5Tconv.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/H5Tconv.c b/src/H5Tconv.c index 6db7550..0a6a49a 100644 --- a/src/H5Tconv.c +++ b/src/H5Tconv.c @@ -1465,8 +1465,8 @@ H5T_conv_struct(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, hsize_t nelmts, src_delta = src->size; bkg_stride = dst->size; } else { - src_delta = -(src->size); - bkg_stride = -(dst->size); + src_delta = -(int)(src->size);/*overflow shouldn't be possible */ + bkg_stride = -(int)(dst->size);/*overflow shouldn't be possible */ xbuf += (nelmts-1) * src->size; xbkg += (nelmts-1) * dst->size; } |