summaryrefslogtreecommitdiffstats
path: root/tools/lib/h5tools_str.c
diff options
context:
space:
mode:
authorDana Robinson <43805+derobins@users.noreply.github.com>2022-07-13 15:53:00 (GMT)
committerGitHub <noreply@github.com>2022-07-13 15:53:00 (GMT)
commitb0d9fa058ad88f63e03638f8247814116b6a86bf (patch)
tree38ae1b680b9ced294f95c77a110b71dd4acef264 /tools/lib/h5tools_str.c
parentb2363a8195408331797cd32820fbb0dfc288f646 (diff)
downloadhdf5-b0d9fa058ad88f63e03638f8247814116b6a86bf.zip
hdf5-b0d9fa058ad88f63e03638f8247814116b6a86bf.tar.gz
hdf5-b0d9fa058ad88f63e03638f8247814116b6a86bf.tar.bz2
Fix for a tools compile issue when deprecated symbols are disabled (#1884)
* Fix for a tools compile issue when deprecated symbols are disabled Introduced in #1811, also uses VOL token instead of addr * Fix for similar compile issues in java when deprecated symbols are disabled. * Committing clang-format changes Co-authored-by: Larry Knox <lrknox@hdfgroup.org> Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
Diffstat (limited to 'tools/lib/h5tools_str.c')
-rw-r--r--tools/lib/h5tools_str.c20
1 files changed, 14 insertions, 6 deletions
diff --git a/tools/lib/h5tools_str.c b/tools/lib/h5tools_str.c
index 9a26164..ab446e0 100644
--- a/tools/lib/h5tools_str.c
+++ b/tools/lib/h5tools_str.c
@@ -1196,7 +1196,7 @@ h5tools_str_sprint(h5tools_str_t *str, const h5tool_format_t *info, hid_t contai
case H5R_MAXTYPE:
default:
break;
- } /* end switch */
+ }
H5TOOLS_DEBUG("H5T_REFERENCE:H5T_STD_REF end");
}
else if (H5Tequal(type, H5T_STD_REF_DSETREG)) {
@@ -1210,11 +1210,12 @@ h5tools_str_sprint(h5tools_str_t *str, const h5tool_format_t *info, hid_t contai
/*
* Object references -- show the type and OID of the referenced object.
*/
- H5O_info1_t oi;
+ H5O_info2_t oi;
+ char * obj_tok_str = NULL;
H5TOOLS_DEBUG("H5T_REFERENCE:H5T_STD_REF_OBJ");
obj = H5Rdereference2(container, H5P_DEFAULT, H5R_OBJECT, vp);
- H5Oget_info2(obj, &oi, H5O_INFO_BASIC);
+ H5Oget_info3(obj, &oi, H5O_INFO_BASIC);
/* Print object type and close object */
switch (oi.type) {
@@ -1235,14 +1236,21 @@ h5tools_str_sprint(h5tools_str_t *str, const h5tool_format_t *info, hid_t contai
default:
h5tools_str_append(str, "%u-", (unsigned)oi.type);
break;
- } /* end switch */
+ }
H5Oclose(obj);
/* Print OID */
+ H5Otoken_to_str(obj, &oi.token, &obj_tok_str);
+
if (info->obj_hidefileno)
- h5tools_str_append(str, info->obj_format, oi.addr);
+ h5tools_str_append(str, info->obj_format, obj_tok_str);
else
- h5tools_str_append(str, info->obj_format, oi.fileno, oi.addr);
+ h5tools_str_append(str, info->obj_format, oi.fileno, obj_tok_str);
+
+ if (obj_tok_str) {
+ H5free_memory(obj_tok_str);
+ obj_tok_str = NULL;
+ }
h5tools_str_sprint_old_reference(str, container, vp);
} /* end else if (H5Tequal(type, H5T_STD_REF_OBJ)) */