summaryrefslogtreecommitdiffstats
path: root/tools/lib/h5trav.c
diff options
context:
space:
mode:
authorLarry Knox <lrknox@hdfgroup.org>2019-12-24 21:12:08 (GMT)
committerLarry Knox <lrknox@hdfgroup.org>2019-12-24 21:12:08 (GMT)
commit5b9cf732caab9daa6ed1e00f2df4f5a792340196 (patch)
tree4c01c9bd71ba5e7d8d11b474f6896e6ffbf0416d /tools/lib/h5trav.c
parent646fc294078f560fc9bef784cb1c4e27cdc51f5b (diff)
parente0fa36bfe008c03365ce8ea94d705f8fdebccdf0 (diff)
downloadhdf5-5b9cf732caab9daa6ed1e00f2df4f5a792340196.zip
hdf5-5b9cf732caab9daa6ed1e00f2df4f5a792340196.tar.gz
hdf5-5b9cf732caab9daa6ed1e00f2df4f5a792340196.tar.bz2
Merge pull request #2203 in HDFFV/hdf5 from ~LRKNOX/hdf5_lrk:1.10/master to 1.10/masterhdf5-1_10_6
* commit 'e0fa36bfe008c03365ce8ea94d705f8fdebccdf0': (166 commits) Update release date strings in README.txt and release_docs/RELEASE.txt Add release note about using ompio instead of romio when collective writes fail with OpenMPI. Fixed typos, grammatical errors, etc. Expanded entry for S3 and HDFS VFDs. Moved Mac 10.11 and 10.12 from Supported Platforms to More Platforms Tested. Add qualification to RELEASE.txt regarding performance improvements Standalone doesn't use h5test implementation. Add missing note Update COPYING file with new HDF5 license. Update bin/config.guess and config.sub to current version available from git.savannah.gnu.org. Fix include to correct memory calls - big-endian issue. Revert BLDLIBDIR value in junit.sh.in. Corrections to CMake functions Update version for HDF5 1.10.6 release. Remove autom4te.cache directory that shouldn't have been added. Remove duplicate instance Fix merge issue HDFFV-10979 - fix global name clash Correct clang search and java include Latest date first in RELEASE.txt Update RELEASE.txt with performance improvements and Steven Varga's bugfix. Update version numbers for shared lib files according to api compatibility report. Created hdf5_1_10_6 branch for HDF5 1.10.6 release preparation. Set version to 1.10.6-pre1. Switched default maintainer mode to disabled and default build mode to production. Added files produced by autogen.sh to commit except for src/H5config.h.in~ and src/H5public.h~. ...
Diffstat (limited to 'tools/lib/h5trav.c')
-rw-r--r--tools/lib/h5trav.c42
1 files changed, 21 insertions, 21 deletions
diff --git a/tools/lib/h5trav.c b/tools/lib/h5trav.c
index 917d5f5..19911dc 100644
--- a/tools/lib/h5trav.c
+++ b/tools/lib/h5trav.c
@@ -184,7 +184,7 @@ traverse_cb(hid_t loc_id, const char *path, const H5L_info_t *linfo,
if(udata->is_absolute) {
size_t base_len = HDstrlen(udata->base_grp_name);
size_t add_slash = base_len ? ((udata->base_grp_name)[base_len - 1] != '/') : 1;
- size_t new_name_len = base_len + add_slash + HDstrlen(path) + 1;
+ size_t new_name_len = base_len + add_slash + HDstrlen(path) + 1 + 3; /* Extra "+3" to quiet GCC warning - 2019/07/05, QAK */
if(NULL == (new_name = (char*)HDmalloc(new_name_len)))
return(H5_ITER_ERROR);
@@ -823,14 +823,14 @@ trav_attr(hid_t
const char *buf = op_data->path;
if((strlen(buf)==1) && (*buf=='/'))
- printf(" %-10s %s%s", "attribute", buf, attr_name);
+ HDprintf(" %-10s %s%s", "attribute", buf, attr_name);
else
- printf(" %-10s %s/%s", "attribute", buf, attr_name);
+ HDprintf(" %-10s %s/%s", "attribute", buf, attr_name);
#ifdef H5TRAV_PRINT_SPACE
if(trav_verbosity < 2) {
#endif
- printf("\n");
+ HDprintf("\n");
#ifdef H5TRAV_PRINT_SPACE
}
else {
@@ -850,26 +850,26 @@ trav_attr(hid_t
switch(space_type) {
case H5S_SCALAR:
/* scalar dataspace */
- printf(" scalar\n");
+ HDprintf(" scalar\n");
break;
case H5S_SIMPLE:
/* simple dataspace */
- printf(" {");
+ HDprintf(" {");
for (i = 0; i < ndims; i++) {
- printf("%s" HSIZE_T_FORMAT, i?", ":"", size[i]);
+ HDprintf("%s" HSIZE_T_FORMAT, i?", ":"", size[i]);
}
- printf("}\n");
+ HDprintf("}\n");
break;
case H5S_NULL:
/* null dataspace */
- printf(" null\n");
+ HDprintf(" null\n");
break;
default:
/* Unknown dataspace type */
- printf(" unknown\n");
+ HDprintf(" unknown\n");
break;
} /* end switch */
@@ -903,21 +903,21 @@ trav_print_visit_obj(const char *path, const H5O_info_t *oinfo,
*/
switch(oinfo->type) {
case H5O_TYPE_GROUP:
- printf(" %-10s %s", "group", path);
+ HDprintf(" %-10s %s", "group", path);
break;
case H5O_TYPE_DATASET:
- printf(" %-10s %s", "dataset", path);
+ HDprintf(" %-10s %s", "dataset", path);
break;
case H5O_TYPE_NAMED_DATATYPE:
- printf(" %-10s %s", "datatype", path);
+ HDprintf(" %-10s %s", "datatype", path);
break;
case H5O_TYPE_UNKNOWN:
case H5O_TYPE_NTYPES:
default:
- printf(" %-10s %s", "unknown object type", path);
+ HDprintf(" %-10s %s", "unknown object type", path);
break;
} /* end switch */
@@ -927,14 +927,14 @@ trav_print_visit_obj(const char *path, const H5O_info_t *oinfo,
op_data.path = path;
/* Finish printing line about object */
- printf("\n");
+ HDprintf("\n");
if(trav_verbosity > 0)
H5Aiterate_by_name(print_udata->fid, path, trav_index_by, trav_index_order,
NULL, trav_attr, &op_data, H5P_DEFAULT);
}
else
/* Print the link's original name */
- printf(" -> %s\n", already_visited);
+ HDprintf(" -> %s\n", already_visited);
return(0);
} /* end trav_print_visit_obj() */
@@ -962,12 +962,12 @@ trav_print_visit_lnk(const char *path, const H5L_info_t *linfo, void *udata)
if(targbuf) {
if(H5Lget_val(print_udata->fid, path, targbuf, linfo->u.val_size + 1, H5P_DEFAULT) < 0)
targbuf[0] = 0;
- printf(" %-10s %s -> %s\n", "link", path, targbuf);
+ HDprintf(" %-10s %s -> %s\n", "link", path, targbuf);
HDfree(targbuf);
}
} /* end if */
else
- printf(" %-10s %s ->\n", "link", path);
+ HDprintf(" %-10s %s ->\n", "link", path);
break;
case H5L_TYPE_EXTERNAL:
@@ -981,12 +981,12 @@ trav_print_visit_lnk(const char *path, const H5L_info_t *linfo, void *udata)
if(H5Lget_val(print_udata->fid, path, targbuf, linfo->u.val_size + 1, H5P_DEFAULT) < 0)
targbuf[0] = 0;
if(H5Lunpack_elink_val(targbuf, linfo->u.val_size, NULL, &filename, &objname) >= 0)
- printf(" %-10s %s -> %s %s\n", "ext link", path, filename, objname);
+ HDprintf(" %-10s %s -> %s %s\n", "ext link", path, filename, objname);
HDfree(targbuf);
}
} /* end if */
else
- printf(" %-10s %s ->\n", "ext link", path);
+ HDprintf(" %-10s %s ->\n", "ext link", path);
break;
case H5L_TYPE_HARD:
@@ -996,7 +996,7 @@ trav_print_visit_lnk(const char *path, const H5L_info_t *linfo, void *udata)
case H5L_TYPE_ERROR:
case H5L_TYPE_MAX:
default:
- printf(" %-10s %s -> ???\n", "unknown type of UD link", path);
+ HDprintf(" %-10s %s -> ???\n", "unknown type of UD link", path);
break;
} /* end switch() */