diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2012-10-17 19:31:44 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2012-10-17 19:31:44 (GMT) |
commit | 14d87e20ff975e1849282a826e83a8c712e0b1ae (patch) | |
tree | 9a38f1f31643a27f3508ae26efdfef53169f824b /tools/h5dump | |
parent | e1fb770277310eefbbe0650656e3007366ddf585 (diff) | |
download | hdf5-14d87e20ff975e1849282a826e83a8c712e0b1ae.zip hdf5-14d87e20ff975e1849282a826e83a8c712e0b1ae.tar.gz hdf5-14d87e20ff975e1849282a826e83a8c712e0b1ae.tar.bz2 |
[svn-r22916] Description:
Bring r22915 from trunk to 1.8 branch:
Bring Coverity changes back to trunk:
r20399:
Change parse_command_line to free hand structure on error and only "leave()" at end of main.
r20400:
Purpose: Fix coverity issue 592
Description: Added void cast to call to H5F_sfile_assert_num() in
H5F_term)interface(). There is no need to check the return value of this
function in general, and there would be nothing to do even if it did fail.
r20401:
Added free(src_sizes) and free(src_offset). --gh
Tested on:
Mac OSX/64 10.8.2 (amazon) w/C++, FORTRAN, threadsafe
(too minor for h5committest)
Diffstat (limited to 'tools/h5dump')
-rw-r--r-- | tools/h5dump/h5dump.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/tools/h5dump/h5dump.c b/tools/h5dump/h5dump.c index 2921fb9..85d3bc8 100644 --- a/tools/h5dump/h5dump.c +++ b/tools/h5dump/h5dump.c @@ -932,7 +932,7 @@ parse_mask_list(const char *h_list) static void free_handler(struct handler_t *hand, int len) { - register int i; + int i; if(hand) { for (i = 0; i < len; i++) { @@ -1293,7 +1293,7 @@ parse_start: if (s->count.data) { HDfree(s->count.data); s->count.data = NULL; - } + } parse_hsize_list(opt_arg, &s->count); break; case 'k': @@ -1423,6 +1423,7 @@ main(int argc, const char *argv[]) /* Initialize h5tools lib */ h5tools_init(); + /* Disable tools error reporting */ H5Eget_auto2(H5tools_ERR_STACK_g, &tools_func, &tools_edata); H5Eset_auto2(H5tools_ERR_STACK_g, NULL, NULL); @@ -1449,28 +1450,28 @@ main(int argc, const char *argv[]) "to display selected objects"); h5tools_setstatus(EXIT_FAILURE); goto done; - } + } else if (display_bb) { error_msg("option \"%s\" not available for XML\n", "--boot-block"); h5tools_setstatus(EXIT_FAILURE); goto done; - } + } else if (display_oid == 1) { error_msg("option \"%s\" not available for XML\n", "--object-ids"); h5tools_setstatus(EXIT_FAILURE); goto done; - } + } else if (display_char == TRUE) { error_msg("option \"%s\" not available for XML\n", "--string"); h5tools_setstatus(EXIT_FAILURE); goto done; - } + } else if (usingdasho) { error_msg("option \"%s\" not available for XML\n", "--output"); h5tools_setstatus(EXIT_FAILURE); goto done; } - } + } else { if (xml_dtd_uri) { warn_msg("option \"%s\" only applies with XML: %s\n", "--xml-dtd", xml_dtd_uri); |