diff options
author | Sean McBride <sean@rogue-research.com> | 2023-08-02 13:39:15 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-08-02 13:39:15 (GMT) |
commit | 2b0badb90e4e516d0758efbd8ec96449188c7249 (patch) | |
tree | 074e38039b95ca7121a0117069974eff52a04519 /src/H5Tnative.c | |
parent | 56451503c55ef6e5f67fc3bb710f9e5b649b1af2 (diff) | |
download | hdf5-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/H5Tnative.c')
-rw-r--r-- | src/H5Tnative.c | 148 |
1 files changed, 74 insertions, 74 deletions
diff --git a/src/H5Tnative.c b/src/H5Tnative.c index bac956c..76ef403 100644 --- a/src/H5Tnative.c +++ b/src/H5Tnative.c @@ -77,17 +77,17 @@ H5Tget_native_type(hid_t type_id, H5T_direction_t direction) /* Check arguments */ if (NULL == (dt = (H5T_t *)H5I_object_verify(type_id, H5I_DATATYPE))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "not a data type") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "not a data type"); if (direction != H5T_DIR_DEFAULT && direction != H5T_DIR_ASCEND && direction != H5T_DIR_DESCEND) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "not valid direction value") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "not valid direction value"); /* Get the native type */ if (NULL == (new_dt = H5T__get_native_type(dt, direction, NULL, NULL, &comp_size))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "cannot retrieve native type") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "cannot retrieve native type"); /* Get an ID for the new type */ if ((ret_value = H5I_register(H5I_DATATYPE, new_dt, TRUE)) < 0) - HGOTO_ERROR(H5E_DATATYPE, H5E_CANTREGISTER, H5I_INVALID_HID, "unable to register data type") + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTREGISTER, H5I_INVALID_HID, "unable to register data type"); done: /* Error cleanup */ @@ -138,72 +138,72 @@ H5T__get_native_type(H5T_t *dtype, H5T_direction_t direction, size_t *struct_ali assert(dtype); if (H5T_NO_CLASS == (h5_class = H5T_get_class(dtype, FALSE))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "not a valid class") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "not a valid class"); if (0 == (size = H5T_get_size(dtype))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "not a valid size") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "not a valid size"); switch (h5_class) { case H5T_INTEGER: { H5T_sign_t sign; /* Signedness of integer type */ if (H5T_SGN_ERROR == (sign = H5T_get_sign(dtype))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "not a valid signess") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "not a valid signess"); prec = dtype->shared->u.atomic.prec; if (NULL == (ret_value = H5T__get_native_integer(prec, sign, direction, struct_align, offset, comp_size))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "cannot retrieve integer type") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "cannot retrieve integer type"); } /* end case */ break; case H5T_FLOAT: if (NULL == (ret_value = H5T__get_native_float(size, direction, struct_align, offset, comp_size))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "cannot retrieve float type") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "cannot retrieve float type"); break; case H5T_STRING: if (NULL == (ret_value = H5T_copy(dtype, H5T_COPY_TRANSIENT))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "cannot retrieve float type") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "cannot retrieve float type"); if (H5T_IS_VL_STRING(dtype->shared)) { /* Update size, offset and compound alignment for parent. */ if (H5T__cmp_offset(comp_size, offset, sizeof(char *), (size_t)1, H5T_POINTER_ALIGN_g, struct_align) < 0) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "cannot compute compound offset") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "cannot compute compound offset"); } /* end if */ else { /* Update size, offset and compound alignment for parent. */ if (H5T__cmp_offset(comp_size, offset, sizeof(char), size, H5T_NATIVE_SCHAR_ALIGN_g, struct_align) < 0) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "cannot compute compound offset") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "cannot compute compound offset"); } /* end else */ break; /* The time type will be supported in the future. Simply return "not supported" * message for now.*/ case H5T_TIME: - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "time type is not supported yet") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "time type is not supported yet"); case H5T_BITFIELD: { prec = dtype->shared->u.atomic.prec; if (NULL == (ret_value = H5T__get_native_bitfield(prec, direction, struct_align, offset, comp_size))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "cannot retrieve integer for bitfield type") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "cannot retrieve integer for bitfield type"); } /* end case */ break; case H5T_OPAQUE: if (NULL == (ret_value = H5T_copy(dtype, H5T_COPY_TRANSIENT))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "cannot retrieve float type") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "cannot retrieve float type"); /* Update size, offset and compound alignment for parent. */ if (H5T__cmp_offset(comp_size, offset, sizeof(char), size, H5T_NATIVE_SCHAR_ALIGN_g, struct_align) < 0) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "cannot compute compound offset") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "cannot compute compound offset"); break; case H5T_REFERENCE: { @@ -212,11 +212,11 @@ H5T__get_native_type(H5T_t *dtype, H5T_direction_t direction, size_t *struct_ali size_t ref_size; if (NULL == (ret_value = H5T_copy(dtype, H5T_COPY_TRANSIENT))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "cannot copy reference type") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "cannot copy reference type"); /* Decide if the data type is object reference. */ if (NULL == (dt = (H5T_t *)H5I_object(H5T_STD_REF_OBJ_g))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "not a data type") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "not a data type"); /* Update size, offset and compound alignment for parent. */ if (0 == H5T_cmp(ret_value, dt, FALSE)) { @@ -226,7 +226,7 @@ H5T__get_native_type(H5T_t *dtype, H5T_direction_t direction, size_t *struct_ali else { /* Decide if the data type is dataset region reference. */ if (NULL == (dt = (H5T_t *)H5I_object(H5T_STD_REF_DSETREG_g))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "not a data type") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "not a data type"); if (0 == H5T_cmp(ret_value, dt, FALSE)) { align = H5T_HDSETREGREF_ALIGN_g; @@ -240,7 +240,7 @@ H5T__get_native_type(H5T_t *dtype, H5T_direction_t direction, size_t *struct_ali } /* end else */ if (H5T__cmp_offset(comp_size, offset, ref_size, (size_t)1, align, struct_align) < 0) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "cannot compute compound offset") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "cannot compute compound offset"); } /* end case */ break; @@ -250,31 +250,31 @@ H5T__get_native_type(H5T_t *dtype, H5T_direction_t direction, size_t *struct_ali 0; /* The max alignment among compound members. This'll be the compound alignment */ if ((snmemb = H5T_get_nmembers(dtype)) <= 0) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "compound data type doesn't have any member") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "compound data type doesn't have any member"); H5_CHECKED_ASSIGN(nmemb, unsigned, snmemb, int); if (NULL == (memb_list = (H5T_t **)H5MM_calloc(nmemb * sizeof(H5T_t *)))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "cannot allocate memory") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "cannot allocate memory"); if (NULL == (memb_offset = (size_t *)H5MM_calloc(nmemb * sizeof(size_t)))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "cannot allocate memory") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "cannot allocate memory"); if (NULL == (comp_mname = (char **)H5MM_calloc(nmemb * sizeof(char *)))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "cannot allocate memory") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "cannot allocate memory"); /* Construct child compound type and retrieve a list of their IDs, offsets, total size, and * alignment for compound type. */ for (u = 0; u < nmemb; u++) { if (NULL == (memb_type = H5T_get_member_type(dtype, u))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "member type retrieval failed") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "member type retrieval failed"); if (NULL == (comp_mname[u] = H5T__get_member_name(dtype, u))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "member type retrieval failed") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "member type retrieval failed"); if (NULL == (memb_list[u] = H5T__get_native_type(memb_type, direction, &children_st_align, &(memb_offset[u]), &children_size))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "member identifier retrieval failed") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "member identifier retrieval failed"); if (H5T_close_real(memb_type) < 0) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "cannot close datatype") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "cannot close datatype"); } /* end for */ /* The alignment for whole compound type */ @@ -283,12 +283,12 @@ H5T__get_native_type(H5T_t *dtype, H5T_direction_t direction, size_t *struct_ali /* Construct new compound type based on native type */ if (NULL == (new_type = H5T__create(H5T_COMPOUND, children_size))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "cannot create a compound type") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "cannot create a compound type"); /* Insert members for the new compound type */ for (u = 0; u < nmemb; u++) if (H5T__insert(new_type, comp_mname[u], memb_offset[u], memb_list[u]) < 0) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "cannot insert member to compound datatype") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "cannot insert member to compound datatype"); /* Update size, offset and compound alignment for parent in the case of * nested compound type. The alignment for a compound type as one field in @@ -310,12 +310,12 @@ H5T__get_native_type(H5T_t *dtype, H5T_direction_t direction, size_t *struct_ali */ if (H5T__cmp_offset(comp_size, offset, children_size, (size_t)1, children_st_align, struct_align) < 0) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "cannot compute compound offset") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "cannot compute compound offset"); /* Close member data type */ for (u = 0; u < nmemb; u++) { if (H5T_close_real(memb_list[u]) < 0) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "cannot close datatype") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "cannot close datatype"); /* Free member names in list */ comp_mname[u] = (char *)H5MM_xfree(comp_mname[u]); @@ -339,48 +339,48 @@ H5T__get_native_type(H5T_t *dtype, H5T_direction_t direction, size_t *struct_ali /* Retrieve base type for enumerated type */ if (NULL == (super_type = H5T_get_super(dtype))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "unable to get base type for enumerate type") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "unable to get base type for enumerate type"); if (NULL == (nat_super_type = H5T__get_native_type(super_type, direction, struct_align, offset, comp_size))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "base native type retrieval failed") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "base native type retrieval failed"); if ((super_type_id = H5I_register(H5I_DATATYPE, super_type, FALSE)) < 0) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "cannot register datatype") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "cannot register datatype"); if ((nat_super_type_id = H5I_register(H5I_DATATYPE, nat_super_type, FALSE)) < 0) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "cannot register datatype") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "cannot register datatype"); /* Allocate room for the enum values */ if (NULL == (tmp_memb_value = H5MM_calloc(H5T_get_size(super_type)))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "cannot allocate memory") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "cannot allocate memory"); if (NULL == (memb_value = H5MM_calloc(H5T_get_size(nat_super_type)))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "cannot allocate memory") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "cannot allocate memory"); /* Construct new enum type based on native type */ if (NULL == (new_type = H5T__enum_create(nat_super_type))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "unable to create enum type") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "unable to create enum type"); /* Find the conversion function */ if (NULL == (tpath = H5T_path_find(super_type, nat_super_type))) HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, NULL, - "unable to convert between src and dst data types") + "unable to convert between src and dst data types"); /* Retrieve member info and insert members into new enum type */ if ((snmemb = H5T_get_nmembers(dtype)) <= 0) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "enumerate data type doesn't have any member") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "enumerate data type doesn't have any member"); H5_CHECKED_ASSIGN(nmemb, unsigned, snmemb, int); for (u = 0; u < nmemb; u++) { if (NULL == (memb_name = H5T__get_member_name(dtype, u))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "cannot get member name") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "cannot get member name"); if (H5T__get_member_value(dtype, u, tmp_memb_value) < 0) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "cannot get member value") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "cannot get member value"); H5MM_memcpy(memb_value, tmp_memb_value, H5T_get_size(super_type)); if (H5T_convert(tpath, super_type_id, nat_super_type_id, (size_t)1, (size_t)0, (size_t)0, memb_value, NULL) < 0) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "cannot get member value") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "cannot get member value"); if (H5T__enum_insert(new_type, memb_name, memb_value) < 0) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "cannot insert member") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "cannot insert member"); memb_name = (char *)H5MM_xfree(memb_name); } memb_value = H5MM_xfree(memb_value); @@ -388,10 +388,10 @@ H5T__get_native_type(H5T_t *dtype, H5T_direction_t direction, size_t *struct_ali /* Close base type */ if (H5I_dec_app_ref(nat_super_type_id) < 0) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "cannot close datatype") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "cannot close datatype"); /* Close super type */ if (H5I_dec_app_ref(super_type_id) < 0) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "cannot close datatype") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "cannot close datatype"); ret_value = new_type; } /* end case */ @@ -407,37 +407,37 @@ H5T__get_native_type(H5T_t *dtype, H5T_direction_t direction, size_t *struct_ali /* Retrieve dimension information for array data type */ if ((sarray_rank = H5T__get_array_ndims(dtype)) <= 0) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "cannot get dimension rank") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "cannot get dimension rank"); H5_CHECKED_ASSIGN(array_rank, unsigned, sarray_rank, int); if (NULL == (dims = (hsize_t *)H5MM_malloc(array_rank * sizeof(hsize_t)))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "cannot allocate memory") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "cannot allocate memory"); if (H5T__get_array_dims(dtype, dims) < 0) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "cannot get dimension size") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "cannot get dimension size"); /* Retrieve base type for array type */ if (NULL == (super_type = H5T_get_super(dtype))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "unable to get parent type for array type") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "unable to get parent type for array type"); if (NULL == (nat_super_type = H5T__get_native_type(super_type, direction, &super_align, &super_offset, &super_size))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "parent native type retrieval failed") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "parent native type retrieval failed"); /* Close super type */ if (H5T_close_real(super_type) < 0) - HGOTO_ERROR(H5E_ARGS, H5E_CLOSEERROR, NULL, "cannot close datatype") + HGOTO_ERROR(H5E_ARGS, H5E_CLOSEERROR, NULL, "cannot close datatype"); /* Create a new array type based on native type */ if (NULL == (new_type = H5T__array_create(nat_super_type, array_rank, dims))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "unable to create array type") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "unable to create array type"); /* Close base type */ if (H5T_close_real(nat_super_type) < 0) - HGOTO_ERROR(H5E_ARGS, H5E_CLOSEERROR, NULL, "cannot close datatype") + HGOTO_ERROR(H5E_ARGS, H5E_CLOSEERROR, NULL, "cannot close datatype"); for (u = 0; u < array_rank; u++) nelems *= dims[u]; H5_CHECK_OVERFLOW(nelems, hsize_t, size_t); if (H5T__cmp_offset(comp_size, offset, super_size, (size_t)nelems, super_align, struct_align) < 0) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "cannot compute compound offset") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "cannot compute compound offset"); dims = (hsize_t *)H5MM_xfree(dims); @@ -452,31 +452,31 @@ H5T__get_native_type(H5T_t *dtype, H5T_direction_t direction, size_t *struct_ali /* Retrieve base type for array type */ if (NULL == (super_type = H5T_get_super(dtype))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "unable to get parent type for VL type") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "unable to get parent type for VL type"); /* Don't need alignment, offset information if this VL isn't a field of compound type. If it * is, go to a few steps below to compute the information directly. */ if (NULL == (nat_super_type = H5T__get_native_type(super_type, direction, NULL, NULL, &super_size))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "parent native type retrieval failed") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "parent native type retrieval failed"); /* Close super type */ if (H5T_close_real(super_type) < 0) - HGOTO_ERROR(H5E_ARGS, H5E_CLOSEERROR, NULL, "cannot close datatype") + HGOTO_ERROR(H5E_ARGS, H5E_CLOSEERROR, NULL, "cannot close datatype"); /* Create a new array type based on native type */ if (NULL == (new_type = H5T__vlen_create(nat_super_type))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "unable to create VL type") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "unable to create VL type"); /* Close base type */ if (H5T_close_real(nat_super_type) < 0) - HGOTO_ERROR(H5E_ARGS, H5E_CLOSEERROR, NULL, "cannot close datatype") + HGOTO_ERROR(H5E_ARGS, H5E_CLOSEERROR, NULL, "cannot close datatype"); /* Update size, offset and compound alignment for parent compound type directly. */ vl_align = H5T_HVL_ALIGN_g; vl_size = sizeof(hvl_t); if (H5T__cmp_offset(comp_size, offset, vl_size, (size_t)1, vl_align, struct_align) < 0) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "cannot compute compound offset") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "cannot compute compound offset"); ret_value = new_type; } /* end case */ @@ -485,7 +485,7 @@ H5T__get_native_type(H5T_t *dtype, H5T_direction_t direction, size_t *struct_ali case H5T_NO_CLASS: case H5T_NCLASSES: default: - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "data type doesn't match any native type") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "data type doesn't match any native type"); } /* end switch */ done: @@ -655,20 +655,20 @@ H5T__get_native_integer(size_t prec, H5T_sign_t sign, H5T_direction_t direction, case H5T_NATIVE_INT_MATCH_UNKNOWN: default: - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "Unknown native integer match") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "Unknown native integer match"); } /* end switch */ /* Create new native type */ assert(tid >= 0); if (NULL == (dt = (H5T_t *)H5I_object(tid))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "not a data type") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "not a data type"); if (NULL == (ret_value = H5T_copy(dt, H5T_COPY_TRANSIENT))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "cannot copy type") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "cannot copy type"); /* compute size and offset of compound type member. */ if (H5T__cmp_offset(comp_size, offset, native_size, (size_t)1, align, struct_align) < 0) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "cannot compute compound offset") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "cannot compute compound offset"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -766,19 +766,19 @@ H5T__get_native_float(size_t size, H5T_direction_t direction, size_t *struct_ali case H5T_NATIVE_FLOAT_MATCH_UNKNOWN: default: - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "Unknown native floating-point match") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "Unknown native floating-point match"); } /* end switch */ /* Create new native type */ assert(tid >= 0); if (NULL == (dt = (H5T_t *)H5I_object(tid))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "not a data type") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "not a data type"); if ((ret_value = H5T_copy(dt, H5T_COPY_TRANSIENT)) == NULL) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "cannot retrieve float type") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "cannot retrieve float type"); /* compute offset of compound type member. */ if (H5T__cmp_offset(comp_size, offset, native_size, (size_t)1, align, struct_align) < 0) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "cannot compute compound offset") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "cannot compute compound offset"); done: FUNC_LEAVE_NOAPI(ret_value) @@ -870,14 +870,14 @@ H5T__get_native_bitfield(size_t prec, H5T_direction_t direction, size_t *struct_ /* Create new native type */ assert(tid >= 0); if (NULL == (dt = (H5T_t *)H5I_object(tid))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "not a data type") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "not a data type"); if ((ret_value = H5T_copy(dt, H5T_COPY_TRANSIENT)) == NULL) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "cannot copy type") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "cannot copy type"); /* compute size and offset of compound type member. */ if (H5T__cmp_offset(comp_size, offset, native_size, (size_t)1, align, struct_align) < 0) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "cannot compute compound offset") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "cannot compute compound offset"); done: FUNC_LEAVE_NOAPI(ret_value) |