summaryrefslogtreecommitdiffstats
path: root/src/H5Tconv.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2003-01-17 20:34:14 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2003-01-17 20:34:14 (GMT)
commit1208e94eff8223d5c68bd7d50c4b885df222122a (patch)
treee740ea0e3b23176f5e194d7e98def93ec33d5b0e /src/H5Tconv.c
parent6f667500c1f163a7fd9cb15945078c3fef622ab1 (diff)
downloadhdf5-1208e94eff8223d5c68bd7d50c4b885df222122a.zip
hdf5-1208e94eff8223d5c68bd7d50c4b885df222122a.tar.gz
hdf5-1208e94eff8223d5c68bd7d50c4b885df222122a.tar.bz2
[svn-r6296] Purpose:
Code cleanup Description: Reduce warnings on Windows Platforms tested: FreeBSD 4.7 (sleipnir)
Diffstat (limited to 'src/H5Tconv.c')
-rw-r--r--src/H5Tconv.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/src/H5Tconv.c b/src/H5Tconv.c
index a1df8e8..affa795 100644
--- a/src/H5Tconv.c
+++ b/src/H5Tconv.c
@@ -2272,16 +2272,13 @@ H5T_conv_vlen(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, hsize_t nelmts,
uint8_t *tmp=bg_ptr;
UINT32DECODE(tmp, bg_seq_len);
if(bg_seq_len>0) {
- if(tmp_buf_size<bg_seq_len*MAX(src_base_size,
- dst_base_size)) {
- tmp_buf_size=bg_seq_len*MAX(src_base_size,
- dst_base_size);
- if((tmp_buf=H5FL_BLK_REALLOC(vlen_seq,tmp_buf,
- tmp_buf_size))==NULL)
+ H5_CHECK_OVERFLOW( bg_seq_len*MAX(src_base_size,dst_base_size) ,hsize_t,size_t);
+ if(tmp_buf_size<(size_t)(bg_seq_len*MAX(src_base_size, dst_base_size))) {
+ tmp_buf_size=bg_seq_len*MAX(src_base_size, dst_base_size);
+ if((tmp_buf=H5FL_BLK_REALLOC(vlen_seq,tmp_buf, tmp_buf_size))==NULL)
HGOTO_ERROR (H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed for type conversion");
}
- H5F_addr_decode(dst->u.vlen.f, (const uint8_t **)&tmp,
- &(bg_hobjid.addr));
+ H5F_addr_decode(dst->u.vlen.f, (const uint8_t **)&tmp, &(bg_hobjid.addr));
INT32DECODE(tmp, bg_hobjid.idx);
if(H5HG_read(dst->u.vlen.f,&bg_hobjid,tmp_buf)==NULL)
HGOTO_ERROR (H5E_DATATYPE, H5E_READERROR, FAIL, "can't read VL sequence into background buffer");