summaryrefslogtreecommitdiffstats
path: root/tools/h5dump/h5dump_xml.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2012-10-19 17:54:22 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2012-10-19 17:54:22 (GMT)
commit74d0aa11adda90a62ea9fce563d926eb56857ac2 (patch)
tree3f83c58dc0a00e9805305d584f192effbe5f2fca /tools/h5dump/h5dump_xml.c
parent82dd00095e7ca97fd0d4636a79ad276284dc1bf5 (diff)
downloadhdf5-74d0aa11adda90a62ea9fce563d926eb56857ac2.zip
hdf5-74d0aa11adda90a62ea9fce563d926eb56857ac2.tar.gz
hdf5-74d0aa11adda90a62ea9fce563d926eb56857ac2.tar.bz2
[svn-r22929] Description:
Bring r22921 from trunk to 1.8 branch: Review Coverity changes and bring them back to trunk. (QK & JK) r20402: Added #includes for h5tools.y or h5tools_utils.h as required to remedy implicit function declarations which caused compiler warnings and coverity issues 703-4 and 708-11. r20414: This is related to the previous checkin r20399. There were incorrect updates which caused incorrect behavior when no file was given. Also possible segfault when handling hyperslab options. Simplify the code changes. r20449: Description: Modified H5E_walk2_cb to check return value of H5I_object_verify. r20450: fixed coverity 813 Tested on: Mac OSX/64 10.8.2 (amazon) w/C++, FORTRAN, debug & threadsafe (too minor to require h5committest)
Diffstat (limited to 'tools/h5dump/h5dump_xml.c')
-rw-r--r--tools/h5dump/h5dump_xml.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/h5dump/h5dump_xml.c b/tools/h5dump/h5dump_xml.c
index 1a29659..28264e7 100644
--- a/tools/h5dump/h5dump_xml.c
+++ b/tools/h5dump/h5dump_xml.c
@@ -3761,7 +3761,8 @@ xml_dump_dataset(hid_t did, const char *name, struct subset_t UNUSED * sset)
/* Print information about storage layout */
if (H5D_CHUNKED == H5Pget_layout(dcpl)) {
maxdims = H5Sget_simple_extent_ndims(space);
- chsize = (hsize_t *) HDmalloc(maxdims * sizeof(hsize_t));
+ HDassert(maxdims >= 0);
+ chsize = (hsize_t *)HDmalloc((size_t)maxdims * sizeof(hsize_t));
ctx.indent_level++;
dump_indent += COL;