diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2010-04-27 20:06:15 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2010-04-27 20:06:15 (GMT) |
commit | 9542a0e21258dc9a6cddd2768312e66a4e9e2e12 (patch) | |
tree | 4b526763329c509ca81efe7384bfd79d2a286a25 /src/H5Dchunk.c | |
parent | 451887585360c787dec42da3ffdb65c519e6ef02 (diff) | |
download | hdf5-9542a0e21258dc9a6cddd2768312e66a4e9e2e12.zip hdf5-9542a0e21258dc9a6cddd2768312e66a4e9e2e12.tar.gz hdf5-9542a0e21258dc9a6cddd2768312e66a4e9e2e12.tar.bz2 |
[svn-r18639] Description:
Bring r18619:18638 from trunk to revise_chunks branch.
Tested on:
FreeBSD/32 6.3 (duty) w/debug
(h5committest not required on this branch)
Diffstat (limited to 'src/H5Dchunk.c')
-rw-r--r-- | src/H5Dchunk.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/H5Dchunk.c b/src/H5Dchunk.c index 7087166..c7baa65 100644 --- a/src/H5Dchunk.c +++ b/src/H5Dchunk.c @@ -406,7 +406,7 @@ H5D_chunk_construct(H5F_t UNUSED *f, H5D_t *dset) HGOTO_ERROR(H5E_DATASET, H5E_BADVALUE, FAIL, "external storage not supported with chunked layout") /* Set the last dimension of the chunk size to the size of the datatype */ - dset->shared->layout.u.chunk.dim[dset->shared->layout.u.chunk.ndims - 1] = H5T_GET_SIZE(type); + dset->shared->layout.u.chunk.dim[dset->shared->layout.u.chunk.ndims - 1] = (uint32_t)H5T_GET_SIZE(type); /* Get local copy of dataset dimensions (for sanity checking) */ if(H5S_get_simple_extent_dims(dset->shared->space, NULL, max_dim) < 0) @@ -1740,7 +1740,8 @@ H5D_chunk_read(H5D_io_info_t *io_info, const H5D_type_info_t *type_info, io_info->store->chunk.index = chunk_info->index; /* Compute # of bytes accessed in chunk */ - src_accessed_bytes = chunk_info->chunk_points * type_info->src_type_size; + H5_CHECK_OVERFLOW(type_info->src_type_size, /*From:*/ size_t, /*To:*/ uint32_t); + src_accessed_bytes = chunk_info->chunk_points * (uint32_t)type_info->src_type_size; /* Lock the chunk into the cache */ if(NULL == (chunk = H5D_chunk_lock(io_info, &udata, FALSE, &idx_hint))) @@ -1872,7 +1873,8 @@ H5D_chunk_write(H5D_io_info_t *io_info, const H5D_type_info_t *type_info, io_info->store->chunk.index = chunk_info->index; /* Compute # of bytes accessed in chunk */ - dst_accessed_bytes = chunk_info->chunk_points * type_info->dst_type_size; + H5_CHECK_OVERFLOW(type_info->dst_type_size, /*From:*/ size_t, /*To:*/ uint32_t); + dst_accessed_bytes = chunk_info->chunk_points * (uint32_t)type_info->dst_type_size; /* Determine if we will access all the data in the chunk */ if(dst_accessed_bytes != ctg_store.contig.dset_size || |