summaryrefslogtreecommitdiffstats
path: root/src/H5Dchunk.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2010-04-27 18:33:36 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2010-04-27 18:33:36 (GMT)
commite4ee157c86ea837ba8297c50cefdc296e8401094 (patch)
tree834205bf56ec642aab0f022382fab69bb7c64c46 /src/H5Dchunk.c
parent53d5ccb17e75f4ce182f3d98f2b60891de07e716 (diff)
downloadhdf5-e4ee157c86ea837ba8297c50cefdc296e8401094.zip
hdf5-e4ee157c86ea837ba8297c50cefdc296e8401094.tar.gz
hdf5-e4ee157c86ea837ba8297c50cefdc296e8401094.tar.bz2
[svn-r18635] Description:
Bring r18634 from trunk to 1.8 branch: Clean up compiler warnings. Tested on: FreeBSD/32 6.3 (duty) in debug mode FreeBSD/64 6.3 (liberty) w/C++ & FORTRAN, in debug mode (h5committested on trunk)
Diffstat (limited to 'src/H5Dchunk.c')
-rw-r--r--src/H5Dchunk.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/H5Dchunk.c b/src/H5Dchunk.c
index aa7b8dc..aad39ee 100644
--- a/src/H5Dchunk.c
+++ b/src/H5Dchunk.c
@@ -1727,7 +1727,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)))
@@ -1859,7 +1860,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 ||