summaryrefslogtreecommitdiffstats
path: root/src/H5Tinit_float.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/H5Tinit_float.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/H5Tinit_float.c')
-rw-r--r--src/H5Tinit_float.c30
1 files changed, 15 insertions, 15 deletions
diff --git a/src/H5Tinit_float.c b/src/H5Tinit_float.c
index 9c1ef34..efab5b6 100644
--- a/src/H5Tinit_float.c
+++ b/src/H5Tinit_float.c
@@ -105,20 +105,20 @@
} \
} \
if (H5T__fix_order(sizeof(TYPE), _last, INFO.perm, &INFO.order) < 0) \
- HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "failed to detect byte order") \
+ HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "failed to detect byte order"); \
\
/* Implicit mantissa bit */ \
_v1 = (TYPE)0.5L; \
_v2 = (TYPE)1.0L; \
if (H5T__imp_bit(sizeof(TYPE), INFO.perm, &_v1, &_v2, _pad_mask, &(INFO.imp)) < 0) \
- HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "failed to determine implicit bit") \
+ HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "failed to determine implicit bit"); \
INFO.norm = INFO.imp ? H5T_NORM_IMPLIED : H5T_NORM_NONE; \
\
/* Sign bit */ \
_v1 = (TYPE)1.0L; \
_v2 = (TYPE)-1.0L; \
if (H5T__bit_cmp(sizeof(TYPE), INFO.perm, &_v1, &_v2, _pad_mask, &(INFO.sign)) < 0) \
- HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "failed to detect byte order") \
+ HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "failed to detect byte order"); \
\
/* Mantissa */ \
INFO.mpos = 0; \
@@ -126,7 +126,7 @@
_v1 = (TYPE)1.0L; \
_v2 = (TYPE)1.5L; \
if (H5T__bit_cmp(sizeof(TYPE), INFO.perm, &_v1, &_v2, _pad_mask, &(INFO.msize)) < 0) \
- HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "failed to detect byte order") \
+ HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "failed to detect byte order"); \
INFO.msize += 1 + (unsigned)(INFO.imp ? 0 : 1) - INFO.mpos; \
\
/* Exponent */ \
@@ -259,7 +259,7 @@ H5T__bit_cmp(unsigned nbytes, int *perm, void *_a, void *_b, const unsigned char
for (unsigned i = 0; i < nbytes; i++) {
if (perm[i] >= (int)nbytes)
- HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "failure in bit comparison")
+ HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "failure in bit comparison");
if ((aa = (unsigned char)(a[perm[i]] & pad_mask[perm[i]])) !=
(bb = (unsigned char)(b[perm[i]] & pad_mask[perm[i]]))) {
@@ -273,7 +273,7 @@ H5T__bit_cmp(unsigned nbytes, int *perm, void *_a, void *_b, const unsigned char
}
/* If we got here and didn't set a value, error out */
- HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "didn't find a value for `first`")
+ HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "didn't find a value for `first`");
done:
FUNC_LEAVE_NOAPI(ret_value)
@@ -301,7 +301,7 @@ H5T__fix_order(int n, int last, int *perm, H5T_order_t *order)
FUNC_ENTER_PACKAGE
if (last <= 0)
- HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "failed to detect byte order")
+ HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "failed to detect byte order");
/* We have at least three points to consider */
if (perm[last] < perm[last - 1] && perm[last - 1] < perm[last - 2]) {
@@ -322,7 +322,7 @@ H5T__fix_order(int n, int last, int *perm, H5T_order_t *order)
* in rare cases)
*/
if (0 != n % 2)
- HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "n is not a power of 2")
+ HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "n is not a power of 2");
*order = H5T_ORDER_VAX;
for (int i = 0; i < n; i += 2) {
@@ -377,7 +377,7 @@ H5T__imp_bit(unsigned n, int *perm, void *_a, void *_b, const unsigned char *pad
* A and B. This is the least significant bit of the exponent.
*/
if (H5T__bit_cmp(n, perm, a, b, pad_mask, &changed) < 0)
- HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "couldn't find LSB")
+ HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "couldn't find LSB");
/* The bit to the right (less significant) of the changed bit should
* be the most significant bit of the mantissa. If it is non-zero
@@ -470,7 +470,7 @@ H5T__init_native_float_types(void)
/* Allocate and fill type structure */
if (NULL == (dt = H5T__alloc()))
- HGOTO_ERROR(H5E_DATATYPE, H5E_NOSPACE, FAIL, "datatype allocation failed")
+ HGOTO_ERROR(H5E_DATATYPE, H5E_NOSPACE, FAIL, "datatype allocation failed");
dt->shared->state = H5T_STATE_IMMUTABLE;
dt->shared->type = H5T_FLOAT;
dt->shared->size = det.size;
@@ -490,7 +490,7 @@ H5T__init_native_float_types(void)
/* Register the type and set global variables */
if ((H5T_NATIVE_FLOAT_g = H5I_register(H5I_DATATYPE, dt, FALSE)) < 0)
- HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "can't register ID for built-in datatype")
+ HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "can't register ID for built-in datatype");
H5T_NATIVE_FLOAT_ALIGN_g = det.comp_align;
/* H5T_NATIVE_DOUBLE */
@@ -501,7 +501,7 @@ H5T__init_native_float_types(void)
/* Allocate and fill type structure */
if (NULL == (dt = H5T__alloc()))
- HGOTO_ERROR(H5E_DATATYPE, H5E_NOSPACE, FAIL, "datatype allocation failed")
+ HGOTO_ERROR(H5E_DATATYPE, H5E_NOSPACE, FAIL, "datatype allocation failed");
dt->shared->state = H5T_STATE_IMMUTABLE;
dt->shared->type = H5T_FLOAT;
dt->shared->size = det.size;
@@ -521,7 +521,7 @@ H5T__init_native_float_types(void)
/* Register the type and set global variables */
if ((H5T_NATIVE_DOUBLE_g = H5I_register(H5I_DATATYPE, dt, FALSE)) < 0)
- HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "can't register ID for built-in datatype")
+ HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "can't register ID for built-in datatype");
H5T_NATIVE_DOUBLE_ALIGN_g = det.comp_align;
/* H5T_NATIVE_LDOUBLE */
@@ -532,7 +532,7 @@ H5T__init_native_float_types(void)
/* Allocate and fill type structure */
if (NULL == (dt = H5T__alloc()))
- HGOTO_ERROR(H5E_DATATYPE, H5E_NOSPACE, FAIL, "datatype allocation failed")
+ HGOTO_ERROR(H5E_DATATYPE, H5E_NOSPACE, FAIL, "datatype allocation failed");
dt->shared->state = H5T_STATE_IMMUTABLE;
dt->shared->type = H5T_FLOAT;
dt->shared->size = det.size;
@@ -552,7 +552,7 @@ H5T__init_native_float_types(void)
/* Register the type and set global variables */
if ((H5T_NATIVE_LDOUBLE_g = H5I_register(H5I_DATATYPE, dt, FALSE)) < 0)
- HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "can't register ID for built-in datatype")
+ HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "can't register ID for built-in datatype");
H5T_NATIVE_LDOUBLE_ALIGN_g = det.comp_align;
/* Set the platform's alignment (assumes long double's order