diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2010-04-27 18:25:31 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2010-04-27 18:25:31 (GMT) |
commit | f79ab3b26bbe4a1d5de07970b884c790418815ec (patch) | |
tree | 4d948bf9f5dec34eca32ea41c4b91c15de22cedf /src/H5Dcompact.c | |
parent | b0d7349fe8a075bc6fd354d2b8afa1362b6de88b (diff) | |
download | hdf5-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/H5Dcompact.c')
-rw-r--r-- | src/H5Dcompact.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/H5Dcompact.c b/src/H5Dcompact.c index 2c61a6d..128b07e 100644 --- a/src/H5Dcompact.c +++ b/src/H5Dcompact.c @@ -172,7 +172,8 @@ done: static herr_t H5D_compact_construct(H5F_t *f, H5D_t *dset) { - hssize_t tmp_size; /* Temporary holder for raw data size */ + hssize_t stmp_size; /* Temporary holder for raw data size */ + hsize_t tmp_size; /* Temporary holder for raw data size */ hsize_t max_comp_data_size; /* Max. allowed size of compact data */ herr_t ret_value = SUCCEED; /* Return value */ @@ -186,7 +187,11 @@ H5D_compact_construct(H5F_t *f, H5D_t *dset) * Compact dataset is stored in dataset object header message of * layout. */ - tmp_size = H5S_GET_EXTENT_NPOINTS(dset->shared->space) * H5T_get_size(dset->shared->type); + stmp_size = H5S_GET_EXTENT_NPOINTS(dset->shared->space); + HDassert(stmp_size >= 0); + tmp_size = H5T_get_size(dset->shared->type); + HDassert(tmp_size > 0); + tmp_size = tmp_size * (hsize_t)stmp_size; H5_ASSIGN_OVERFLOW(dset->shared->layout.storage.u.compact.size, tmp_size, hssize_t, size_t); /* Verify data size is smaller than maximum header message size |