summaryrefslogtreecommitdiffstats
path: root/tools/src/misc/h5clear.c
diff options
context:
space:
mode:
authorDavid Young <dyoung@hdfgroup.org>2020-07-30 23:15:09 (GMT)
committerDavid Young <dyoung@hdfgroup.org>2020-07-30 23:15:09 (GMT)
commit0bb87534a6a78d5a5bddd84b9aa4867826368d8b (patch)
tree830d41498d87478ea8cc22e2f6e36011008e8c6e /tools/src/misc/h5clear.c
parent3e91eeb270efaa2075c80e81895066bccf1b1a47 (diff)
parent88aa0d5c76545eabf08be069a684fd7328eb4185 (diff)
downloadhdf5-0bb87534a6a78d5a5bddd84b9aa4867826368d8b.zip
hdf5-0bb87534a6a78d5a5bddd84b9aa4867826368d8b.tar.gz
hdf5-0bb87534a6a78d5a5bddd84b9aa4867826368d8b.tar.bz2
Merge remote-tracking branch 'hdffv/develop' into rebased-fprintf-experiment
Diffstat (limited to 'tools/src/misc/h5clear.c')
-rw-r--r--tools/src/misc/h5clear.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/tools/src/misc/h5clear.c b/tools/src/misc/h5clear.c
index b81e2b3..3bd570a 100644
--- a/tools/src/misc/h5clear.c
+++ b/tools/src/misc/h5clear.c
@@ -266,14 +266,9 @@ main (int argc, const char *argv[])
h5tools_setprogname(PROGRAMNAME);
h5tools_setstatus(EXIT_SUCCESS);
- /* Disable the HDF5 library's error reporting */
- H5Eset_auto2(H5E_DEFAULT, NULL, NULL);
-
/* initialize h5tools lib */
h5tools_init();
- H5Eset_auto2(H5tools_ERR_STACK_g, NULL, NULL);
-
/* Parse command line options */
if(parse_command_line(argc, argv) < 0)
goto done;
@@ -281,6 +276,9 @@ main (int argc, const char *argv[])
if(fname_g == NULL)
goto done;
+ /* enable error reporting if command line option */
+ h5tools_error_report();
+
/* Print usage/exit if not using at least one of the options */
if(!clear_status_flags && !remove_cache_image &&
!increment_eoa_eof && !print_filesize) {
@@ -387,7 +385,6 @@ main (int argc, const char *argv[])
warn_msg("No cache image in the file\n");
}
-
h5tools_setstatus(EXIT_SUCCESS);
done: