summaryrefslogtreecommitdiffstats
path: root/tools/src
diff options
context:
space:
mode:
authorDana Robinson <derobins@hdfgroup.org>2020-04-02 10:57:05 (GMT)
committerDana Robinson <derobins@hdfgroup.org>2020-04-02 10:57:05 (GMT)
commit1c854737665f3f853a324c34292390ab57431fec (patch)
tree42f37ee92543c4eb9b49f6b9960ddba3877373cc /tools/src
parentbae05235a2d87acb0d6b3a2e1c32f3b6f48cf203 (diff)
downloadhdf5-1c854737665f3f853a324c34292390ab57431fec.zip
hdf5-1c854737665f3f853a324c34292390ab57431fec.tar.gz
hdf5-1c854737665f3f853a324c34292390ab57431fec.tar.bz2
Fixed unnecessary H5R casts in the tools that were raising warnings.
Diffstat (limited to 'tools/src')
-rw-r--r--tools/src/h5ls/h5ls.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/tools/src/h5ls/h5ls.c b/tools/src/h5ls/h5ls.c
index 7ab5001..d954367 100644
--- a/tools/src/h5ls/h5ls.c
+++ b/tools/src/h5ls/h5ls.c
@@ -1333,10 +1333,10 @@ dump_reference(FILE *stream, const h5tool_format_t *info, h5tools_context_t *ctx
switch (ref_type) {
case H5R_OBJECT1:
H5TOOLS_DEBUG("ref_type is H5R_OBJECT1");
- if (H5Rget_obj_type3((const H5R_ref_t *)&ref_buf[i], H5P_DEFAULT, &obj_type) >= 0) {
+ if (H5Rget_obj_type3(&ref_buf[i], H5P_DEFAULT, &obj_type) >= 0) {
switch (obj_type) {
case H5O_TYPE_DATASET:
- if((new_obj_id = H5Ropen_object((const H5R_ref_t *)&ref_buf[i], H5P_DEFAULT, H5P_DEFAULT)) >= 0) {
+ if((new_obj_id = H5Ropen_object(&ref_buf[i], H5P_DEFAULT, H5P_DEFAULT)) >= 0) {
datactx.indent_level++;
h5tools_dump_dset(stream, info, &datactx, new_obj_id);
datactx.indent_level--;
@@ -1363,7 +1363,7 @@ dump_reference(FILE *stream, const h5tool_format_t *info, h5tools_context_t *ctx
break;
case H5R_DATASET_REGION1:
H5TOOLS_DEBUG("ref_type is H5R_DATASET_REGION1");
- if((new_obj_id = H5Ropen_object((const H5R_ref_t *)&ref_buf[i], H5P_DEFAULT, H5P_DEFAULT)) >= 0) {
+ if((new_obj_id = H5Ropen_object(&ref_buf[i], H5P_DEFAULT, H5P_DEFAULT)) >= 0) {
datactx.indent_level++;
h5tools_dump_dset(stream, info, &datactx, new_obj_id);
datactx.indent_level--;
@@ -1377,13 +1377,13 @@ dump_reference(FILE *stream, const h5tool_format_t *info, h5tools_context_t *ctx
break;
case H5R_OBJECT2:
H5TOOLS_DEBUG("ref_type is H5R_OBJECT2");
- if (H5Rget_obj_type3((const H5R_ref_t *)&ref_buf[i], H5P_DEFAULT, &obj_type) >= 0) {
+ if (H5Rget_obj_type3(&ref_buf[i], H5P_DEFAULT, &obj_type) >= 0) {
switch (obj_type) {
case H5O_TYPE_GROUP:
break;
case H5O_TYPE_DATASET:
- if((new_obj_id = H5Ropen_object((const H5R_ref_t *)&ref_buf[i], H5P_DEFAULT, H5P_DEFAULT)) >= 0) {
+ if((new_obj_id = H5Ropen_object(&ref_buf[i], H5P_DEFAULT, H5P_DEFAULT)) >= 0) {
datactx.indent_level++;
h5tools_dump_dset(stream, info, &datactx, new_obj_id);
datactx.indent_level--;
@@ -1416,10 +1416,10 @@ dump_reference(FILE *stream, const h5tool_format_t *info, h5tools_context_t *ctx
ncols = info->line_ncols;
/* if (new_obj_id < 0) - could mean that no reference was written do not throw failure */
- if((new_obj_id = H5Ropen_object((const H5R_ref_t *)&ref_buf[i], H5P_DEFAULT, H5P_DEFAULT)) < 0)
+ if((new_obj_id = H5Ropen_object(&ref_buf[i], H5P_DEFAULT, H5P_DEFAULT)) < 0)
H5TOOLS_INFO("H5Ropen_object H5R_DATASET_REGION2 failed");
else {
- if((new_obj_sid = H5Ropen_region((const H5R_ref_t *)&ref_buf[i], H5P_DEFAULT, H5P_DEFAULT)) >= 0) {
+ if((new_obj_sid = H5Ropen_region(&ref_buf[i], H5P_DEFAULT, H5P_DEFAULT)) >= 0) {
if (h5tools_is_zero(&ref_buf[i], H5Tget_size(H5T_STD_REF))) {
H5TOOLS_DEBUG("NULL H5R_DATASET_REGION2");
@@ -1471,7 +1471,7 @@ dump_reference(FILE *stream, const h5tool_format_t *info, h5tools_context_t *ctx
break;
case H5R_ATTR:
H5TOOLS_DEBUG("ref_type is H5R_ATTR");
- if((new_obj_id = H5Ropen_attr((const H5R_ref_t *)&ref_buf[i], H5P_DEFAULT, H5P_DEFAULT)) >= 0) {
+ if((new_obj_id = H5Ropen_attr(&ref_buf[i], H5P_DEFAULT, H5P_DEFAULT)) >= 0) {
h5tools_dump_region_attribute(new_obj_id, stream, info, &datactx, &buffer, &curr_pos, (size_t)ncols, (hsize_t)0, (hsize_t)0);
if(H5Aclose(new_obj_id) < 0)
H5TOOLS_INFO("H5Aclose H5R_ATTR failed");