summaryrefslogtreecommitdiffstats
path: root/src/H5VLnative_datatype.c
diff options
context:
space:
mode:
authorSean McBride <sean@rogue-research.com>2023-08-02 13:39:15 (GMT)
committerGitHub <noreply@github.com>2023-08-02 13:39:15 (GMT)
commit2b0badb90e4e516d0758efbd8ec96449188c7249 (patch)
tree074e38039b95ca7121a0117069974eff52a04519 /src/H5VLnative_datatype.c
parent56451503c55ef6e5f67fc3bb710f9e5b649b1af2 (diff)
downloadhdf5-2b0badb90e4e516d0758efbd8ec96449188c7249.zip
hdf5-2b0badb90e4e516d0758efbd8ec96449188c7249.tar.gz
hdf5-2b0badb90e4e516d0758efbd8ec96449188c7249.tar.bz2
Made HGOTO_ERROR a do-while loop (#3308)
* Made HGOTO_ERROR a do-while loop
Diffstat (limited to 'src/H5VLnative_datatype.c')
-rw-r--r--src/H5VLnative_datatype.c34
1 files changed, 17 insertions, 17 deletions
diff --git a/src/H5VLnative_datatype.c b/src/H5VLnative_datatype.c
index ad62ae6..b2451d7 100644
--- a/src/H5VLnative_datatype.c
+++ b/src/H5VLnative_datatype.c
@@ -83,23 +83,23 @@ H5VL__native_datatype_commit(void *obj, const H5VL_loc_params_t *loc_params, con
/* check arguments */
if (H5G_loc_real(obj, loc_params->obj_type, &loc) < 0)
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "not a file or file object")
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "not a file or file object");
if (NULL == (dt = (H5T_t *)H5I_object_verify(type_id, H5I_DATATYPE)))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "not a datatype")
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "not a datatype");
/* Check arguments. We cannot commit an immutable type because H5Tclose()
* normally fails on such types (try H5Tclose(H5T_NATIVE_INT)) but closing
* a named type should always succeed.
*/
if (H5T_STATE_NAMED == dt->shared->state || H5T_STATE_OPEN == dt->shared->state)
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "datatype is already committed")
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "datatype is already committed");
if (H5T_STATE_IMMUTABLE == dt->shared->state)
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "datatype is immutable")
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, NULL, "datatype is immutable");
/* Check for a "sensible" datatype to store on disk */
if (H5T_is_sensible(dt) <= 0)
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "datatype is not sensible")
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "datatype is not sensible");
/* Copy the datatype - the copied one will be the type that is
* committed, and attached to original datatype above the VOL
@@ -112,12 +112,12 @@ H5VL__native_datatype_commit(void *obj, const H5VL_loc_params_t *loc_params, con
if (NULL != name) {
/* H5Tcommit */
if (H5T__commit_named(&loc, name, type, lcpl_id, tcpl_id) < 0)
- HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, NULL, "unable to commit datatype")
+ HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, NULL, "unable to commit datatype");
} /* end if */
else {
/* H5Tcommit_anon */
if (H5T__commit_anon(loc.oloc->file, type, tcpl_id) < 0)
- HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, NULL, "unable to commit datatype")
+ HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, NULL, "unable to commit datatype");
} /* end else */
ret_value = (void *)type;
@@ -151,11 +151,11 @@ H5VL__native_datatype_open(void *obj, const H5VL_loc_params_t *loc_params, const
FUNC_ENTER_PACKAGE
if (H5G_loc_real(obj, loc_params->obj_type, &loc) < 0)
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "not a file or file object")
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "not a file or file object");
/* Open the datatype */
if (NULL == (type = H5T__open_name(&loc, name)))
- HGOTO_ERROR(H5E_DATATYPE, H5E_CANTOPENOBJ, NULL, "unable to open named datatype")
+ HGOTO_ERROR(H5E_DATATYPE, H5E_CANTOPENOBJ, NULL, "unable to open named datatype");
type->vol_obj = NULL;
@@ -187,7 +187,7 @@ H5VL__native_datatype_get(void *obj, H5VL_datatype_get_args_t *args, hid_t H5_AT
/* H5T_construct_datatype (library private routine) */
case H5VL_DATATYPE_GET_BINARY_SIZE: {
if (H5T_encode(dt, NULL, args->args.get_binary_size.size) < 0)
- HGOTO_ERROR(H5E_DATATYPE, H5E_CANTGET, FAIL, "can't determine serialized length of datatype")
+ HGOTO_ERROR(H5E_DATATYPE, H5E_CANTGET, FAIL, "can't determine serialized length of datatype");
break;
}
@@ -195,7 +195,7 @@ H5VL__native_datatype_get(void *obj, H5VL_datatype_get_args_t *args, hid_t H5_AT
/* H5T_construct_datatype (library private routine) */
case H5VL_DATATYPE_GET_BINARY: {
if (H5T_encode(dt, args->args.get_binary.buf, &args->args.get_binary.buf_size) < 0)
- HGOTO_ERROR(H5E_DATATYPE, H5E_CANTSERIALIZE, FAIL, "can't serialize datatype")
+ HGOTO_ERROR(H5E_DATATYPE, H5E_CANTSERIALIZE, FAIL, "can't serialize datatype");
break;
}
@@ -209,7 +209,7 @@ H5VL__native_datatype_get(void *obj, H5VL_datatype_get_args_t *args, hid_t H5_AT
}
default:
- HGOTO_ERROR(H5E_VOL, H5E_CANTGET, FAIL, "can't get this type of information from datatype")
+ HGOTO_ERROR(H5E_VOL, H5E_CANTGET, FAIL, "can't get this type of information from datatype");
} /* end switch */
done:
@@ -240,10 +240,10 @@ H5VL__native_datatype_specific(void *obj, H5VL_datatype_specific_args_t *args, h
/* Currently, H6Oflush causes H5Fclose to trigger an assertion failure in metadata cache.
* Leave this situation for the future solution */
if (H5F_HAS_FEATURE(dt->oloc.file, H5FD_FEAT_HAS_MPI))
- HGOTO_ERROR(H5E_DATASET, H5E_UNSUPPORTED, FAIL, "H5Oflush isn't supported for parallel")
+ HGOTO_ERROR(H5E_DATASET, H5E_UNSUPPORTED, FAIL, "H5Oflush isn't supported for parallel");
if (H5O_flush_common(&dt->oloc, args->args.flush.type_id) < 0)
- HGOTO_ERROR(H5E_DATATYPE, H5E_CANTFLUSH, FAIL, "unable to flush datatype")
+ HGOTO_ERROR(H5E_DATATYPE, H5E_CANTFLUSH, FAIL, "unable to flush datatype");
break;
}
@@ -251,13 +251,13 @@ H5VL__native_datatype_specific(void *obj, H5VL_datatype_specific_args_t *args, h
/* H5VL_DATATYPE_REFRESH */
case H5VL_DATATYPE_REFRESH: {
if ((H5O_refresh_metadata(&dt->oloc, args->args.refresh.type_id)) < 0)
- HGOTO_ERROR(H5E_DATATYPE, H5E_CANTLOAD, FAIL, "unable to refresh datatype")
+ HGOTO_ERROR(H5E_DATATYPE, H5E_CANTLOAD, FAIL, "unable to refresh datatype");
break;
}
default:
- HGOTO_ERROR(H5E_VOL, H5E_UNSUPPORTED, FAIL, "invalid specific operation")
+ HGOTO_ERROR(H5E_VOL, H5E_UNSUPPORTED, FAIL, "invalid specific operation");
} /* end switch */
done:
@@ -282,7 +282,7 @@ H5VL__native_datatype_close(void *dt, hid_t H5_ATTR_UNUSED dxpl_id, void H5_ATTR
FUNC_ENTER_PACKAGE
if (H5T_close((H5T_t *)dt) < 0)
- HGOTO_ERROR(H5E_SYM, H5E_CANTDEC, FAIL, "can't close datatype")
+ HGOTO_ERROR(H5E_SYM, H5E_CANTDEC, FAIL, "can't close datatype");
done:
FUNC_LEAVE_NOAPI(ret_value)