diff options
author | Allen Byrne <byrn@hdfgroup.org> | 2017-10-18 19:03:27 (GMT) |
---|---|---|
committer | Allen Byrne <byrn@hdfgroup.org> | 2017-10-18 19:03:27 (GMT) |
commit | cf3342f8fc53108e831b208d8ccb48628fb23e51 (patch) | |
tree | bfaab707066a9625899fb93cc2f300dfed0ee2f9 /tools/lib | |
parent | 78a5870680770a8827c0e1e805688be30d1a33a7 (diff) | |
download | hdf5-cf3342f8fc53108e831b208d8ccb48628fb23e51.zip hdf5-cf3342f8fc53108e831b208d8ccb48628fb23e51.tar.gz hdf5-cf3342f8fc53108e831b208d8ccb48628fb23e51.tar.bz2 |
Fix tools error handling and valgrind issues
Diffstat (limited to 'tools/lib')
-rw-r--r-- | tools/lib/h5diff_dset.c | 4 | ||||
-rw-r--r-- | tools/lib/h5tools_filters.c | 8 |
2 files changed, 7 insertions, 5 deletions
diff --git a/tools/lib/h5diff_dset.c b/tools/lib/h5diff_dset.c index bea008c..b03295b 100644 --- a/tools/lib/h5diff_dset.c +++ b/tools/lib/h5diff_dset.c @@ -74,8 +74,10 @@ hsize_t diff_dataset(hid_t file1_id, else if (status < 0) { HGOTO_ERROR(1, H5E_tools_min_id_g, "h5tools_canreadf failed"); } - else + else { + ret_value = 1; opts->not_cmp = 1; + } done: opts->err_stat = opts->err_stat | ret_value; diff --git a/tools/lib/h5tools_filters.c b/tools/lib/h5tools_filters.c index 132e69a..db61d51 100644 --- a/tools/lib/h5tools_filters.c +++ b/tools/lib/h5tools_filters.c @@ -18,7 +18,7 @@ * print a warning message *------------------------------------------------------------------------- */ -static void print_warning(const char *dname, const char *fname) +static void print_filter_warning(const char *dname, const char *fname) { fprintf(stderr, "Warning: dataset <%s> cannot be read, %s filter is not available\n", @@ -73,7 +73,7 @@ h5tools_canreadf(const char* name, /* object name, serves also as boolean pr } else if (!udfilter_avail) { if (name) - print_warning(name, "user defined"); + print_filter_warning(name, "user defined"); ret_value = 0; } break; @@ -85,7 +85,7 @@ h5tools_canreadf(const char* name, /* object name, serves also as boolean pr case H5Z_FILTER_DEFLATE: #ifndef H5_HAVE_FILTER_DEFLATE if (name) - print_warning(name,"deflate"); + print_filter_warning(name,"deflate"); ret_value = 0; #endif break; @@ -96,7 +96,7 @@ h5tools_canreadf(const char* name, /* object name, serves also as boolean pr case H5Z_FILTER_SZIP: #ifndef H5_HAVE_FILTER_SZIP if (name) - print_warning(name,"SZIP"); + print_filter_warning(name,"SZIP"); ret_value = 0; #endif break; |