summaryrefslogtreecommitdiffstats
path: root/src/H5Rint.c
diff options
context:
space:
mode:
authorkmu <kmu@hdfgroup.org>2019-12-02 16:46:22 (GMT)
committerkmu <kmu@hdfgroup.org>2019-12-02 16:46:22 (GMT)
commit463199464f2b5c9f798b23ffe3f1db139b68f4d2 (patch)
tree9df3e9cafae901d462a14a6689caa93507a515e7 /src/H5Rint.c
parentea0759d047dc6421da90375a9c27f7cde0a8e117 (diff)
parent0772b975d1d2bfa15aedeb4b6e2c2aac78c61a2f (diff)
downloadhdf5-463199464f2b5c9f798b23ffe3f1db139b68f4d2.zip
hdf5-463199464f2b5c9f798b23ffe3f1db139b68f4d2.tar.gz
hdf5-463199464f2b5c9f798b23ffe3f1db139b68f4d2.tar.bz2
Merge branch 'develop' of https://git.hdfgroup.org/scm/hdffv/hdf5 into develop
Diffstat (limited to 'src/H5Rint.c')
-rw-r--r--src/H5Rint.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/H5Rint.c b/src/H5Rint.c
index 9fbc7ef..558c095 100644
--- a/src/H5Rint.c
+++ b/src/H5Rint.c
@@ -413,6 +413,7 @@ H5R__destroy(H5R_ref_priv_t *ref)
break;
case H5R_OBJECT1:
case H5R_DATASET_REGION1:
+ break;
case H5R_BADTYPE:
case H5R_MAXTYPE:
HDassert("invalid reference type" && 0);
@@ -423,7 +424,7 @@ H5R__destroy(H5R_ref_priv_t *ref)
} /* end switch */
/* Decrement refcount of attached loc_id */
- if((ref->loc_id != H5I_INVALID_HID) && (H5I_dec_ref(ref->loc_id) < 0))
+ if(ref->type && (ref->loc_id != H5I_INVALID_HID) && (H5I_dec_ref(ref->loc_id) < 0))
HGOTO_ERROR(H5E_REFERENCE, H5E_CANTDEC, FAIL, "decrementing location ID failed")
done:
@@ -1169,8 +1170,8 @@ H5R__encode_region(H5S_t *space, unsigned char *buf, size_t *nalloc)
/* Don't encode if buffer size isn't big enough or buffer is empty */
if(buf && *nalloc >= ((size_t)buf_size + 2 * H5_SIZEOF_UINT32_T)) {
- int rank;
p = (uint8_t *)buf;
+ int rank;
/* Encode the size for safety check */
UINT32ENCODE(p, (uint32_t)buf_size);
@@ -1479,18 +1480,18 @@ done:
*-------------------------------------------------------------------------
*/
herr_t
-H5R__decode_token_compat(hid_t id, H5I_type_t type, H5R_type_t ref_type,
+H5R__decode_token_compat(H5VL_object_t *vol_obj, H5I_type_t type, H5R_type_t ref_type,
const unsigned char *buf, H5VL_token_t *obj_token)
{
hid_t file_id = H5I_INVALID_HID; /* File ID for region reference */
- void *vol_obj_file = NULL;
+ H5VL_object_t *vol_obj_file = NULL;
H5VL_file_cont_info_t cont_info = {H5VL_CONTAINER_INFO_VERSION, 0, 0, 0};
herr_t ret_value = SUCCEED;
FUNC_ENTER_PACKAGE
/* Get the file for the object */
- if((file_id = H5F_get_file_id(id, type, FALSE)) < 0)
+ if((file_id = H5F_get_file_id(vol_obj, type, FALSE)) < 0)
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file or file object")
/* Retrieve VOL object */