diff options
author | Allen Byrne <50328838+byrnHDF@users.noreply.github.com> | 2023-08-03 12:57:29 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-08-03 12:57:29 (GMT) |
commit | 7fc8531b767855e69fb4016783a1131ba581fd5b (patch) | |
tree | a243310b99da59c858ae4eaeed8c452e0177bba4 /src/H5VLnative_group.c | |
parent | a77d8bfcd7d066c6759b0346c02cbd612f90b7c2 (diff) | |
download | hdf5-7fc8531b767855e69fb4016783a1131ba581fd5b.zip hdf5-7fc8531b767855e69fb4016783a1131ba581fd5b.tar.gz hdf5-7fc8531b767855e69fb4016783a1131ba581fd5b.tar.bz2 |
Merge Made HGOTO_ERROR a do-while loop changes from develop (#3334)
Diffstat (limited to 'src/H5VLnative_group.c')
-rw-r--r-- | src/H5VLnative_group.c | 50 |
1 files changed, 25 insertions, 25 deletions
diff --git a/src/H5VLnative_group.c b/src/H5VLnative_group.c index d5316ce..70b7ab9 100644 --- a/src/H5VLnative_group.c +++ b/src/H5VLnative_group.c @@ -81,7 +81,7 @@ H5VL__native_group_create(void *obj, const H5VL_loc_params_t *loc_params, const /* Set up the location */ 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 name is NULL then this is from H5Gcreate_anon */ if (name == NULL) { @@ -94,13 +94,13 @@ H5VL__native_group_create(void *obj, const H5VL_loc_params_t *loc_params, const /* Create the new group & get its ID */ if (NULL == (grp = H5G__create(loc.oloc->file, &gcrt_info))) - HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, NULL, "unable to create group") + HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, NULL, "unable to create group"); } /* end if */ /* otherwise it's from H5Gcreate */ else { /* Create the new group & get its ID */ if (NULL == (grp = H5G__create_named(&loc, name, lcpl_id, gcpl_id))) - HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, NULL, "unable to create group") + HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, NULL, "unable to create group"); } /* end else */ ret_value = (void *)grp; @@ -147,11 +147,11 @@ H5VL__native_group_open(void *obj, const H5VL_loc_params_t *loc_params, const ch /* Set up the location */ 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 group */ if ((grp = H5G__open_name(&loc, name)) == NULL) - HGOTO_ERROR(H5E_SYM, H5E_CANTOPENOBJ, NULL, "unable to open group") + HGOTO_ERROR(H5E_SYM, H5E_CANTOPENOBJ, NULL, "unable to open group"); ret_value = (void *)grp; @@ -180,7 +180,7 @@ H5VL__native_group_get(void *obj, H5VL_group_get_args_t *args, hid_t H5_ATTR_UNU /* H5Gget_create_plist */ case H5VL_GROUP_GET_GCPL: { if ((args->args.get_gcpl.gcpl_id = H5G_get_create_plist((H5G_t *)obj)) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "can't get creation property list for group") + HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "can't get creation property list for group"); break; } @@ -191,14 +191,14 @@ H5VL__native_group_get(void *obj, H5VL_group_get_args_t *args, hid_t H5_ATTR_UNU H5G_loc_t loc; if (H5G_loc_real(obj, get_info_args->loc_params.obj_type, &loc) < 0) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file or file object") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file or file object"); if (get_info_args->loc_params.type == H5VL_OBJECT_BY_SELF) { /* H5Gget_info */ /* Retrieve the group's information */ if (H5G__obj_info(loc.oloc, get_info_args->ginfo) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "can't retrieve group info") + HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "can't retrieve group info"); } /* end if */ else if (get_info_args->loc_params.type == H5VL_OBJECT_BY_NAME) { /* H5Gget_info_by_name */ @@ -206,7 +206,7 @@ H5VL__native_group_get(void *obj, H5VL_group_get_args_t *args, hid_t H5_ATTR_UNU /* Retrieve the group's information */ if (H5G__get_info_by_name(&loc, get_info_args->loc_params.loc_data.loc_by_name.name, get_info_args->ginfo) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "can't retrieve group info") + HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "can't retrieve group info"); } /* end else-if */ else if (get_info_args->loc_params.type == H5VL_OBJECT_BY_IDX) { /* H5Gget_info_by_idx */ @@ -217,15 +217,15 @@ H5VL__native_group_get(void *obj, H5VL_group_get_args_t *args, hid_t H5_ATTR_UNU get_info_args->loc_params.loc_data.loc_by_idx.order, get_info_args->loc_params.loc_data.loc_by_idx.n, get_info_args->ginfo) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "can't retrieve group info") + HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "can't retrieve group info"); } /* end else-if */ else - HGOTO_ERROR(H5E_VOL, H5E_UNSUPPORTED, FAIL, "unknown get info parameters") + HGOTO_ERROR(H5E_VOL, H5E_UNSUPPORTED, FAIL, "unknown get info parameters"); break; } default: - HGOTO_ERROR(H5E_VOL, H5E_CANTGET, FAIL, "can't get this type of information from group") + HGOTO_ERROR(H5E_VOL, H5E_CANTGET, FAIL, "can't get this type of information from group"); } /* end switch */ done: @@ -256,11 +256,11 @@ H5VL__native_group_specific(void *obj, H5VL_group_specific_args_t *args, hid_t H H5G_loc_t loc; if (H5G_loc_real(grp, H5I_GROUP, &loc) < 0) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a group object") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a group object"); if (H5F_mount(&loc, args->args.mount.name, args->args.mount.child_file, args->args.mount.fmpl_id) < 0) - HGOTO_ERROR(H5E_FILE, H5E_MOUNT, FAIL, "unable to mount file") + HGOTO_ERROR(H5E_FILE, H5E_MOUNT, FAIL, "unable to mount file"); break; } @@ -270,10 +270,10 @@ H5VL__native_group_specific(void *obj, H5VL_group_specific_args_t *args, hid_t H H5G_loc_t loc; if (H5G_loc_real(grp, H5I_GROUP, &loc) < 0) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a group object") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a group object"); if (H5F_unmount(&loc, args->args.unmount.name) < 0) - HGOTO_ERROR(H5E_FILE, H5E_UNMOUNT, FAIL, "unable to unmount file") + HGOTO_ERROR(H5E_FILE, H5E_UNMOUNT, FAIL, "unable to unmount file"); break; } @@ -283,10 +283,10 @@ H5VL__native_group_specific(void *obj, H5VL_group_specific_args_t *args, hid_t H /* Currently, H5Oflush causes H5Fclose to trigger an assertion failure in metadata cache. * Leave this situation for the future solution */ if (H5F_HAS_FEATURE(grp->oloc.file, H5FD_FEAT_HAS_MPI)) - HGOTO_ERROR(H5E_SYM, H5E_UNSUPPORTED, FAIL, "H5Oflush isn't supported for parallel") + HGOTO_ERROR(H5E_SYM, H5E_UNSUPPORTED, FAIL, "H5Oflush isn't supported for parallel"); if (H5O_flush_common(&grp->oloc, args->args.flush.grp_id) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTFLUSH, FAIL, "unable to flush group") + HGOTO_ERROR(H5E_SYM, H5E_CANTFLUSH, FAIL, "unable to flush group"); break; } @@ -294,13 +294,13 @@ H5VL__native_group_specific(void *obj, H5VL_group_specific_args_t *args, hid_t H /* H5Grefresh */ case H5VL_GROUP_REFRESH: { if ((H5O_refresh_metadata(&grp->oloc, args->args.refresh.grp_id)) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTLOAD, FAIL, "unable to refresh group") + HGOTO_ERROR(H5E_SYM, H5E_CANTLOAD, FAIL, "unable to refresh group"); 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: @@ -337,7 +337,7 @@ H5VL__native_group_optional(void H5_ATTR_UNUSED *obj, H5VL_optional_args_t *args /* Get the location struct for the object */ if (H5G_loc_real(obj, iter_args->loc_params.obj_type, &grp_loc) < 0) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file or file object") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file or file object"); /* Set up link iteration callback struct */ lnk_op.op_type = H5G_LINK_OP_OLD; @@ -359,19 +359,19 @@ H5VL__native_group_optional(void H5_ATTR_UNUSED *obj, H5VL_optional_args_t *args /* Get the location struct for the object */ if (H5G_loc_real(obj, goi_args->loc_params.obj_type, &grp_loc) < 0) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file or file object") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file or file object"); /* Call the actual group objinfo routine */ if (H5G__get_objinfo(&grp_loc, goi_args->loc_params.loc_data.loc_by_name.name, goi_args->follow_link, goi_args->statbuf) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "cannot stat object") + HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "cannot stat object"); break; } #endif /* H5_NO_DEPRECATED_SYMBOLS */ default: - HGOTO_ERROR(H5E_VOL, H5E_UNSUPPORTED, FAIL, "invalid optional operation") + HGOTO_ERROR(H5E_VOL, H5E_UNSUPPORTED, FAIL, "invalid optional operation"); } /* end switch */ done: @@ -396,7 +396,7 @@ H5VL__native_group_close(void *grp, hid_t H5_ATTR_UNUSED dxpl_id, void H5_ATTR_U FUNC_ENTER_PACKAGE if (H5G_close((H5G_t *)grp) < 0) - HGOTO_ERROR(H5E_SYM, H5E_CLOSEERROR, FAIL, "can't close group") + HGOTO_ERROR(H5E_SYM, H5E_CLOSEERROR, FAIL, "can't close group"); done: FUNC_LEAVE_NOAPI(ret_value) |