summaryrefslogtreecommitdiffstats
path: root/src/H5Dchunk.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2010-04-27 18:25:31 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2010-04-27 18:25:31 (GMT)
commitf79ab3b26bbe4a1d5de07970b884c790418815ec (patch)
tree4d948bf9f5dec34eca32ea41c4b91c15de22cedf /src/H5Dchunk.c
parentb0d7349fe8a075bc6fd354d2b8afa1362b6de88b (diff)
downloadhdf5-f79ab3b26bbe4a1d5de07970b884c790418815ec.zip
hdf5-f79ab3b26bbe4a1d5de07970b884c790418815ec.tar.gz
hdf5-f79ab3b26bbe4a1d5de07970b884c790418815ec.tar.bz2
[svn-r18634] Description:
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 Linux/32 2.6 (jam) w/PGI compilers, w/default API=1.8.x, w/C++ & FORTRAN, w/threadsafe, in debug mode Linux/64-amd64 2.6 (amani) w/Intel compilers, w/default API=1.6.x, w/C++ & FORTRAN, in production mode Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN, w/szip filter, in production mode Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN, in production mode Linux/64-ia64 2.4 (tg-login3) w/parallel, w/FORTRAN, in debug mode Linux/64-amd64 2.6 (abe) w/parallel, w/FORTRAN, in production mode Mac OS X/32 10.6.3 (amazon) in debug mode Mac OS X/32 10.6.3 (amazon) w/C++ & FORTRAN, w/threadsafe, in production mode
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 ||