summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorSean McBride <sean@rogue-research.com>2023-06-16 04:49:02 (GMT)
committerGitHub <noreply@github.com>2023-06-16 04:49:02 (GMT)
commit68eba3da69e659fab69bbef5901ce42e82cea1dc (patch)
treef36805f798df6c04092c14dc6803d2cb82f6eff2 /src
parent10093f7c4345061bdbebc12888debbf08fe85a5b (diff)
downloadhdf5-68eba3da69e659fab69bbef5901ce42e82cea1dc.zip
hdf5-68eba3da69e659fab69bbef5901ce42e82cea1dc.tar.gz
hdf5-68eba3da69e659fab69bbef5901ce42e82cea1dc.tar.bz2
Many clang -Wextra-semi-stmt fixes (#2537)
* Adds semicolons to function-like macros * Adds a do..while(0) loop to some macros * Removes semicolons when inappropriate, especially H5E_TRY_BEGIN/END
Diffstat (limited to 'src')
-rw-r--r--src/H5Abtree2.c10
-rw-r--r--src/H5Aint.c4
-rw-r--r--src/H5B2cache.c2
-rw-r--r--src/H5B2dbg.c4
-rw-r--r--src/H5B2hdr.c8
-rw-r--r--src/H5B2int.c8
-rw-r--r--src/H5C.c2
-rw-r--r--src/H5CS.c2
-rw-r--r--src/H5Cdbg.c8
-rw-r--r--src/H5Centry.c32
-rw-r--r--src/H5Cimage.c12
-rw-r--r--src/H5Cmpio.c6
-rw-r--r--src/H5Cpkg.h30
-rw-r--r--src/H5Cquery.c4
-rw-r--r--src/H5Dbtree2.c2
-rw-r--r--src/H5Dchunk.c20
-rw-r--r--src/H5Dearray.c2
-rw-r--r--src/H5Dfarray.c2
-rw-r--r--src/H5Dint.c6
-rw-r--r--src/H5Dnone.c2
-rw-r--r--src/H5Dsingle.c2
-rw-r--r--src/H5Dvirtual.c6
-rw-r--r--src/H5EAcache.c4
-rw-r--r--src/H5ESevent.c2
-rw-r--r--src/H5Epublic.h2
-rw-r--r--src/H5FAtest.c4
-rw-r--r--src/H5FD.c2
-rw-r--r--src/H5FDfamily.c6
-rw-r--r--src/H5FDhdfs.c4
-rw-r--r--src/H5FDmirror.c10
-rw-r--r--src/H5FDmulti.c94
-rw-r--r--src/H5FDonion.c40
-rw-r--r--src/H5FDonion_header.c16
-rw-r--r--src/H5FDonion_history.c16
-rw-r--r--src/H5FDonion_index.c44
-rw-r--r--src/H5FDros3.c4
-rw-r--r--src/H5FDs3comms.c26
-rw-r--r--src/H5FDsplitter.c2
-rw-r--r--src/H5FS.c1
-rw-r--r--src/H5Fefc.c4
-rw-r--r--src/H5Fio.c6
-rw-r--r--src/H5Fmpi.c8
-rw-r--r--src/H5Fsuper.c2
-rw-r--r--src/H5Gbtree2.c8
-rw-r--r--src/H5Gdeprec.c10
-rw-r--r--src/H5Gent.c1
-rw-r--r--src/H5Glink.c2
-rw-r--r--src/H5Gname.c2
-rw-r--r--src/H5Gnode.c2
-rw-r--r--src/H5Gtest.c2
-rw-r--r--src/H5Gtraverse.c2
-rw-r--r--src/H5HFcache.c2
-rw-r--r--src/H5HFdbg.c6
-rw-r--r--src/H5HFhuge.c20
-rw-r--r--src/H5HFpkg.h8
-rw-r--r--src/H5HG.c4
-rw-r--r--src/H5HGdbg.c2
-rw-r--r--src/H5HLcache.c6
-rw-r--r--src/H5HLdblk.c2
-rw-r--r--src/H5Iint.c10
-rw-r--r--src/H5O.c10
-rw-r--r--src/H5Oainfo.c4
-rw-r--r--src/H5Oattr.c2
-rw-r--r--src/H5Ocache.c4
-rw-r--r--src/H5Ocopy.c2
-rw-r--r--src/H5Odeprec.c6
-rw-r--r--src/H5Odtype.c8
-rw-r--r--src/H5Oflush.c6
-rw-r--r--src/H5Oginfo.c16
-rw-r--r--src/H5Oint.c14
-rw-r--r--src/H5Olayout.c4
-rw-r--r--src/H5Olinfo.c6
-rw-r--r--src/H5Olink.c12
-rw-r--r--src/H5Omessage.c2
-rw-r--r--src/H5Opline.c2
-rw-r--r--src/H5Orefcount.c2
-rw-r--r--src/H5Oshared.c2
-rw-r--r--src/H5Ostab.c2
-rw-r--r--src/H5Otest.c6
-rw-r--r--src/H5PLpath.c2
-rw-r--r--src/H5Pdcpl.c12
-rw-r--r--src/H5Pdxpl.c12
-rw-r--r--src/H5Pencdec.c8
-rw-r--r--src/H5Pfcpl.c12
-rw-r--r--src/H5Pgcpl.c24
-rw-r--r--src/H5Pocpl.c12
-rw-r--r--src/H5Pocpypl.c2
-rw-r--r--src/H5Shyper.c28
-rw-r--r--src/H5Tconv.c4
-rw-r--r--src/H5VLcallback.c2
-rw-r--r--src/H5VLnative.c2
-rw-r--r--src/H5VMprivate.h12
-rw-r--r--src/H5Zscaleoffset.c129
-rw-r--r--src/H5Ztrans.c6
-rw-r--r--src/H5checksum.c8
-rw-r--r--src/H5encode.h132
-rw-r--r--src/H5private.h9
97 files changed, 549 insertions, 537 deletions
diff --git a/src/H5Abtree2.c b/src/H5Abtree2.c
index 788aab7..18518fd 100644
--- a/src/H5Abtree2.c
+++ b/src/H5Abtree2.c
@@ -306,8 +306,8 @@ H5A__dense_btree2_name_encode(uint8_t *raw, const void *_nrecord, void H5_ATTR_U
H5MM_memcpy(raw, nrecord->id.id, (size_t)H5O_FHEAP_ID_LEN);
raw += H5O_FHEAP_ID_LEN;
*raw++ = nrecord->flags;
- UINT32ENCODE(raw, nrecord->corder)
- UINT32ENCODE(raw, nrecord->hash)
+ UINT32ENCODE(raw, nrecord->corder);
+ UINT32ENCODE(raw, nrecord->hash);
FUNC_LEAVE_NOAPI(SUCCEED)
} /* H5A__dense_btree2_name_encode() */
@@ -336,8 +336,8 @@ H5A__dense_btree2_name_decode(const uint8_t *raw, void *_nrecord, void H5_ATTR_U
H5MM_memcpy(nrecord->id.id, raw, (size_t)H5O_FHEAP_ID_LEN);
raw += H5O_FHEAP_ID_LEN;
nrecord->flags = *raw++;
- UINT32DECODE(raw, nrecord->corder)
- UINT32DECODE(raw, nrecord->hash)
+ UINT32DECODE(raw, nrecord->corder);
+ UINT32DECODE(raw, nrecord->hash);
FUNC_LEAVE_NOAPI(SUCCEED)
} /* H5A__dense_btree2_name_decode() */
@@ -459,7 +459,7 @@ H5A__dense_btree2_corder_encode(uint8_t *raw, const void *_nrecord, void H5_ATTR
H5MM_memcpy(raw, nrecord->id.id, (size_t)H5O_FHEAP_ID_LEN);
raw += H5O_FHEAP_ID_LEN;
*raw++ = nrecord->flags;
- UINT32ENCODE(raw, nrecord->corder)
+ UINT32ENCODE(raw, nrecord->corder);
FUNC_LEAVE_NOAPI(SUCCEED)
} /* H5A__dense_btree2_corder_encode() */
diff --git a/src/H5Aint.c b/src/H5Aint.c
index a36836b..ad6e076 100644
--- a/src/H5Aint.c
+++ b/src/H5Aint.c
@@ -1935,7 +1935,7 @@ H5A__attr_iterate_table(const H5A_attr_table_t *atable, hsize_t skip, hsize_t *l
*last_attr = skip;
/* Iterate over attribute messages */
- H5_CHECKED_ASSIGN(u, size_t, skip, hsize_t)
+ H5_CHECKED_ASSIGN(u, size_t, skip, hsize_t);
for (; u < atable->nattrs && !ret_value; u++) {
/* Check which type of callback to make */
switch (attr_op->op_type) {
@@ -2566,7 +2566,7 @@ H5A__dense_post_copy_file_cb(const H5A_t *attr_src, void *_udata)
HGOTO_ERROR(H5E_OHDR, H5E_CANTINIT, FAIL, "unable to reset attribute sharing")
/* Set COPIED tag for destination object's metadata */
- H5_BEGIN_TAG(H5AC__COPIED_TAG);
+ H5_BEGIN_TAG(H5AC__COPIED_TAG)
/* Insert attribute into dense storage */
if (H5A__dense_insert(udata->file, udata->ainfo, attr_dst) < 0)
diff --git a/src/H5B2cache.c b/src/H5B2cache.c
index 539606b..e29d0c7 100644
--- a/src/H5B2cache.c
+++ b/src/H5B2cache.c
@@ -697,7 +697,7 @@ H5B2__cache_int_deserialize(const void *_image, size_t H5_ATTR_UNUSED len, void
H5_CHECKED_ASSIGN(int_node_ptr->node_nrec, uint16_t, node_nrec, int);
if (udata->depth > 1)
UINT64DECODE_VAR(image, int_node_ptr->all_nrec,
- udata->hdr->node_info[udata->depth - 1].cum_max_nrec_size)
+ udata->hdr->node_info[udata->depth - 1].cum_max_nrec_size);
else
int_node_ptr->all_nrec = int_node_ptr->node_nrec;
diff --git a/src/H5B2dbg.c b/src/H5B2dbg.c
index e482086..9effa74 100644
--- a/src/H5B2dbg.c
+++ b/src/H5B2dbg.c
@@ -192,7 +192,7 @@ H5B2__int_debug(H5F_t *f, haddr_t addr, FILE *stream, int indent, int fwidth, co
*/
H5_CHECK_OVERFLOW(depth, unsigned, uint16_t);
node_ptr.addr = addr;
- H5_CHECKED_ASSIGN(node_ptr.node_nrec, uint16_t, nrec, unsigned)
+ H5_CHECKED_ASSIGN(node_ptr.node_nrec, uint16_t, nrec, unsigned);
if (NULL == (internal = H5B2__protect_internal(hdr, NULL, &node_ptr, (uint16_t)depth, FALSE,
H5AC__READ_ONLY_FLAG)))
HGOTO_ERROR(H5E_BTREE, H5E_CANTLOAD, FAIL, "unable to load B-tree internal node")
@@ -293,7 +293,7 @@ H5B2__leaf_debug(H5F_t *f, haddr_t addr, FILE *stream, int indent, int fwidth, c
*/
H5_CHECK_OVERFLOW(nrec, unsigned, uint16_t);
node_ptr.addr = addr;
- H5_CHECKED_ASSIGN(node_ptr.node_nrec, uint16_t, nrec, unsigned)
+ H5_CHECKED_ASSIGN(node_ptr.node_nrec, uint16_t, nrec, unsigned);
if (NULL == (leaf = H5B2__protect_leaf(hdr, NULL, &node_ptr, FALSE, H5AC__READ_ONLY_FLAG)))
HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to protect B-tree leaf node")
diff --git a/src/H5B2hdr.c b/src/H5B2hdr.c
index 68f1f3d..30a40e9 100644
--- a/src/H5B2hdr.c
+++ b/src/H5B2hdr.c
@@ -142,7 +142,7 @@ H5B2__hdr_init(H5B2_hdr_t *hdr, const H5B2_create_t *cparam, void *ctx_udata, ui
/* Initialize leaf node info */
sz_max_nrec = H5B2_NUM_LEAF_REC(hdr->node_size, hdr->rrec_size);
- H5_CHECKED_ASSIGN(hdr->node_info[0].max_nrec, unsigned, sz_max_nrec, size_t)
+ H5_CHECKED_ASSIGN(hdr->node_info[0].max_nrec, unsigned, sz_max_nrec, size_t);
hdr->node_info[0].split_nrec = (hdr->node_info[0].max_nrec * hdr->split_percent) / 100;
hdr->node_info[0].merge_nrec = (hdr->node_info[0].max_nrec * hdr->merge_percent) / 100;
hdr->node_info[0].cum_max_nrec = hdr->node_info[0].max_nrec;
@@ -165,14 +165,14 @@ H5B2__hdr_init(H5B2_hdr_t *hdr, const H5B2_create_t *cparam, void *ctx_udata, ui
/* Compute size to store # of records in each node */
/* (uses leaf # of records because its the largest) */
u_max_nrec_size = H5VM_limit_enc_size((uint64_t)hdr->node_info[0].max_nrec);
- H5_CHECKED_ASSIGN(hdr->max_nrec_size, uint8_t, u_max_nrec_size, unsigned)
+ H5_CHECKED_ASSIGN(hdr->max_nrec_size, uint8_t, u_max_nrec_size, unsigned);
HDassert(hdr->max_nrec_size <= H5B2_SIZEOF_RECORDS_PER_NODE);
/* Initialize internal node info */
if (depth > 0) {
for (u = 1; u < (unsigned)(depth + 1); u++) {
sz_max_nrec = H5B2_NUM_INT_REC(hdr, u);
- H5_CHECKED_ASSIGN(hdr->node_info[u].max_nrec, unsigned, sz_max_nrec, size_t)
+ H5_CHECKED_ASSIGN(hdr->node_info[u].max_nrec, unsigned, sz_max_nrec, size_t);
HDassert(hdr->node_info[u].max_nrec <= hdr->node_info[u - 1].max_nrec);
hdr->node_info[u].split_nrec = (hdr->node_info[u].max_nrec * hdr->split_percent) / 100;
@@ -182,7 +182,7 @@ H5B2__hdr_init(H5B2_hdr_t *hdr, const H5B2_create_t *cparam, void *ctx_udata, ui
((hdr->node_info[u].max_nrec + 1) * hdr->node_info[u - 1].cum_max_nrec) +
hdr->node_info[u].max_nrec;
u_max_nrec_size = H5VM_limit_enc_size((uint64_t)hdr->node_info[u].cum_max_nrec);
- H5_CHECKED_ASSIGN(hdr->node_info[u].cum_max_nrec_size, uint8_t, u_max_nrec_size, unsigned)
+ H5_CHECKED_ASSIGN(hdr->node_info[u].cum_max_nrec_size, uint8_t, u_max_nrec_size, unsigned);
if (NULL == (hdr->node_info[u].nat_rec_fac =
H5FL_fac_init(hdr->cls->nrec_size * hdr->node_info[u].max_nrec)))
diff --git a/src/H5B2int.c b/src/H5B2int.c
index 6b5f88e..3ce3e15 100644
--- a/src/H5B2int.c
+++ b/src/H5B2int.c
@@ -362,14 +362,14 @@ H5B2__split_root(H5B2_hdr_t *hdr)
/* Update node info for new depth of tree */
sz_max_nrec = H5B2_NUM_INT_REC(hdr, hdr->depth);
- H5_CHECKED_ASSIGN(hdr->node_info[hdr->depth].max_nrec, unsigned, sz_max_nrec, size_t)
+ H5_CHECKED_ASSIGN(hdr->node_info[hdr->depth].max_nrec, unsigned, sz_max_nrec, size_t);
hdr->node_info[hdr->depth].split_nrec = (hdr->node_info[hdr->depth].max_nrec * hdr->split_percent) / 100;
hdr->node_info[hdr->depth].merge_nrec = (hdr->node_info[hdr->depth].max_nrec * hdr->merge_percent) / 100;
hdr->node_info[hdr->depth].cum_max_nrec =
((hdr->node_info[hdr->depth].max_nrec + 1) * hdr->node_info[hdr->depth - 1].cum_max_nrec) +
hdr->node_info[hdr->depth].max_nrec;
u_max_nrec_size = H5VM_limit_enc_size((uint64_t)hdr->node_info[hdr->depth].cum_max_nrec);
- H5_CHECKED_ASSIGN(hdr->node_info[hdr->depth].cum_max_nrec_size, uint8_t, u_max_nrec_size, unsigned)
+ H5_CHECKED_ASSIGN(hdr->node_info[hdr->depth].cum_max_nrec_size, uint8_t, u_max_nrec_size, unsigned);
if (NULL == (hdr->node_info[hdr->depth].nat_rec_fac =
H5FL_fac_init(hdr->cls->nrec_size * hdr->node_info[hdr->depth].max_nrec)))
HGOTO_ERROR(H5E_RESOURCE, H5E_CANTINIT, FAIL, "can't create node native key block factory")
@@ -546,7 +546,7 @@ H5B2__redistribute2(H5B2_hdr_t *hdr, uint16_t depth, H5B2_internal_t *internal,
/* Count the number of records being moved */
for (u = 0; u < move_nrec; u++)
moved_nrec += right_node_ptrs[u].all_nrec;
- H5_CHECKED_ASSIGN(left_moved_nrec, hssize_t, moved_nrec, hsize_t)
+ H5_CHECKED_ASSIGN(left_moved_nrec, hssize_t, moved_nrec, hsize_t);
right_moved_nrec -= (hssize_t)moved_nrec;
/* Copy node pointers from right node to left */
@@ -619,7 +619,7 @@ H5B2__redistribute2(H5B2_hdr_t *hdr, uint16_t depth, H5B2_internal_t *internal,
for (u = 0; u < move_nrec; u++)
moved_nrec += right_node_ptrs[u].all_nrec;
left_moved_nrec -= (hssize_t)moved_nrec;
- H5_CHECKED_ASSIGN(right_moved_nrec, hssize_t, moved_nrec, hsize_t)
+ H5_CHECKED_ASSIGN(right_moved_nrec, hssize_t, moved_nrec, hsize_t);
} /* end if */
/* Update flush dependencies for grandchildren, if using SWMR */
diff --git a/src/H5C.c b/src/H5C.c
index 3f9b2ad..b85a545 100644
--- a/src/H5C.c
+++ b/src/H5C.c
@@ -1132,7 +1132,7 @@ H5C_set_slist_enabled(H5C_t *cache_ptr, hbool_t slist_enabled, hbool_t clear_sli
entry_ptr = cache_ptr->il_head;
while (entry_ptr != NULL) {
if (entry_ptr->is_dirty)
- H5C__INSERT_ENTRY_IN_SLIST(cache_ptr, entry_ptr, FAIL)
+ H5C__INSERT_ENTRY_IN_SLIST(cache_ptr, entry_ptr, FAIL);
entry_ptr = entry_ptr->il_next;
}
diff --git a/src/H5CS.c b/src/H5CS.c
index c4a8862..a532d9c 100644
--- a/src/H5CS.c
+++ b/src/H5CS.c
@@ -225,7 +225,7 @@ H5CS_pop(void)
/* Pop the function. */
fstack->nused--;
- FUNC_LEAVE_NOAPI_NOFS(SUCCEED);
+ FUNC_LEAVE_NOAPI_NOFS(SUCCEED)
} /* end H5CS_pop() */
/*-------------------------------------------------------------------------
diff --git a/src/H5Cdbg.c b/src/H5Cdbg.c
index 4d8429e..1311f63 100644
--- a/src/H5Cdbg.c
+++ b/src/H5Cdbg.c
@@ -834,8 +834,8 @@ H5C_flush_dependency_exists(H5C_t *cache_ptr, haddr_t parent_addr, haddr_t child
HDassert(H5_addr_defined(child_addr));
HDassert(fd_exists_ptr);
- H5C__SEARCH_INDEX(cache_ptr, parent_addr, parent_ptr, FAIL)
- H5C__SEARCH_INDEX(cache_ptr, child_addr, child_ptr, FAIL)
+ H5C__SEARCH_INDEX(cache_ptr, parent_addr, parent_ptr, FAIL);
+ H5C__SEARCH_INDEX(cache_ptr, child_addr, child_ptr, FAIL);
if (parent_ptr && child_ptr) {
if (child_ptr->flush_dep_nparents > 0) {
@@ -1024,7 +1024,7 @@ H5C_get_entry_ptr_from_addr(H5C_t *cache_ptr, haddr_t addr, void **entry_ptr_ptr
HDassert(H5_addr_defined(addr));
HDassert(entry_ptr_ptr);
- H5C__SEARCH_INDEX(cache_ptr, addr, entry_ptr, FAIL)
+ H5C__SEARCH_INDEX(cache_ptr, addr, entry_ptr, FAIL);
if (entry_ptr == NULL)
/* the entry doesn't exist in the cache -- report this
@@ -1152,7 +1152,7 @@ H5C_verify_entry_type(H5C_t *cache_ptr, haddr_t addr, const H5C_class_t *expecte
HDassert(in_cache_ptr);
HDassert(type_ok_ptr);
- H5C__SEARCH_INDEX(cache_ptr, addr, entry_ptr, FAIL)
+ H5C__SEARCH_INDEX(cache_ptr, addr, entry_ptr, FAIL);
if (entry_ptr == NULL)
/* the entry doesn't exist in the cache -- report this
diff --git a/src/H5Centry.c b/src/H5Centry.c
index 2b90310..46f3dd6 100644
--- a/src/H5Centry.c
+++ b/src/H5Centry.c
@@ -698,7 +698,7 @@ H5C__flush_single_entry(H5F_t *f, H5C_cache_entry_t *entry_ptr, unsigned flags)
* Finally, if the destroy_entry flag is set, discard the
* entry.
*/
- H5C__DELETE_FROM_INDEX(cache_ptr, entry_ptr, FAIL)
+ H5C__DELETE_FROM_INDEX(cache_ptr, entry_ptr, FAIL);
if (entry_ptr->in_slist && del_from_slist_on_destroy)
H5C__REMOVE_ENTRY_FROM_SLIST(cache_ptr, entry_ptr, during_flush, FAIL)
@@ -2038,11 +2038,11 @@ H5C__deserialize_prefetched_entry(H5F_t *f, H5C_t *cache_ptr, H5C_cache_entry_t
#endif
/* Insert the deserialized entry into the cache. */
- H5C__INSERT_IN_INDEX(cache_ptr, ds_entry_ptr, FAIL)
+ H5C__INSERT_IN_INDEX(cache_ptr, ds_entry_ptr, FAIL);
HDassert(!ds_entry_ptr->in_slist);
if (ds_entry_ptr->is_dirty)
- H5C__INSERT_ENTRY_IN_SLIST(cache_ptr, ds_entry_ptr, FAIL)
+ H5C__INSERT_ENTRY_IN_SLIST(cache_ptr, ds_entry_ptr, FAIL);
H5C__UPDATE_RP_FOR_INSERTION(cache_ptr, ds_entry_ptr, FAIL)
@@ -2342,12 +2342,12 @@ H5C_insert_entry(H5F_t *f, const H5C_class_t *type, haddr_t addr, void *thing, u
HGOTO_ERROR(H5E_CACHE, H5E_CANTINS, FAIL, "H5C__make_space_in_cache failed")
} /* end if */
- H5C__INSERT_IN_INDEX(cache_ptr, entry_ptr, FAIL)
+ H5C__INSERT_IN_INDEX(cache_ptr, entry_ptr, FAIL);
/* New entries are presumed to be dirty */
HDassert(entry_ptr->is_dirty);
entry_ptr->flush_marker = set_flush_marker;
- H5C__INSERT_ENTRY_IN_SLIST(cache_ptr, entry_ptr, FAIL)
+ H5C__INSERT_ENTRY_IN_SLIST(cache_ptr, entry_ptr, FAIL);
H5C__UPDATE_RP_FOR_INSERTION(cache_ptr, entry_ptr, FAIL)
#ifdef H5C_DO_EXTREME_SANITY_CHECKS
@@ -2472,7 +2472,7 @@ H5C_mark_entry_dirty(void *thing)
if (was_clean)
H5C__UPDATE_INDEX_FOR_ENTRY_DIRTY(cache_ptr, entry_ptr, FAIL)
if (!entry_ptr->in_slist)
- H5C__INSERT_ENTRY_IN_SLIST(cache_ptr, entry_ptr, FAIL)
+ H5C__INSERT_ENTRY_IN_SLIST(cache_ptr, entry_ptr, FAIL);
/* Update stats for entry being marked dirty */
H5C__UPDATE_STATS_FOR_DIRTY_PIN(cache_ptr, entry_ptr)
@@ -2751,7 +2751,7 @@ H5C_move_entry(H5C_t *cache_ptr, const H5C_class_t *type, haddr_t old_addr, hadd
* don't mark it as dirty either, lest we confuse the flush call back.
*/
if (!entry_ptr->destroy_in_progress) {
- H5C__DELETE_FROM_INDEX(cache_ptr, entry_ptr, FAIL)
+ H5C__DELETE_FROM_INDEX(cache_ptr, entry_ptr, FAIL);
if (entry_ptr->in_slist) {
HDassert(cache_ptr->slist_ptr);
@@ -2780,13 +2780,13 @@ H5C_move_entry(H5C_t *cache_ptr, const H5C_class_t *type, haddr_t old_addr, hadd
} /* end if */
/* Modify cache data structures */
- H5C__INSERT_IN_INDEX(cache_ptr, entry_ptr, FAIL)
- H5C__INSERT_ENTRY_IN_SLIST(cache_ptr, entry_ptr, FAIL)
+ H5C__INSERT_IN_INDEX(cache_ptr, entry_ptr, FAIL);
+ H5C__INSERT_ENTRY_IN_SLIST(cache_ptr, entry_ptr, FAIL);
/* Skip some actions if we're in the middle of flushing the entry */
if (!entry_ptr->flush_in_progress) {
/* Update the replacement policy for the entry */
- H5C__UPDATE_RP_FOR_MOVE(cache_ptr, entry_ptr, was_dirty, FAIL)
+ H5C__UPDATE_RP_FOR_MOVE(cache_ptr, entry_ptr, was_dirty, FAIL);
/* Check for entry changing status and do notifications, etc. */
if (!was_dirty) {
@@ -2924,7 +2924,7 @@ H5C_resize_entry(void *thing, size_t new_size)
entry_ptr->size = new_size;
if (!entry_ptr->in_slist)
- H5C__INSERT_ENTRY_IN_SLIST(cache_ptr, entry_ptr, FAIL)
+ H5C__INSERT_ENTRY_IN_SLIST(cache_ptr, entry_ptr, FAIL);
if (entry_ptr->is_pinned)
H5C__UPDATE_STATS_FOR_DIRTY_PIN(cache_ptr, entry_ptr)
@@ -3289,9 +3289,9 @@ H5C_protect(H5F_t *f, const H5C_class_t *type, haddr_t addr, void *udata, unsign
*/
entry_ptr->flush_me_last = flush_last;
- H5C__INSERT_IN_INDEX(cache_ptr, entry_ptr, NULL)
+ H5C__INSERT_IN_INDEX(cache_ptr, entry_ptr, NULL);
if (entry_ptr->is_dirty && !entry_ptr->in_slist)
- H5C__INSERT_ENTRY_IN_SLIST(cache_ptr, entry_ptr, NULL)
+ H5C__INSERT_ENTRY_IN_SLIST(cache_ptr, entry_ptr, NULL);
/* insert the entry in the data structures used by the replacement
* policy. We are just going to take it out again when we update
@@ -3688,7 +3688,7 @@ H5C_unprotect(H5F_t *f, haddr_t addr, void *thing, unsigned flags)
/* H5C__UPDATE_RP_FOR_UNPROTECT will place the unprotected entry on
* the pinned entry list if entry_ptr->is_pinned is TRUE.
*/
- H5C__UPDATE_RP_FOR_UNPROTECT(cache_ptr, entry_ptr, FAIL)
+ H5C__UPDATE_RP_FOR_UNPROTECT(cache_ptr, entry_ptr, FAIL);
entry_ptr->is_protected = FALSE;
@@ -3699,7 +3699,7 @@ H5C_unprotect(H5F_t *f, haddr_t addr, void *thing, unsigned flags)
entry_ptr->flush_marker |= set_flush_marker;
if (!entry_ptr->in_slist)
/* this is a no-op if cache_ptr->slist_enabled is FALSE */
- H5C__INSERT_ENTRY_IN_SLIST(cache_ptr, entry_ptr, FAIL)
+ H5C__INSERT_ENTRY_IN_SLIST(cache_ptr, entry_ptr, FAIL);
} /* end if */
/* This implementation of the "deleted" option is a bit inefficient, as
@@ -4252,7 +4252,7 @@ H5C_remove_entry(void *_entry)
* 4) Remove it from the tag list for this object
*/
- H5C__DELETE_FROM_INDEX(cache, entry, FAIL)
+ H5C__DELETE_FROM_INDEX(cache, entry, FAIL);
#ifdef H5_HAVE_PARALLEL
/* Check for collective read access flag */
diff --git a/src/H5Cimage.c b/src/H5Cimage.c
index 4188e10..69def29 100644
--- a/src/H5Cimage.c
+++ b/src/H5Cimage.c
@@ -2482,16 +2482,16 @@ H5C__reconstruct_cache_contents(H5F_t *f, H5C_t *cache_ptr)
*/
/* Insert the prefetched entry in the index */
- H5C__INSERT_IN_INDEX(cache_ptr, pf_entry_ptr, FAIL)
+ H5C__INSERT_IN_INDEX(cache_ptr, pf_entry_ptr, FAIL);
/* If dirty, insert the entry into the slist. */
if (pf_entry_ptr->is_dirty)
- H5C__INSERT_ENTRY_IN_SLIST(cache_ptr, pf_entry_ptr, FAIL)
+ H5C__INSERT_ENTRY_IN_SLIST(cache_ptr, pf_entry_ptr, FAIL);
/* Append the entry to the LRU */
- H5C__UPDATE_RP_FOR_INSERT_APPEND(cache_ptr, pf_entry_ptr, FAIL)
+ H5C__UPDATE_RP_FOR_INSERT_APPEND(cache_ptr, pf_entry_ptr, FAIL);
- H5C__UPDATE_STATS_FOR_PREFETCH(cache_ptr, pf_entry_ptr->is_dirty)
+ H5C__UPDATE_STATS_FOR_PREFETCH(cache_ptr, pf_entry_ptr->is_dirty);
/* If the prefetched entry is the child in one or more flush
* dependency relationships, recreate those flush dependencies.
@@ -2503,7 +2503,7 @@ H5C__reconstruct_cache_contents(H5F_t *f, H5C_t *cache_ptr)
/* Find the parent entry */
parent_ptr = NULL;
- H5C__SEARCH_INDEX(cache_ptr, pf_entry_ptr->fd_parent_addrs[v], parent_ptr, FAIL)
+ H5C__SEARCH_INDEX(cache_ptr, pf_entry_ptr->fd_parent_addrs[v], parent_ptr, FAIL);
if (parent_ptr == NULL)
HGOTO_ERROR(H5E_CACHE, H5E_NOTFOUND, FAIL, "fd parent not in cache?!?")
@@ -2522,7 +2522,7 @@ H5C__reconstruct_cache_contents(H5F_t *f, H5C_t *cache_ptr)
HGOTO_ERROR(H5E_CACHE, H5E_CANTDEPEND, FAIL, "Can't restore flush dependency")
/* And now unprotect */
- H5C__UPDATE_RP_FOR_UNPROTECT(cache_ptr, parent_ptr, FAIL)
+ H5C__UPDATE_RP_FOR_UNPROTECT(cache_ptr, parent_ptr, FAIL);
parent_ptr->is_protected = FALSE;
} /* end for */
} /* end for */
diff --git a/src/H5Cmpio.c b/src/H5Cmpio.c
index 2b8527e..46f1ba7 100644
--- a/src/H5Cmpio.c
+++ b/src/H5Cmpio.c
@@ -292,7 +292,7 @@ H5C_apply_candidate_list(H5F_t *f, H5C_t *cache_ptr, unsigned num_candidates, ha
last_addr = addr;
#endif /* H5C_DO_SANITY_CHECKS */
- H5C__SEARCH_INDEX(cache_ptr, addr, entry_ptr, FAIL)
+ H5C__SEARCH_INDEX(cache_ptr, addr, entry_ptr, FAIL);
if (entry_ptr == NULL)
HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "listed candidate entry not in cache?!?!?")
if (!entry_ptr->is_dirty)
@@ -680,7 +680,7 @@ H5C_mark_entries_as_clean(H5F_t *f, unsigned ce_array_len, haddr_t *ce_array_ptr
HDassert(H5_addr_defined(addr));
- H5C__SEARCH_INDEX(cache_ptr, addr, entry_ptr, FAIL)
+ H5C__SEARCH_INDEX(cache_ptr, addr, entry_ptr, FAIL);
if (entry_ptr == NULL) {
#ifdef H5C_DO_SANITY_CHECKS
@@ -990,7 +990,7 @@ done:
if (H5CX_set_io_xfer_mode(orig_xfer_mode) < 0)
HDONE_ERROR(H5E_CACHE, H5E_CANTSET, FAIL, "can't set MPI-I/O transfer mode")
- FUNC_LEAVE_NOAPI(ret_value);
+ FUNC_LEAVE_NOAPI(ret_value)
} /* end H5C__collective_write() */
/*-------------------------------------------------------------------------
diff --git a/src/H5Cpkg.h b/src/H5Cpkg.h
index 1801341..a6204c5 100644
--- a/src/H5Cpkg.h
+++ b/src/H5Cpkg.h
@@ -815,7 +815,7 @@ if ((cache_ptr)->index_size != ((cache_ptr)->clean_index_size + (cache_ptr)->dir
#define H5C__INSERT_IN_INDEX(cache_ptr, entry_ptr, fail_val) \
-{ \
+do { \
int k; \
H5C__PRE_HT_INSERT_SC(cache_ptr, entry_ptr, fail_val) \
k = H5C__HASH_FCN((entry_ptr)->addr); \
@@ -844,10 +844,10 @@ if ((cache_ptr)->index_size != ((cache_ptr)->clean_index_size + (cache_ptr)->dir
(cache_ptr)->il_size, fail_val) \
H5C__UPDATE_STATS_FOR_HT_INSERTION(cache_ptr) \
H5C__POST_HT_INSERT_SC(cache_ptr, entry_ptr, fail_val) \
-}
+} while (0)
#define H5C__DELETE_FROM_INDEX(cache_ptr, entry_ptr, fail_val) \
-{ \
+do { \
int k; \
H5C__PRE_HT_REMOVE_SC(cache_ptr, entry_ptr, fail_val) \
k = H5C__HASH_FCN((entry_ptr)->addr); \
@@ -879,7 +879,7 @@ if ((cache_ptr)->index_size != ((cache_ptr)->clean_index_size + (cache_ptr)->dir
(cache_ptr)->il_size, fail_val) \
H5C__UPDATE_STATS_FOR_HT_DELETION(cache_ptr) \
H5C__POST_HT_REMOVE_SC(cache_ptr, entry_ptr, fail_val) \
-}
+} while (0)
#define H5C__SEARCH_INDEX(cache_ptr, entry_addr, entry_ptr, fail_val) \
{ \
@@ -958,7 +958,7 @@ if ((cache_ptr)->index_size != ((cache_ptr)->clean_index_size + (cache_ptr)->dir
(old_size), (new_size), (fail_val)) \
H5C__POST_HT_ENTRY_SIZE_CHANGE_SC(cache_ptr, old_size, new_size, \
entry_ptr, fail_val) \
-}
+} while (0)
/**************************************************************************
@@ -1022,7 +1022,7 @@ if ((cache_ptr)->index_size != ((cache_ptr)->clean_index_size + (cache_ptr)->dir
*/
#define H5C__INSERT_ENTRY_IN_SLIST(cache_ptr, entry_ptr, fail_val) \
-{ \
+do { \
HDassert(cache_ptr); \
\
if((cache_ptr)->slist_enabled) { \
@@ -1056,7 +1056,7 @@ if ((cache_ptr)->index_size != ((cache_ptr)->clean_index_size + (cache_ptr)->dir
HDassert((cache_ptr)->slist_len == 0); \
HDassert((cache_ptr)->slist_size == 0); \
} \
-} /* H5C__INSERT_ENTRY_IN_SLIST */
+} while (0) /* H5C__INSERT_ENTRY_IN_SLIST */
/*-------------------------------------------------------------------------
@@ -1124,7 +1124,7 @@ if ((cache_ptr)->index_size != ((cache_ptr)->clean_index_size + (cache_ptr)->dir
*/
#define H5C__UPDATE_SLIST_FOR_SIZE_CHANGE(cache_ptr, old_size, new_size) \
-{ \
+do { \
HDassert(cache_ptr); \
\
if((cache_ptr)->slist_enabled) { \
@@ -1158,7 +1158,7 @@ if ((cache_ptr)->index_size != ((cache_ptr)->clean_index_size + (cache_ptr)->dir
HDassert((cache_ptr)->slist_len == 0); \
HDassert((cache_ptr)->slist_size == 0); \
} \
-} /* H5C__UPDATE_SLIST_FOR_SIZE_CHANGE */
+} while (0) /* H5C__UPDATE_SLIST_FOR_SIZE_CHANGE */
/**************************************************************************
@@ -1461,7 +1461,7 @@ if ((cache_ptr)->index_size != ((cache_ptr)->clean_index_size + (cache_ptr)->dir
*/
#define H5C__UPDATE_RP_FOR_INSERT_APPEND(cache_ptr, entry_ptr, fail_val) \
-{ \
+do { \
HDassert(cache_ptr); \
HDassert(entry_ptr); \
HDassert(!(entry_ptr)->is_protected); \
@@ -1484,7 +1484,7 @@ if ((cache_ptr)->index_size != ((cache_ptr)->clean_index_size + (cache_ptr)->dir
/* Maintain the clean & dirty LRU lists, if enabled */ \
H5C__UPDATE_RP_FOR_INSERT_APPEND_CD_LRU(cache_ptr, entry_ptr, fail_val) \
} \
-}
+} while (0)
/*-------------------------------------------------------------------------
@@ -1592,7 +1592,7 @@ if ((cache_ptr)->index_size != ((cache_ptr)->clean_index_size + (cache_ptr)->dir
*/
#define H5C__UPDATE_RP_FOR_MOVE(cache_ptr, entry_ptr, was_dirty, fail_val) \
-{ \
+do { \
HDassert(cache_ptr); \
HDassert(entry_ptr); \
HDassert(!(entry_ptr)->is_read_only); \
@@ -1615,7 +1615,7 @@ if ((cache_ptr)->index_size != ((cache_ptr)->clean_index_size + (cache_ptr)->dir
/* Maintain the clean & dirty LRU lists, if enabled */ \
H5C__UPDATE_RP_FOR_MOVE_CD_LRU(cache_ptr, entry_ptr, was_dirty, fail_val) \
} \
-} /* H5C__UPDATE_RP_FOR_MOVE */
+} while (0) /* H5C__UPDATE_RP_FOR_MOVE */
/*-------------------------------------------------------------------------
@@ -1751,7 +1751,7 @@ if ((cache_ptr)->index_size != ((cache_ptr)->clean_index_size + (cache_ptr)->dir
*/
#define H5C__UPDATE_RP_FOR_UNPROTECT(cache_ptr, entry_ptr, fail_val) \
-{ \
+do { \
HDassert(cache_ptr); \
HDassert(entry_ptr); \
HDassert((entry_ptr)->is_protected); \
@@ -1779,7 +1779,7 @@ if ((cache_ptr)->index_size != ((cache_ptr)->clean_index_size + (cache_ptr)->dir
/* Maintain the clean & dirty LRU lists, if enabled */ \
H5C__UPDATE_RP_FOR_UNPROTECT_CD_LRU(cache_ptr, entry_ptr, fail_val) \
} \
-} /* H5C__UPDATE_RP_FOR_UNPROTECT */
+} while (0) /* H5C__UPDATE_RP_FOR_UNPROTECT */
#ifdef H5_HAVE_PARALLEL
diff --git a/src/H5Cquery.c b/src/H5Cquery.c
index 0b62a1a..c25668b 100644
--- a/src/H5Cquery.c
+++ b/src/H5Cquery.c
@@ -250,7 +250,7 @@ H5C_get_entry_status(const H5F_t *f, haddr_t addr, size_t *size_ptr, hbool_t *in
if (cache_ptr == NULL)
HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "Bad cache_ptr on entry.")
- H5C__SEARCH_INDEX(cache_ptr, addr, entry_ptr, FAIL)
+ H5C__SEARCH_INDEX(cache_ptr, addr, entry_ptr, FAIL);
if (entry_ptr == NULL) {
/* the entry doesn't exist in the cache -- report this
@@ -372,7 +372,7 @@ H5C_get_entry_ring(const H5F_t *f, haddr_t addr, H5C_ring_t *ring)
HDassert(H5_addr_defined(addr));
/* Locate the entry at the address */
- H5C__SEARCH_INDEX(cache_ptr, addr, entry_ptr, FAIL)
+ H5C__SEARCH_INDEX(cache_ptr, addr, entry_ptr, FAIL);
if (entry_ptr == NULL)
HGOTO_ERROR(H5E_CACHE, H5E_NOTFOUND, FAIL, "can't find entry in index")
diff --git a/src/H5Dbtree2.c b/src/H5Dbtree2.c
index 9cb464a..135c564 100644
--- a/src/H5Dbtree2.c
+++ b/src/H5Dbtree2.c
@@ -1321,7 +1321,7 @@ H5D__bt2_idx_copy_setup(const H5D_chk_idx_info_t *idx_info_src, const H5D_chk_id
HGOTO_ERROR(H5E_DATASET, H5E_CANTOPENOBJ, FAIL, "can't open v2 B-tree")
/* Set copied metadata tag */
- H5_BEGIN_TAG(H5AC__COPIED_TAG);
+ H5_BEGIN_TAG(H5AC__COPIED_TAG)
/* Create v2 B-tree that describes the chunked dataset in the destination file */
if (H5D__bt2_idx_create(idx_info_dst) < 0)
diff --git a/src/H5Dchunk.c b/src/H5Dchunk.c
index 1dd827e..840b1ce 100644
--- a/src/H5Dchunk.c
+++ b/src/H5Dchunk.c
@@ -79,13 +79,14 @@
/* Sanity check on chunk index types: commonly used by a lot of routines in this file */
#define H5D_CHUNK_STORAGE_INDEX_CHK(storage) \
- HDassert((H5D_CHUNK_IDX_EARRAY == (storage)->idx_type && H5D_COPS_EARRAY == (storage)->ops) || \
- (H5D_CHUNK_IDX_FARRAY == (storage)->idx_type && H5D_COPS_FARRAY == (storage)->ops) || \
- (H5D_CHUNK_IDX_BT2 == (storage)->idx_type && H5D_COPS_BT2 == (storage)->ops) || \
- (H5D_CHUNK_IDX_BTREE == (storage)->idx_type && H5D_COPS_BTREE == (storage)->ops) || \
- (H5D_CHUNK_IDX_SINGLE == (storage)->idx_type && H5D_COPS_SINGLE == (storage)->ops) || \
- (H5D_CHUNK_IDX_NONE == (storage)->idx_type && H5D_COPS_NONE == (storage)->ops));
-
+ do { \
+ HDassert((H5D_CHUNK_IDX_EARRAY == (storage)->idx_type && H5D_COPS_EARRAY == (storage)->ops) || \
+ (H5D_CHUNK_IDX_FARRAY == (storage)->idx_type && H5D_COPS_FARRAY == (storage)->ops) || \
+ (H5D_CHUNK_IDX_BT2 == (storage)->idx_type && H5D_COPS_BT2 == (storage)->ops) || \
+ (H5D_CHUNK_IDX_BTREE == (storage)->idx_type && H5D_COPS_BTREE == (storage)->ops) || \
+ (H5D_CHUNK_IDX_SINGLE == (storage)->idx_type && H5D_COPS_SINGLE == (storage)->ops) || \
+ (H5D_CHUNK_IDX_NONE == (storage)->idx_type && H5D_COPS_NONE == (storage)->ops)); \
+ } while (0)
/*
* Feature: If this constant is defined then every cache preemption and load
* causes a character to be printed on the standard error stream:
@@ -3824,8 +3825,7 @@ H5D__chunk_lookup(const H5D_t *dset, const hsize_t *scaled, H5D_chunk_ud_t *udat
udata->idx_hint = idx;
udata->chunk_block.offset = ent->chunk_block.offset;
udata->chunk_block.length = ent->chunk_block.length;
- ;
- udata->chunk_idx = ent->chunk_idx;
+ udata->chunk_idx = ent->chunk_idx;
} /* end if */
else {
/* Invalidate idx_hint, to signal that the chunk is not in cache */
@@ -6885,7 +6885,7 @@ H5D__chunk_copy_cb(const H5D_chunk_rec_t *chunk_rec, void *_udata)
HGOTO_ERROR(H5E_DATASET, H5E_WRITEERROR, H5_ITER_ERROR, "unable to write raw data to file")
/* Set metadata tag in API context */
- H5_BEGIN_TAG(H5AC__COPIED_TAG);
+ H5_BEGIN_TAG(H5AC__COPIED_TAG)
/* Insert chunk record into index */
if (need_insert && udata->idx_info_dst->storage->ops->insert)
diff --git a/src/H5Dearray.c b/src/H5Dearray.c
index 5662c08..36c3dbc 100644
--- a/src/H5Dearray.c
+++ b/src/H5Dearray.c
@@ -1577,7 +1577,7 @@ H5D__earray_idx_copy_setup(const H5D_chk_idx_info_t *idx_info_src, const H5D_chk
HGOTO_ERROR(H5E_DATASET, H5E_CANTOPENOBJ, FAIL, "can't open extensible array")
/* Set copied metadata tag */
- H5_BEGIN_TAG(H5AC__COPIED_TAG);
+ H5_BEGIN_TAG(H5AC__COPIED_TAG)
/* Create the extensible array that describes chunked storage in the dest. file */
if (H5D__earray_idx_create(idx_info_dst) < 0)
diff --git a/src/H5Dfarray.c b/src/H5Dfarray.c
index bcb4106..e215230 100644
--- a/src/H5Dfarray.c
+++ b/src/H5Dfarray.c
@@ -1435,7 +1435,7 @@ H5D__farray_idx_copy_setup(const H5D_chk_idx_info_t *idx_info_src, const H5D_chk
HGOTO_ERROR(H5E_DATASET, H5E_CANTOPENOBJ, FAIL, "can't open fixed array")
/* Set copied metadata tag */
- H5_BEGIN_TAG(H5AC__COPIED_TAG);
+ H5_BEGIN_TAG(H5AC__COPIED_TAG)
/* Create the fixed array that describes chunked storage in the dest. file */
if (H5D__farray_idx_create(idx_info_dst) < 0)
diff --git a/src/H5Dint.c b/src/H5Dint.c
index 2c3586e..3c5dbe6 100644
--- a/src/H5Dint.c
+++ b/src/H5Dint.c
@@ -668,7 +668,7 @@ H5D__use_minimized_dset_headers(H5F_t *file, hbool_t *minimize)
done:
if (FAIL == ret_value)
*minimize = FALSE;
- FUNC_LEAVE_NOAPI(ret_value);
+ FUNC_LEAVE_NOAPI(ret_value)
} /* H5D__use_minimized_dset_headers */
/*-------------------------------------------------------------------------
@@ -788,7 +788,7 @@ H5D__calculate_minimum_header_size(H5F_t *file, H5D_t *dset, H5O_t *ohdr)
}
done:
- FUNC_LEAVE_NOAPI(ret_value);
+ FUNC_LEAVE_NOAPI(ret_value)
} /* H5D__calculate_minimum_header_size */
/*-------------------------------------------------------------------------
@@ -830,7 +830,7 @@ H5D__prepare_minimized_oh(H5F_t *file, H5D_t *dset, H5O_loc_t *oloc)
HGOTO_ERROR(H5E_OHDR, H5E_BADVALUE, FAIL, "can't apply object header to file")
done:
- FUNC_LEAVE_NOAPI(ret_value);
+ FUNC_LEAVE_NOAPI(ret_value)
} /* H5D__prepare_minimized_oh */
/*-------------------------------------------------------------------------
diff --git a/src/H5Dnone.c b/src/H5Dnone.c
index f4a6b26e..eb2a137 100644
--- a/src/H5Dnone.c
+++ b/src/H5Dnone.c
@@ -385,7 +385,7 @@ H5D__none_idx_copy_setup(const H5D_chk_idx_info_t H5_ATTR_NDEBUG_UNUSED *idx_inf
HDassert(idx_info_dst->storage);
/* Set copied metadata tag */
- H5_BEGIN_TAG(H5AC__COPIED_TAG);
+ H5_BEGIN_TAG(H5AC__COPIED_TAG)
/* Allocate dataset chunks in the dest. file */
if (H5D__none_idx_create(idx_info_dst) < 0)
diff --git a/src/H5Dsingle.c b/src/H5Dsingle.c
index 8c144e8..9566a5c 100644
--- a/src/H5Dsingle.c
+++ b/src/H5Dsingle.c
@@ -442,7 +442,7 @@ H5D__single_idx_copy_setup(const H5D_chk_idx_info_t H5_ATTR_NDEBUG_UNUSED *idx_i
HDassert(idx_info_dst->storage);
/* Set copied metadata tag */
- H5_BEGIN_TAG(H5AC__COPIED_TAG);
+ H5_BEGIN_TAG(H5AC__COPIED_TAG)
/* Set up information at the destination file */
if (H5D__single_idx_create(idx_info_dst) < 0)
diff --git a/src/H5Dvirtual.c b/src/H5Dvirtual.c
index 6695c02..f850e1c 100644
--- a/src/H5Dvirtual.c
+++ b/src/H5Dvirtual.c
@@ -496,7 +496,7 @@ H5D__virtual_store_layout(H5F_t *f, H5O_layout_t *layout)
/* Number of entries */
tmp_nentries = (hsize_t)virt->list_nused;
- H5F_ENCODE_LENGTH(f, heap_block_p, tmp_nentries)
+ H5F_ENCODE_LENGTH(f, heap_block_p, tmp_nentries);
/* Encode each entry */
for (i = 0; i < virt->list_nused; i++) {
@@ -520,7 +520,7 @@ H5D__virtual_store_layout(H5F_t *f, H5O_layout_t *layout)
/* Checksum */
chksum = H5_checksum_metadata(heap_block, block_size - (size_t)4, 0);
- UINT32ENCODE(heap_block_p, chksum)
+ UINT32ENCODE(heap_block_p, chksum);
/* Insert block into global heap */
if (H5HG_insert(f, block_size, heap_block, &(virt->serial_list_hobjid)) < 0)
@@ -1117,7 +1117,7 @@ H5D__virtual_str_append(const char *src, size_t src_len, char **p, char **buf, s
**p = '\0';
done:
- FUNC_LEAVE_NOAPI(ret_value);
+ FUNC_LEAVE_NOAPI(ret_value)
} /* end H5D__virtual_str_append() */
/*-------------------------------------------------------------------------
diff --git a/src/H5EAcache.c b/src/H5EAcache.c
index bd96179..b006ecb 100644
--- a/src/H5EAcache.c
+++ b/src/H5EAcache.c
@@ -270,7 +270,7 @@ H5EA__cache_hdr_verify_chksum(const void *_image, size_t len, void H5_ATTR_UNUSE
if (stored_chksum != computed_chksum)
ret_value = FALSE;
- FUNC_LEAVE_NOAPI(ret_value);
+ FUNC_LEAVE_NOAPI(ret_value)
} /* end H5EA__cache_hdr_verify_chksum() */
/*-------------------------------------------------------------------------
@@ -1631,7 +1631,7 @@ done:
if (dblock && H5EA__dblock_dest(dblock) < 0)
HDONE_ERROR(H5E_EARRAY, H5E_CANTFREE, NULL, "unable to destroy extensible array data block")
- FUNC_LEAVE_NOAPI(ret_value);
+ FUNC_LEAVE_NOAPI(ret_value)
} /* end H5EA__cache_dblock_deserialize() */
/*-------------------------------------------------------------------------
diff --git a/src/H5ESevent.c b/src/H5ESevent.c
index abd7fbf..2edb61d 100644
--- a/src/H5ESevent.c
+++ b/src/H5ESevent.c
@@ -114,7 +114,7 @@ H5ES__event_new(H5VL_t *connector, void *token)
ret_value = ev;
done:
- FUNC_LEAVE_NOAPI(ret_value);
+ FUNC_LEAVE_NOAPI(ret_value)
} /* end H5ES__event_new() */
/*-------------------------------------------------------------------------
diff --git a/src/H5Epublic.h b/src/H5Epublic.h
index 50ae941..1d7d7b5 100644
--- a/src/H5Epublic.h
+++ b/src/H5Epublic.h
@@ -79,7 +79,7 @@ H5_DLLVAR hid_t H5E_ERR_CLS_g;
* easier just to use this macro like:
* H5E_BEGIN_TRY {
* ...stuff here that's likely to fail...
- * } H5E_END_TRY;
+ * } H5E_END_TRY
*
* Warning: don't break, return, or longjmp() from the body of the loop or
* the error reporting won't be properly restored!
diff --git a/src/H5FAtest.c b/src/H5FAtest.c
index ffd064d..d841b32 100644
--- a/src/H5FAtest.c
+++ b/src/H5FAtest.c
@@ -341,7 +341,7 @@ H5FA__test_crt_dbg_context(H5F_t H5_ATTR_UNUSED *f, haddr_t H5_ATTR_UNUSED obj_a
ret_value = ctx;
done:
- FUNC_LEAVE_NOAPI(ret_value);
+ FUNC_LEAVE_NOAPI(ret_value)
} /* end H5FA__test_crt_dbg_context() */
/*-------------------------------------------------------------------------
@@ -369,7 +369,7 @@ H5FA__get_cparam_test(const H5FA_t *fa, H5FA_create_t *cparam)
cparam->raw_elmt_size = fa->hdr->cparam.raw_elmt_size;
cparam->nelmts = fa->hdr->cparam.nelmts;
- FUNC_LEAVE_NOAPI(SUCCEED);
+ FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5FA__get_cparam_test() */
/*-------------------------------------------------------------------------
diff --git a/src/H5FD.c b/src/H5FD.c
index bfeef36..dee74ee 100644
--- a/src/H5FD.c
+++ b/src/H5FD.c
@@ -929,7 +929,7 @@ H5FD_cmp(const H5FD_t *f1, const H5FD_t *f2)
{
int ret_value = -1; /* Return value */
- FUNC_ENTER_NOAPI_NOERR; /* return value is arbitrary */
+ FUNC_ENTER_NOAPI_NOERR /* return value is arbitrary */
if ((!f1 || !f1->cls) && (!f2 || !f2->cls))
HGOTO_DONE(0)
diff --git a/src/H5FDfamily.c b/src/H5FDfamily.c
index 82c65ec..9a01e7f 100644
--- a/src/H5FDfamily.c
+++ b/src/H5FDfamily.c
@@ -813,7 +813,7 @@ H5FD__family_open(const char *name, unsigned flags, hid_t fapl_id, haddr_t maxad
file->memb[file->nmembs] =
H5FDopen(memb_name, (0 == file->nmembs ? flags : t_flags), file->memb_fapl_id, HADDR_UNDEF);
}
- H5E_END_TRY;
+ H5E_END_TRY
if (!file->memb[file->nmembs]) {
if (0 == file->nmembs)
HGOTO_ERROR(H5E_FILE, H5E_CANTOPENFILE, NULL, "unable to open member file")
@@ -1074,7 +1074,7 @@ H5FD__family_set_eoa(H5FD_t *_file, H5FD_mem_t type, haddr_t abs_eoa)
file->memb[u] = H5FDopen(memb_name, file->flags | H5F_ACC_CREAT, file->memb_fapl_id,
(haddr_t)file->memb_size);
}
- H5E_END_TRY;
+ H5E_END_TRY
if (NULL == file->memb[u])
HGOTO_ERROR(H5E_FILE, H5E_CANTOPENFILE, FAIL, "unable to open member file")
} /* end if */
@@ -1566,7 +1566,7 @@ H5FD__family_delete(const char *filename, hid_t fapl_id)
{
delete_error = H5FD_delete(member_name, memb_fapl_id);
}
- H5E_END_TRY;
+ H5E_END_TRY
if (FAIL == delete_error) {
if (0 == current_member)
HGOTO_ERROR(H5E_VFL, H5E_CANTDELETEFILE, FAIL, "unable to delete member file")
diff --git a/src/H5FDhdfs.c b/src/H5FDhdfs.c
index 2c64237..4b1a64f 100644
--- a/src/H5FDhdfs.c
+++ b/src/H5FDhdfs.c
@@ -815,7 +815,7 @@ hdfs__reset_stats(H5FD_hdfs_t *file)
}
done:
- FUNC_LEAVE_NOAPI(ret_value);
+ FUNC_LEAVE_NOAPI(ret_value)
} /* hdfs__reset_stats */
#endif /* HDFS_STATS */
@@ -1162,7 +1162,7 @@ hdfs__fprint_stats(FILE *stream, const H5FD_hdfs_t *file)
}
done:
- FUNC_LEAVE_NOAPI(ret_value);
+ FUNC_LEAVE_NOAPI(ret_value)
} /* hdfs__fprint_stats */
#endif /* HDFS_STATS */
diff --git a/src/H5FDmirror.c b/src/H5FDmirror.c
index 8c222d3..6f6ae8f 100644
--- a/src/H5FDmirror.c
+++ b/src/H5FDmirror.c
@@ -1146,7 +1146,7 @@ done:
if (xmit_buf)
xmit_buf = H5FL_BLK_FREE(xmit, xmit_buf);
- FUNC_LEAVE_NOAPI(ret_value);
+ FUNC_LEAVE_NOAPI(ret_value)
} /* end H5FD__mirror_verify_reply() */
/* -------------------------------------------------------------------------
@@ -1549,7 +1549,7 @@ done:
static herr_t
H5FD__mirror_query(const H5FD_t H5_ATTR_UNUSED *_file, unsigned long *flags)
{
- FUNC_ENTER_PACKAGE_NOERR;
+ FUNC_ENTER_PACKAGE_NOERR
LOG_OP_CALL(__func__);
@@ -1566,7 +1566,7 @@ H5FD__mirror_query(const H5FD_t H5_ATTR_UNUSED *_file, unsigned long *flags)
H5FD_FEAT_AGGREGATE_SMALLDATA | H5FD_FEAT_POSIX_COMPAT_HANDLE | H5FD_FEAT_SUPPORTS_SWMR_IO |
H5FD_FEAT_DEFAULT_VFD_COMPATIBLE;
- FUNC_LEAVE_NOAPI(SUCCEED);
+ FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5FD__mirror_query() */
/*-------------------------------------------------------------------------
@@ -1862,7 +1862,7 @@ done:
if (xmit_buf)
xmit_buf = H5FL_BLK_FREE(xmit, xmit_buf);
- FUNC_LEAVE_NOAPI(ret_value);
+ FUNC_LEAVE_NOAPI(ret_value)
} /* end H5FD__mirror_lock */
/*-------------------------------------------------------------------------
@@ -1906,7 +1906,7 @@ done:
if (xmit_buf)
xmit_buf = H5FL_BLK_FREE(xmit, xmit_buf);
- FUNC_LEAVE_NOAPI(ret_value);
+ FUNC_LEAVE_NOAPI(ret_value)
} /* end H5FD__mirror_unlock */
#endif /* H5_HAVE_MIRROR_VFD */
diff --git a/src/H5FDmulti.c b/src/H5FDmulti.c
index 7885add..371942d 100644
--- a/src/H5FDmulti.c
+++ b/src/H5FDmulti.c
@@ -439,7 +439,7 @@ H5Pget_fapl_multi(hid_t fapl_id, H5FD_mem_t *memb_map /*out*/, hid_t *memb_fapl
{
fa = (const H5FD_multi_fapl_t *)H5Pget_driver_info(fapl_id);
}
- H5E_END_TRY;
+ H5E_END_TRY
if (!fa || (H5P_FILE_ACCESS_DEFAULT == fapl_id)) {
if (H5FD_multi_populate_config(NULL, NULL, NULL, NULL, TRUE, &default_fa) < 0)
H5Epush_ret(func, H5E_ERR_CLS, H5E_VFL, H5E_CANTSET, "can't setup default driver configuration",
@@ -509,7 +509,7 @@ H5FD_split_populate_config(const char *meta_ext, hid_t meta_plist_id, const char
_memb_name[mt] = NULL;
_memb_addr[mt] = HADDR_UNDEF;
}
- END_MEMBERS;
+ END_MEMBERS
/* The file access properties */
_memb_fapl[H5FD_MEM_SUPER] = meta_plist_id;
@@ -573,7 +573,7 @@ H5FD_split_populate_config(const char *meta_ext, hid_t meta_plist_id, const char
if (!_memb_name[mmt] || !_memb_name[mmt][0])
H5Epush_ret(func, H5E_ERR_CLS, H5E_INTERNAL, H5E_BADVALUE, "file resource type not set", -1);
}
- END_MEMBERS;
+ END_MEMBERS
/*
* Initialize driver specific information. No need to copy it into the FA
@@ -595,7 +595,7 @@ H5FD_split_populate_config(const char *meta_ext, hid_t meta_plist_id, const char
"can't set sec2 driver on member FAPL", -1);
}
}
- END_MEMBERS;
+ END_MEMBERS
return ret_value;
}
@@ -727,7 +727,7 @@ H5FD_multi_sb_size(H5FD_t *_file)
UNIQUE_MEMBERS (file->fa.memb_map, mt) {
nseen++;
}
- END_MEMBERS;
+ END_MEMBERS
/* Addresses and EOA markers */
nbytes += nseen * 2 * 8;
@@ -737,7 +737,7 @@ H5FD_multi_sb_size(H5FD_t *_file)
size_t n = strlen(file->fa.memb_name[mt]) + 1;
nbytes += (n + 7) & ~((size_t)0x0007);
}
- END_MEMBERS;
+ END_MEMBERS
return nbytes;
}
@@ -808,7 +808,7 @@ H5FD_multi_sb_encode(H5FD_t *_file, char *name /*out*/, unsigned char *buf /*out
p += sizeof(haddr_t);
nseen++;
}
- END_MEMBERS;
+ END_MEMBERS
if (H5Tconvert(H5T_NATIVE_HADDR, H5T_STD_U64LE, nseen * 2, buf + 8, NULL, H5P_DEFAULT) < 0)
H5Epush_ret(func, H5E_ERR_CLS, H5E_DATATYPE, H5E_CANTCONVERT, "can't convert superblock info", -1);
@@ -821,7 +821,7 @@ H5FD_multi_sb_encode(H5FD_t *_file, char *name /*out*/, unsigned char *buf /*out
for (i = n; i % 8; i++)
*p++ = '\0';
}
- END_MEMBERS;
+ END_MEMBERS
return 0;
} /* end H5FD_multi_sb_encode() */
@@ -875,7 +875,7 @@ H5FD_multi_sb_decode(H5FD_t *_file, const char *name, const unsigned char *buf)
memb_eoa[mt] = HADDR_UNDEF;
memb_name[mt] = NULL;
}
- END_MEMBERS;
+ END_MEMBERS
/*
* Read the map and count the unique members.
@@ -891,7 +891,7 @@ H5FD_multi_sb_decode(H5FD_t *_file, const char *name, const unsigned char *buf)
UNIQUE_MEMBERS (map, mt) {
nseen++;
}
- END_MEMBERS;
+ END_MEMBERS
buf += 8;
/* Decode Address and EOA values */
@@ -906,7 +906,7 @@ H5FD_multi_sb_decode(H5FD_t *_file, const char *name, const unsigned char *buf)
memb_addr[_unmapped] = *ap++;
memb_eoa[_unmapped] = *ap++;
}
- END_MEMBERS;
+ END_MEMBERS
/* Decode name templates */
UNIQUE_MEMBERS (map, mt) {
@@ -914,7 +914,7 @@ H5FD_multi_sb_decode(H5FD_t *_file, const char *name, const unsigned char *buf)
memb_name[_unmapped] = (const char *)buf;
buf += (n + 7) & ~((unsigned)0x0007);
}
- END_MEMBERS;
+ END_MEMBERS
/*
* Use the mapping saved in the superblock in preference to the one
@@ -927,14 +927,14 @@ H5FD_multi_sb_decode(H5FD_t *_file, const char *name, const unsigned char *buf)
ALL_MEMBERS (mt) {
file->fa.memb_map[mt] = map[mt];
}
- END_MEMBERS;
+ END_MEMBERS
/* Close files which are unused now */
memset(in_use, 0, sizeof in_use);
UNIQUE_MEMBERS (map, mt) {
in_use[mt] = TRUE;
}
- END_MEMBERS;
+ END_MEMBERS
ALL_MEMBERS (mt) {
if (!in_use[mt] && file->memb[mt]) {
(void)H5FDclose(file->memb[mt]);
@@ -942,7 +942,7 @@ H5FD_multi_sb_decode(H5FD_t *_file, const char *name, const unsigned char *buf)
}
file->fa.memb_map[mt] = map[mt];
}
- END_MEMBERS;
+ END_MEMBERS
}
/* Commit member starting addresses and name templates */
@@ -954,7 +954,7 @@ H5FD_multi_sb_decode(H5FD_t *_file, const char *name, const unsigned char *buf)
file->fa.memb_name[mt] = my_strdup(memb_name[mt]);
}
}
- END_MEMBERS;
+ END_MEMBERS
if (compute_next(file) < 0)
H5Epush_ret(func, H5E_ERR_CLS, H5E_INTERNAL, H5E_BADVALUE, "compute_next() failed", -1);
@@ -972,7 +972,7 @@ H5FD_multi_sb_decode(H5FD_t *_file, const char *name, const unsigned char *buf)
*/
file->memb_eoa[mt] = memb_eoa[mt];
}
- END_MEMBERS;
+ END_MEMBERS
return 0;
} /* end H5FD_multi_sb_decode() */
@@ -1049,7 +1049,7 @@ H5FD_multi_fapl_copy(const void *_old_fa)
}
}
}
- END_MEMBERS;
+ END_MEMBERS
if (nerrors) {
ALL_MEMBERS (mt) {
@@ -1058,7 +1058,7 @@ H5FD_multi_fapl_copy(const void *_old_fa)
if (new_fa->memb_name[mt])
free(new_fa->memb_name[mt]);
}
- END_MEMBERS;
+ END_MEMBERS
free(new_fa);
H5Epush_ret(func, H5E_ERR_CLS, H5E_INTERNAL, H5E_BADVALUE, "can't release object on error", NULL);
}
@@ -1095,7 +1095,7 @@ H5FD_multi_fapl_free(void *_fa)
if (fa->memb_name[mt])
free(fa->memb_name[mt]);
}
- END_MEMBERS;
+ END_MEMBERS
free(fa);
return 0;
@@ -1147,7 +1147,7 @@ H5FD_multi_open(const char *name, unsigned flags, hid_t fapl_id, haddr_t maxaddr
{
fa = (const H5FD_multi_fapl_t *)H5Pget_driver_info(fapl_id);
}
- H5E_END_TRY;
+ H5E_END_TRY
if (!fa || (H5P_FILE_ACCESS_DEFAULT == fapl_id) || (H5FD_MULTI != H5Pget_driver(fapl_id))) {
char *env = getenv(HDF5_DRIVER);
@@ -1175,7 +1175,7 @@ H5FD_multi_open(const char *name, unsigned flags, hid_t fapl_id, haddr_t maxaddr
else
file->fa.memb_name[mt] = NULL;
}
- END_MEMBERS;
+ END_MEMBERS
file->fa.relax = fa->relax;
file->flags = flags;
file->name = my_strdup(name);
@@ -1208,7 +1208,7 @@ error:
if (file->fa.memb_name[mt])
free(file->fa.memb_name[mt]);
}
- END_MEMBERS;
+ END_MEMBERS
if (file->name)
free(file->name);
free(file);
@@ -1253,7 +1253,7 @@ H5FD_multi_close(H5FD_t *_file)
}
}
}
- END_MEMBERS;
+ END_MEMBERS
if (nerrors)
H5Epush_ret(func, H5E_ERR_CLS, H5E_INTERNAL, H5E_BADVALUE, "error closing member files", -1);
@@ -1264,7 +1264,7 @@ H5FD_multi_close(H5FD_t *_file)
if (file->fa.memb_name[mt])
free(file->fa.memb_name[mt]);
}
- END_MEMBERS;
+ END_MEMBERS
free(file->name);
free(file);
@@ -1311,7 +1311,7 @@ H5FD_multi_cmp(const H5FD_t *_f1, const H5FD_t *_f2)
cmp = 1;
}
}
- END_MEMBERS;
+ END_MEMBERS
assert(cmp || out_mt < H5FD_MEM_NTYPES);
if (out_mt >= H5FD_MEM_NTYPES)
return cmp;
@@ -1418,7 +1418,7 @@ H5FD_multi_get_eoa(const H5FD_t *_file, H5FD_mem_t type)
{
memb_eoa = H5FDget_eoa(file->memb[mt], mt);
}
- H5E_END_TRY;
+ H5E_END_TRY
if (HADDR_UNDEF == memb_eoa)
H5Epush_ret(func, H5E_ERR_CLS, H5E_INTERNAL, H5E_BADVALUE, "member file has unknown eoa",
@@ -1441,7 +1441,7 @@ H5FD_multi_get_eoa(const H5FD_t *_file, H5FD_mem_t type)
if (memb_eoa > eoa)
eoa = memb_eoa;
}
- END_MEMBERS;
+ END_MEMBERS
}
else {
H5FD_mem_t mmt = file->fa.memb_map[type];
@@ -1454,7 +1454,7 @@ H5FD_multi_get_eoa(const H5FD_t *_file, H5FD_mem_t type)
{
eoa = H5FDget_eoa(file->memb[mmt], mmt);
}
- H5E_END_TRY;
+ H5E_END_TRY
if (HADDR_UNDEF == eoa)
H5Epush_ret(func, H5E_ERR_CLS, H5E_INTERNAL, H5E_BADVALUE, "member file has unknown eoa",
@@ -1535,7 +1535,7 @@ H5FD_multi_set_eoa(H5FD_t *_file, H5FD_mem_t type, haddr_t eoa)
{
status = H5FDset_eoa(file->memb[mmt], mmt, (eoa - file->fa.memb_addr[mmt]));
}
- H5E_END_TRY;
+ H5E_END_TRY
if (status < 0)
H5Epush_ret(func, H5E_ERR_CLS, H5E_FILE, H5E_BADVALUE, "member H5FDset_eoa failed", -1);
@@ -1579,7 +1579,7 @@ H5FD_multi_get_eof(const H5FD_t *_file, H5FD_mem_t type)
{
tmp_eof = H5FDget_eof(file->memb[mt], type);
}
- H5E_END_TRY;
+ H5E_END_TRY
if (HADDR_UNDEF == tmp_eof)
H5Epush_ret(func, H5E_ERR_CLS, H5E_INTERNAL, H5E_BADVALUE, "member file has unknown eof",
@@ -1601,7 +1601,7 @@ H5FD_multi_get_eof(const H5FD_t *_file, H5FD_mem_t type)
if (tmp_eof > eof)
eof = tmp_eof;
}
- END_MEMBERS;
+ END_MEMBERS
}
else {
H5FD_mem_t mmt = file->fa.memb_map[type];
@@ -1615,7 +1615,7 @@ H5FD_multi_get_eof(const H5FD_t *_file, H5FD_mem_t type)
{
eof = H5FDget_eof(file->memb[mmt], mmt);
}
- H5E_END_TRY;
+ H5E_END_TRY
if (HADDR_UNDEF == eof)
H5Epush_ret(func, H5E_ERR_CLS, H5E_INTERNAL, H5E_BADVALUE, "member file has unknown eof",
@@ -1702,7 +1702,7 @@ H5FD_multi_alloc(H5FD_t *_file, H5FD_mem_t type, hid_t dxpl_id, hsize_t size)
if (file->memb[mt])
file->memb[mt]->paged_aggr = file->pub.paged_aggr;
}
- END_MEMBERS;
+ END_MEMBERS
}
if (HADDR_UNDEF == (addr = H5FDalloc(file->memb[mmt], mmt, dxpl_id, size)))
@@ -1916,7 +1916,7 @@ H5FD_multi_flush(H5FD_t *_file, hid_t dxpl_id, hbool_t closing)
if (H5FDflush(file->memb[mt], dxpl_id, closing) < 0)
nerrors++;
}
- H5E_END_TRY;
+ H5E_END_TRY
}
}
if (nerrors)
@@ -1957,7 +1957,7 @@ H5FD_multi_truncate(H5FD_t *_file, hid_t dxpl_id, hbool_t closing)
if (H5FDtruncate(file->memb[mt], dxpl_id, closing) < 0)
nerrors++;
}
- H5E_END_TRY;
+ H5E_END_TRY
}
}
if (nerrors)
@@ -2003,10 +2003,10 @@ H5FD_multi_lock(H5FD_t *_file, hbool_t rw)
break;
} /* end if */
}
- H5E_END_TRY;
+ H5E_END_TRY
} /* end if */
}
- END_MEMBERS;
+ END_MEMBERS
/* Try to unlock the member files that are locked before error is encountered */
if (nerrors) {
@@ -2018,7 +2018,7 @@ H5FD_multi_lock(H5FD_t *_file, hbool_t rw)
if (H5FDunlock(file->memb[k]) < 0)
nerrors++;
}
- H5E_END_TRY;
+ H5E_END_TRY
} /* end for */
} /* end if */
@@ -2057,7 +2057,7 @@ H5FD_multi_unlock(H5FD_t *_file)
if (H5FDunlock(file->memb[mt]) < 0)
nerrors++;
}
- END_MEMBERS;
+ END_MEMBERS
if (nerrors)
H5Epush_ret(func, H5E_ERR_CLS, H5E_VFL, H5E_CANTUNLOCKFILE, "error unlocking member files", -1);
@@ -2089,7 +2089,7 @@ compute_next(H5FD_multi_t *file)
ALL_MEMBERS (mt) {
file->memb_next[mt] = HADDR_UNDEF;
}
- END_MEMBERS;
+ END_MEMBERS
UNIQUE_MEMBERS (file->fa.memb_map, mt1) {
UNIQUE_MEMBERS2(file->fa.memb_map, mt2)
@@ -2099,12 +2099,12 @@ compute_next(H5FD_multi_t *file)
file->memb_next[mt1] = file->fa.memb_addr[mt2];
}
}
- END_MEMBERS;
+ END_MEMBERS
if (HADDR_UNDEF == file->memb_next[mt1]) {
file->memb_next[mt1] = HADDR_MAX; /*last member*/
}
}
- END_MEMBERS;
+ END_MEMBERS
return 0;
}
@@ -2155,13 +2155,13 @@ open_members(H5FD_multi_t *file)
{
file->memb[mt] = H5FDopen(tmp, file->flags, file->fa.memb_fapl[mt], HADDR_UNDEF);
}
- H5E_END_TRY;
+ H5E_END_TRY
if (!file->memb[mt]) {
if (!file->fa.relax || (file->flags & H5F_ACC_RDWR))
nerrors++;
}
}
- END_MEMBERS;
+ END_MEMBERS
if (nerrors)
H5Epush_ret(func, H5E_ERR_CLS, H5E_INTERNAL, H5E_BADVALUE, "error opening member files", -1);
@@ -2198,7 +2198,7 @@ H5FD_multi_delete(const char *filename, hid_t fapl_id)
{
fa = (const H5FD_multi_fapl_t *)H5Pget_driver_info(fapl_id);
}
- H5E_END_TRY;
+ H5E_END_TRY
if (!fa) {
char *env = getenv(HDF5_DRIVER);
@@ -2228,7 +2228,7 @@ H5FD_multi_delete(const char *filename, hid_t fapl_id)
if (H5FDdelete(full_filename, fa->memb_fapl[mt]) < 0)
H5Epush_ret(func, H5E_ERR_CLS, H5E_VFL, H5E_BADVALUE, "error deleting member files", -1);
}
- END_MEMBERS;
+ END_MEMBERS
return 0;
} /* end H5FD_multi_delete() */
diff --git a/src/H5FDonion.c b/src/H5FDonion.c
index 1c81870..c4ffe4c 100644
--- a/src/H5FDonion.c
+++ b/src/H5FDonion.c
@@ -259,7 +259,7 @@ H5FD__onion_term(void)
/* Reset VFL ID */
H5FD_ONION_g = 0;
- FUNC_LEAVE_NOAPI(SUCCEED);
+ FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5FD__onion_term() */
@@ -535,7 +535,7 @@ done:
H5MM_xfree(buf);
H5MM_xfree(new_list);
- FUNC_LEAVE_NOAPI(ret_value);
+ FUNC_LEAVE_NOAPI(ret_value)
} /* end H5FD__onion_commit_new_revision_record() */
/*-----------------------------------------------------------------------------
@@ -624,7 +624,7 @@ H5FD__onion_get_eoa(const H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type)
{
const H5FD_onion_t *file = (const H5FD_onion_t *)_file;
- FUNC_ENTER_PACKAGE_NOERR;
+ FUNC_ENTER_PACKAGE_NOERR
FUNC_LEAVE_NOAPI(file->logical_eoa)
} /* end H5FD__onion_get_eoa() */
@@ -642,7 +642,7 @@ H5FD__onion_get_eof(const H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type)
{
const H5FD_onion_t *file = (const H5FD_onion_t *)_file;
- FUNC_ENTER_PACKAGE_NOERR;
+ FUNC_ENTER_PACKAGE_NOERR
FUNC_LEAVE_NOAPI(file->logical_eof)
} /* end H5FD__onion_get_eof() */
@@ -693,7 +693,7 @@ H5FD__onion_create_truncate_onion(H5FD_onion_t *file, const char *filename, cons
size_t size = 0;
herr_t ret_value = SUCCEED;
- FUNC_ENTER_PACKAGE;
+ FUNC_ENTER_PACKAGE
HDassert(file != NULL);
@@ -772,7 +772,7 @@ done:
if (FAIL == ret_value)
HDremove(recovery_file_nameery); /* destroy new temp file, if 'twas created */
- FUNC_LEAVE_NOAPI(ret_value);
+ FUNC_LEAVE_NOAPI(ret_value)
} /* end H5FD__onion_create_truncate_onion() */
static herr_t
@@ -780,7 +780,7 @@ H5FD__onion_remove_unused_symbols(char *s)
{
char *d = s;
- FUNC_ENTER_PACKAGE_NOERR;
+ FUNC_ENTER_PACKAGE_NOERR
do {
while (*d == '{' || *d == '}' || *d == ' ') {
@@ -788,7 +788,7 @@ H5FD__onion_remove_unused_symbols(char *s)
}
} while ((*s++ = *d++));
- FUNC_LEAVE_NOAPI(SUCCEED);
+ FUNC_LEAVE_NOAPI(SUCCEED)
}
static herr_t
@@ -797,7 +797,7 @@ H5FD__onion_parse_config_str(const char *config_str, H5FD_onion_fapl_info_t *fa)
char *config_str_copy = NULL;
herr_t ret_value = SUCCEED;
- FUNC_ENTER_PACKAGE;
+ FUNC_ENTER_PACKAGE
if (!HDstrcmp(config_str, ""))
HGOTO_ERROR(H5E_VFL, H5E_BADVALUE, FAIL, "configure string can't be empty")
@@ -891,7 +891,7 @@ H5FD__onion_parse_config_str(const char *config_str, H5FD_onion_fapl_info_t *fa)
done:
H5MM_free(config_str_copy);
- FUNC_LEAVE_NOAPI(ret_value);
+ FUNC_LEAVE_NOAPI(ret_value)
}
/*-----------------------------------------------------------------------------
@@ -1028,7 +1028,7 @@ H5FD__onion_open(const char *filename, unsigned flags, hid_t fapl_id, haddr_t ma
{
file->onion_file = H5FD_open(name_onion, flags, backing_fapl_id, maxaddr);
}
- H5E_END_TRY;
+ H5E_END_TRY
/* If that didn't work, create a new onion file */
/* TODO: Move to a new function */
@@ -1237,7 +1237,7 @@ done:
H5MM_xfree(new_fa);
- FUNC_LEAVE_NOAPI(ret_value);
+ FUNC_LEAVE_NOAPI(ret_value)
} /* end H5FD__onion_open() */
/*-----------------------------------------------------------------------------
@@ -1261,7 +1261,7 @@ H5FD__onion_open_rw(H5FD_onion_t *file, unsigned int flags, haddr_t maxaddr, boo
uint32_t checksum = 0;
herr_t ret_value = SUCCEED;
- FUNC_ENTER_PACKAGE;
+ FUNC_ENTER_PACKAGE
/* Guard against simultaneous write-open.
* TODO: support recovery open with force-write-open flag in FAPL info.
@@ -1321,7 +1321,7 @@ done:
H5MM_xfree(buf);
- FUNC_LEAVE_NOAPI(ret_value);
+ FUNC_LEAVE_NOAPI(ret_value)
} /* end H5FD__onion_open_rw() */
/*-----------------------------------------------------------------------------
@@ -1424,7 +1424,7 @@ H5FD__onion_read(H5FD_t *_file, H5FD_mem_t type, hid_t H5_ATTR_UNUSED dxpl_id, h
HDassert(0 == bytes_to_read);
done:
- FUNC_LEAVE_NOAPI(ret_value);
+ FUNC_LEAVE_NOAPI(ret_value)
} /* end H5FD__onion_read() */
/*-----------------------------------------------------------------------------
@@ -1440,11 +1440,11 @@ H5FD__onion_set_eoa(H5FD_t *_file, H5FD_mem_t H5_ATTR_UNUSED type, haddr_t addr)
{
H5FD_onion_t *file = (H5FD_onion_t *)_file;
- FUNC_ENTER_PACKAGE_NOERR;
+ FUNC_ENTER_PACKAGE_NOERR
file->logical_eoa = addr;
- FUNC_LEAVE_NOAPI(SUCCEED);
+ FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5FD__onion_set_eoa() */
/*-----------------------------------------------------------------------------
@@ -1600,7 +1600,7 @@ H5FD__onion_write(H5FD_t *_file, H5FD_mem_t type, hid_t H5_ATTR_UNUSED dxpl_id,
done:
H5MM_xfree(page_buf);
- FUNC_LEAVE_NOAPI(ret_value);
+ FUNC_LEAVE_NOAPI(ret_value)
} /* end H5FD__onion_write() */
/*-------------------------------------------------------------------------
@@ -1741,7 +1741,7 @@ H5FD__onion_write_final_history(H5FD_onion_t *file)
size_t size = 0;
herr_t ret_value = SUCCEED;
- FUNC_ENTER_PACKAGE;
+ FUNC_ENTER_PACKAGE
/* TODO: history EOF may not be correct (under what circumstances?) */
if (0 == (size = H5FD__onion_write_history(&(file->history), file->onion_file, file->onion_eof,
@@ -1757,5 +1757,5 @@ H5FD__onion_write_final_history(H5FD_onion_t *file)
file->onion_eof += size;
done:
- FUNC_LEAVE_NOAPI(ret_value);
+ FUNC_LEAVE_NOAPI(ret_value)
} /* end H5FD__onion_write_final_history() */
diff --git a/src/H5FDonion_header.c b/src/H5FDonion_header.c
index 1287c2e..3b087fa 100644
--- a/src/H5FDonion_header.c
+++ b/src/H5FDonion_header.c
@@ -44,7 +44,7 @@ H5FD__onion_ingest_header(H5FD_onion_header_t *hdr_out, H5FD_t *raw_file, haddr_
haddr_t size = (haddr_t)H5FD_ONION_ENCODED_SIZE_HEADER;
uint32_t sum = 0;
- FUNC_ENTER_PACKAGE;
+ FUNC_ENTER_PACKAGE
if (H5FD_get_eof(raw_file, H5FD_MEM_DRAW) < (addr + size))
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "header indicates history beyond EOF")
@@ -68,7 +68,7 @@ H5FD__onion_ingest_header(H5FD_onion_header_t *hdr_out, H5FD_t *raw_file, haddr_
done:
H5MM_xfree(buf);
- FUNC_LEAVE_NOAPI(ret_value);
+ FUNC_LEAVE_NOAPI(ret_value)
} /* end H5FD__onion_ingest_header() */
/*-------------------------------------------------------------------------
@@ -88,7 +88,7 @@ H5FD__onion_write_header(H5FD_onion_header_t *header, H5FD_t *file)
unsigned char *buf = NULL;
herr_t ret_value = SUCCEED;
- FUNC_ENTER_PACKAGE;
+ FUNC_ENTER_PACKAGE
if (NULL == (buf = H5MM_malloc(H5FD_ONION_ENCODED_SIZE_HEADER)))
HGOTO_ERROR(H5E_VFL, H5E_CANTALLOC, FAIL, "can't allocate buffer for updated history header")
@@ -102,7 +102,7 @@ H5FD__onion_write_header(H5FD_onion_header_t *header, H5FD_t *file)
done:
H5MM_xfree(buf);
- FUNC_LEAVE_NOAPI(ret_value);
+ FUNC_LEAVE_NOAPI(ret_value)
} /* end H5FD__onion_write_header()*/
/*-----------------------------------------------------------------------------
@@ -128,7 +128,7 @@ H5FD__onion_header_decode(unsigned char *buf, H5FD_onion_header_t *header)
unsigned char *ptr = NULL;
size_t ret_value = 0;
- FUNC_ENTER_PACKAGE;
+ FUNC_ENTER_PACKAGE
HDassert(buf != NULL);
HDassert(header != NULL);
@@ -180,7 +180,7 @@ H5FD__onion_header_decode(unsigned char *buf, H5FD_onion_header_t *header)
ret_value = (size_t)(ptr - buf);
done:
- FUNC_LEAVE_NOAPI(ret_value);
+ FUNC_LEAVE_NOAPI(ret_value)
} /* end H5FD__onion_header_decode() */
/*-----------------------------------------------------------------------------
@@ -206,7 +206,7 @@ H5FD__onion_header_encode(H5FD_onion_header_t *header, unsigned char *buf, uint3
unsigned char *ptr = buf;
size_t ret_value = 0;
- FUNC_ENTER_PACKAGE_NOERR;
+ FUNC_ENTER_PACKAGE_NOERR
HDassert(buf != NULL);
HDassert(checksum != NULL);
@@ -228,5 +228,5 @@ H5FD__onion_header_encode(H5FD_onion_header_t *header, unsigned char *buf, uint3
UINT32ENCODE(ptr, *checksum);
ret_value = (size_t)(ptr - buf);
- FUNC_LEAVE_NOAPI(ret_value);
+ FUNC_LEAVE_NOAPI(ret_value)
} /* end H5FD__onion_header_encode() */
diff --git a/src/H5FDonion_history.c b/src/H5FDonion_history.c
index 9a3aa15..567ac07 100644
--- a/src/H5FDonion_history.c
+++ b/src/H5FDonion_history.c
@@ -43,7 +43,7 @@ H5FD__onion_ingest_history(H5FD_onion_history_t *history_out, H5FD_t *raw_file,
uint32_t sum = 0;
herr_t ret_value = SUCCEED;
- FUNC_ENTER_PACKAGE;
+ FUNC_ENTER_PACKAGE
HDassert(history_out);
HDassert(raw_file);
@@ -83,7 +83,7 @@ done:
if (ret_value < 0)
H5MM_xfree(history_out->record_locs);
- FUNC_LEAVE_NOAPI(ret_value);
+ FUNC_LEAVE_NOAPI(ret_value)
} /* end H5FD__onion_ingest_history() */
/*-----------------------------------------------------------------------------
@@ -104,7 +104,7 @@ H5FD__onion_write_history(H5FD_onion_history_t *history, H5FD_t *file, haddr_t o
unsigned char *buf = NULL;
uint64_t ret_value = 0;
- FUNC_ENTER_PACKAGE;
+ FUNC_ENTER_PACKAGE
if (NULL == (buf = H5MM_malloc(H5FD_ONION_ENCODED_SIZE_HISTORY +
(H5FD_ONION_ENCODED_SIZE_RECORD_POINTER * history->n_revisions))))
@@ -124,7 +124,7 @@ H5FD__onion_write_history(H5FD_onion_history_t *history, H5FD_t *file, haddr_t o
done:
H5MM_xfree(buf);
- FUNC_LEAVE_NOAPI(ret_value);
+ FUNC_LEAVE_NOAPI(ret_value)
} /* end H5FD__onion_write_history() */
/*-----------------------------------------------------------------------------
@@ -166,7 +166,7 @@ H5FD__onion_history_decode(unsigned char *buf, H5FD_onion_history_t *history)
unsigned char *ptr = NULL;
size_t ret_value = 0;
- FUNC_ENTER_PACKAGE;
+ FUNC_ENTER_PACKAGE
HDassert(buf != NULL);
HDassert(history != NULL);
@@ -239,7 +239,7 @@ H5FD__onion_history_decode(unsigned char *buf, H5FD_onion_history_t *history)
ret_value = (size_t)(ptr - buf);
done:
- FUNC_LEAVE_NOAPI(ret_value);
+ FUNC_LEAVE_NOAPI(ret_value)
} /* end H5FD__onion_history_decode() */
/*-----------------------------------------------------------------------------
@@ -268,7 +268,7 @@ H5FD__onion_history_encode(H5FD_onion_history_t *history, unsigned char *buf, ui
unsigned char *ptr = buf;
size_t vers_u32 = (uint32_t)history->version; /* pad out unused bytes */
- FUNC_ENTER_PACKAGE_NOERR;
+ FUNC_ENTER_PACKAGE_NOERR
HDassert(history != NULL);
HDassert(H5FD_ONION_HISTORY_VERSION_CURR == history->version);
@@ -302,5 +302,5 @@ H5FD__onion_history_encode(H5FD_onion_history_t *history, unsigned char *buf, ui
*checksum = H5_checksum_fletcher32(buf, (size_t)(ptr - buf));
UINT32ENCODE(ptr, *checksum);
- FUNC_LEAVE_NOAPI((size_t)(ptr - buf));
+ FUNC_LEAVE_NOAPI((size_t)(ptr - buf))
} /* end H5FD__onion_history_encode() */
diff --git a/src/H5FDonion_index.c b/src/H5FDonion_index.c
index 48aa89a..0ed1afe 100644
--- a/src/H5FDonion_index.c
+++ b/src/H5FDonion_index.c
@@ -52,7 +52,7 @@ H5FD__onion_ingest_revision_record(H5FD_onion_revision_record_t *r_out, H5FD_t *
haddr_t addr = 0;
size_t size = 0;
- FUNC_ENTER_PACKAGE;
+ FUNC_ENTER_PACKAGE
HDassert(r_out);
HDassert(raw_file);
@@ -162,7 +162,7 @@ done:
H5MM_xfree(r_out->archival_index.list);
}
- FUNC_LEAVE_NOAPI(ret_value);
+ FUNC_LEAVE_NOAPI(ret_value)
} /* end H5FD__onion_ingest_revision_record() */
/*-----------------------------------------------------------------------------
@@ -184,7 +184,7 @@ H5FD__onion_archival_index_is_valid(const H5FD_onion_archival_index_t *aix)
{
hbool_t ret_value = TRUE;
- FUNC_ENTER_PACKAGE_NOERR;
+ FUNC_ENTER_PACKAGE_NOERR
HDassert(aix);
@@ -200,7 +200,7 @@ H5FD__onion_archival_index_is_valid(const H5FD_onion_archival_index_t *aix)
HGOTO_DONE(FALSE)
done:
- FUNC_LEAVE_NOAPI(ret_value);
+ FUNC_LEAVE_NOAPI(ret_value)
} /* end H5FD__onion_archival_index_is_valid() */
/*-----------------------------------------------------------------------------
@@ -228,7 +228,7 @@ H5FD__onion_archival_index_find(const H5FD_onion_archival_index_t *aix, uint64_t
H5FD_onion_index_entry_t *x = NULL;
int ret_value = 0;
- FUNC_ENTER_PACKAGE_NOERR;
+ FUNC_ENTER_PACKAGE_NOERR
HDassert(aix);
HDassert(H5FD_ONION_ARCHIVAL_INDEX_VERSION_CURR == aix->version);
@@ -276,7 +276,7 @@ H5FD__onion_archival_index_find(const H5FD_onion_archival_index_t *aix, uint64_t
}
done:
- FUNC_LEAVE_NOAPI(ret_value);
+ FUNC_LEAVE_NOAPI(ret_value)
} /* end H5FD__onion_archival_index_find() */
/*-----------------------------------------------------------------------------
@@ -292,7 +292,7 @@ H5FD__onion_revision_index_destroy(H5FD_onion_revision_index_t *rix)
{
herr_t ret_value = SUCCEED;
- FUNC_ENTER_PACKAGE_NOERR;
+ FUNC_ENTER_PACKAGE_NOERR
HDassert(rix);
HDassert(H5FD_ONION_REVISION_INDEX_VERSION_CURR == rix->version);
@@ -315,7 +315,7 @@ H5FD__onion_revision_index_destroy(H5FD_onion_revision_index_t *rix)
H5MM_xfree(rix->_hash_table);
H5MM_xfree(rix);
- FUNC_LEAVE_NOAPI(ret_value);
+ FUNC_LEAVE_NOAPI(ret_value)
} /* end H5FD__onion_revision_index_destroy() */
/*-----------------------------------------------------------------------------
@@ -336,7 +336,7 @@ H5FD__onion_revision_index_init(uint32_t page_size)
H5FD_onion_revision_index_t *rix = NULL;
H5FD_onion_revision_index_t *ret_value = NULL;
- FUNC_ENTER_PACKAGE;
+ FUNC_ENTER_PACKAGE
HDassert(0 != page_size);
HDassert(POWER_OF_TWO(page_size));
@@ -364,7 +364,7 @@ done:
if (NULL == ret_value)
H5MM_xfree(rix);
- FUNC_LEAVE_NOAPI(ret_value);
+ FUNC_LEAVE_NOAPI(ret_value)
} /* end H5FD__onion_revision_index_init() */
/*-----------------------------------------------------------------------------
@@ -390,7 +390,7 @@ H5FD__onion_revision_index_resize(H5FD_onion_revision_index_t *rix)
uint64_t new_n_keys_populated = 0;
herr_t ret_value = SUCCEED;
- FUNC_ENTER_PACKAGE;
+ FUNC_ENTER_PACKAGE
HDassert(rix);
HDassert(H5FD_ONION_REVISION_INDEX_VERSION_CURR == rix->version);
@@ -428,7 +428,7 @@ H5FD__onion_revision_index_resize(H5FD_onion_revision_index_t *rix)
rix->_hash_table = new_table;
done:
- FUNC_LEAVE_NOAPI(ret_value);
+ FUNC_LEAVE_NOAPI(ret_value)
} /* end H5FD__onion_revision_index_resize() */
/*-----------------------------------------------------------------------------
@@ -452,7 +452,7 @@ H5FD__onion_revision_index_insert(H5FD_onion_revision_index_t *rix, const H5FD_o
H5FD_onion_revision_index_hash_chain_node_t **append_dest = NULL;
herr_t ret_value = SUCCEED;
- FUNC_ENTER_PACKAGE;
+ FUNC_ENTER_PACKAGE
HDassert(rix);
HDassert(H5FD_ONION_REVISION_INDEX_VERSION_CURR == rix->version);
@@ -502,7 +502,7 @@ H5FD__onion_revision_index_insert(H5FD_onion_revision_index_t *rix, const H5FD_o
}
done:
- FUNC_LEAVE_NOAPI(ret_value);
+ FUNC_LEAVE_NOAPI(ret_value)
} /* end H5FD__onion_revision_index_insert() */
/*-----------------------------------------------------------------------------
@@ -525,7 +525,7 @@ H5FD__onion_revision_index_find(const H5FD_onion_revision_index_t *rix, uint64_t
uint64_t key = 0;
int ret_value = 0;
- FUNC_ENTER_PACKAGE_NOERR;
+ FUNC_ENTER_PACKAGE_NOERR
HDassert(rix);
HDassert(H5FD_ONION_REVISION_INDEX_VERSION_CURR == rix->version);
@@ -547,7 +547,7 @@ H5FD__onion_revision_index_find(const H5FD_onion_revision_index_t *rix, uint64_t
}
}
- FUNC_LEAVE_NOAPI(ret_value);
+ FUNC_LEAVE_NOAPI(ret_value)
} /* end H5FD__onion_revision_index_find() */
/*-----------------------------------------------------------------------------
@@ -597,7 +597,7 @@ H5FD__onion_revision_record_decode(unsigned char *buf, H5FD_onion_revision_recor
unsigned char *ptr = NULL;
size_t ret_value = 0;
- FUNC_ENTER_PACKAGE;
+ FUNC_ENTER_PACKAGE
HDassert(buf != NULL);
HDassert(record != NULL);
@@ -723,7 +723,7 @@ H5FD__onion_revision_record_decode(unsigned char *buf, H5FD_onion_revision_recor
ret_value = (size_t)(ptr - buf);
done:
- FUNC_LEAVE_NOAPI(ret_value);
+ FUNC_LEAVE_NOAPI(ret_value)
} /* end H5FD__onion_revision_record_decode() */
/*-----------------------------------------------------------------------------
@@ -754,7 +754,7 @@ H5FD__onion_revision_record_encode(H5FD_onion_revision_record_t *record, unsigne
uint32_t vers_u32 = (uint32_t)record->version; /* pad out unused bytes */
uint32_t page_size = 0;
- FUNC_ENTER_PACKAGE_NOERR;
+ FUNC_ENTER_PACKAGE_NOERR
HDassert(checksum != NULL);
HDassert(buf != NULL);
@@ -805,7 +805,7 @@ H5FD__onion_revision_record_encode(H5FD_onion_revision_record_t *record, unsigne
*checksum = H5_checksum_fletcher32(buf, (size_t)(ptr - buf));
UINT32ENCODE(ptr, *checksum);
- FUNC_LEAVE_NOAPI((size_t)(ptr - buf));
+ FUNC_LEAVE_NOAPI((size_t)(ptr - buf))
} /* end H5FD__onion_revision_record_encode() */
/*-----------------------------------------------------------------------------
@@ -854,7 +854,7 @@ H5FD__onion_merge_revision_index_into_archival_index(const H5FD_onion_revision_i
};
herr_t ret_value = SUCCEED;
- FUNC_ENTER_PACKAGE;
+ FUNC_ENTER_PACKAGE
HDassert(rix);
HDassert(aix);
@@ -932,5 +932,5 @@ done:
H5MM_xfree(kept_list);
H5MM_xfree(new_aix.list);
- FUNC_LEAVE_NOAPI(ret_value);
+ FUNC_LEAVE_NOAPI(ret_value)
} /* end H5FD__onion_merge_revision_index_into_archival_index() */
diff --git a/src/H5FDros3.c b/src/H5FDros3.c
index 9a529d6..465117f 100644
--- a/src/H5FDros3.c
+++ b/src/H5FDros3.c
@@ -649,7 +649,7 @@ ros3_reset_stats(H5FD_ros3_t *file)
}
done:
- FUNC_LEAVE_NOAPI(ret_value);
+ FUNC_LEAVE_NOAPI(ret_value)
} /* end ros3_reset_stats() */
#endif /* ROS3_STATS */
@@ -1052,7 +1052,7 @@ ros3_fprint_stats(FILE *stream, const H5FD_ros3_t *file)
}
done:
- FUNC_LEAVE_NOAPI(ret_value);
+ FUNC_LEAVE_NOAPI(ret_value)
} /* ros3_fprint_stats */
#endif /* ROS3_STATS */
diff --git a/src/H5FDs3comms.c b/src/H5FDs3comms.c
index 628c55a..d91d3b9 100644
--- a/src/H5FDs3comms.c
+++ b/src/H5FDs3comms.c
@@ -561,7 +561,7 @@ done:
}
}
- FUNC_LEAVE_NOAPI(ret_value);
+ FUNC_LEAVE_NOAPI(ret_value)
} /* end H5FD_s3comms_hrb_node_set() */
/*----------------------------------------------------------------------------
@@ -980,7 +980,7 @@ done:
H5MM_xfree(headerresponse);
sds.magic += 1; /* set to bad magic */
- FUNC_LEAVE_NOAPI(ret_value);
+ FUNC_LEAVE_NOAPI(ret_value)
} /* H5FD_s3comms_s3r_getsize */
/*----------------------------------------------------------------------------
@@ -1526,7 +1526,7 @@ done:
HDONE_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "cannot unset CURLOPT_HTTPHEADER")
}
- FUNC_LEAVE_NOAPI(ret_value);
+ FUNC_LEAVE_NOAPI(ret_value)
} /* H5FD_s3comms_s3r_read */
/****************************************************************************
@@ -1698,7 +1698,7 @@ H5FD_s3comms_aws_canonical_request(char *canonical_request_dest, int _cr_size, c
HDstrcat(canonical_request_dest, EMPTY_SHA256);
done:
- FUNC_LEAVE_NOAPI(ret_value);
+ FUNC_LEAVE_NOAPI(ret_value)
} /* end H5FD_s3comms_aws_canonical_request() */
/*----------------------------------------------------------------------------
@@ -1757,7 +1757,7 @@ H5FD_s3comms_bytes_to_hex(char *dest, const unsigned char *msg, size_t msg_len,
}
done:
- FUNC_LEAVE_NOAPI(ret_value);
+ FUNC_LEAVE_NOAPI(ret_value)
} /* end H5FD_s3comms_bytes_to_hex() */
/*----------------------------------------------------------------------------
@@ -1860,7 +1860,7 @@ H5FD_s3comms_HMAC_SHA256(const unsigned char *key, size_t key_len, const char *m
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "could not convert to hex string.");
done:
- FUNC_LEAVE_NOAPI(ret_value);
+ FUNC_LEAVE_NOAPI(ret_value)
} /* H5FD_s3comms_HMAC_SHA256 */
/*-----------------------------------------------------------------------------
@@ -2010,7 +2010,7 @@ H5FD__s3comms_load_aws_creds_from_file(FILE *file, const char *profile_name, cha
} while (found_setting);
done:
- FUNC_LEAVE_NOAPI(ret_value);
+ FUNC_LEAVE_NOAPI(ret_value)
} /* end H5FD__s3comms_load_aws_creds_from_file() */
/*----------------------------------------------------------------------------
@@ -2106,7 +2106,7 @@ done:
if (HDfclose(credfile) == EOF)
HDONE_ERROR(H5E_ARGS, H5E_ARGS, FAIL, "problem error-closing aws configuration file")
- FUNC_LEAVE_NOAPI(ret_value);
+ FUNC_LEAVE_NOAPI(ret_value)
} /* end H5FD_s3comms_load_aws_profile() */
/*----------------------------------------------------------------------------
@@ -2158,7 +2158,7 @@ H5FD_s3comms_nlowercase(char *dest, const char *s, size_t len)
}
done:
- FUNC_LEAVE_NOAPI(ret_value);
+ FUNC_LEAVE_NOAPI(ret_value)
} /* end H5FD_s3comms_nlowercase() */
/*----------------------------------------------------------------------------
@@ -2203,7 +2203,7 @@ H5FD_s3comms_parse_url(const char *str, parsed_url_t **_purl)
unsigned int i = 0;
herr_t ret_value = FAIL;
- FUNC_ENTER_NOAPI_NOINIT;
+ FUNC_ENTER_NOAPI_NOINIT
#if S3COMMS_DEBUG
HDprintf("called H5FD_s3comms_parse_url.\n");
@@ -2366,7 +2366,7 @@ done:
if (ret_value == FAIL)
H5FD_s3comms_free_purl(purl);
- FUNC_LEAVE_NOAPI(ret_value);
+ FUNC_LEAVE_NOAPI(ret_value)
} /* end H5FD_s3comms_parse_url() */
/*----------------------------------------------------------------------------
@@ -2515,7 +2515,7 @@ H5FD_s3comms_percent_encode_char(char *repr, const unsigned char c, size_t *repr
*(repr + *repr_len) = '\0';
done:
- FUNC_LEAVE_NOAPI(ret_value);
+ FUNC_LEAVE_NOAPI(ret_value)
} /* H5FD_s3comms_percent_encode_char */
/*----------------------------------------------------------------------------
@@ -2608,7 +2608,7 @@ H5FD_s3comms_signing_key(unsigned char *md, const char *secret, const char *regi
done:
H5MM_xfree(AWS4_secret);
- FUNC_LEAVE_NOAPI(ret_value);
+ FUNC_LEAVE_NOAPI(ret_value)
} /* end H5FD_s3comms_signing_key() */
/*----------------------------------------------------------------------------
diff --git a/src/H5FDsplitter.c b/src/H5FDsplitter.c
index 448f11b..e6f0969 100644
--- a/src/H5FDsplitter.c
+++ b/src/H5FDsplitter.c
@@ -267,7 +267,7 @@ H5FD__copy_plist(hid_t fapl_id, hid_t *id_out_ptr)
HGOTO_ERROR(H5E_VFL, H5E_BADTYPE, -1, "unable to copy file access property list");
done:
- FUNC_LEAVE_NOAPI(ret_value);
+ FUNC_LEAVE_NOAPI(ret_value)
} /* end H5FD__copy_plist() */
/*-------------------------------------------------------------------------
diff --git a/src/H5FS.c b/src/H5FS.c
index 8e8cb63..4cea930 100644
--- a/src/H5FS.c
+++ b/src/H5FS.c
@@ -922,7 +922,6 @@ H5FS_free(H5F_t *f, H5FS_t *fspace, hbool_t free_file_space)
HDassert(fspace);
cache_flags = H5AC__DELETED_FLAG | H5AC__TAKE_OWNERSHIP_FLAG;
- ;
/* Free space for section info */
if (H5_addr_defined(fspace->sect_addr)) {
diff --git a/src/H5Fefc.c b/src/H5Fefc.c
index e7de395..ea9a279 100644
--- a/src/H5Fefc.c
+++ b/src/H5Fefc.c
@@ -473,7 +473,7 @@ H5F__efc_release_real(H5F_efc_t *efc)
efc->tag = H5F_EFC_TAG_DEFAULT;
done:
- FUNC_LEAVE_NOAPI(ret_value);
+ FUNC_LEAVE_NOAPI(ret_value)
} /* end H5F__efc_release_real() */
/*-------------------------------------------------------------------------
@@ -557,7 +557,7 @@ H5F__efc_destroy(H5F_efc_t *efc)
(void)H5FL_FREE(H5F_efc_t, efc);
done:
- FUNC_LEAVE_NOAPI(ret_value);
+ FUNC_LEAVE_NOAPI(ret_value)
} /* end H5F__efc_destroy() */
/*-------------------------------------------------------------------------
diff --git a/src/H5Fio.c b/src/H5Fio.c
index f6a8500..e258d71 100644
--- a/src/H5Fio.c
+++ b/src/H5Fio.c
@@ -438,7 +438,7 @@ H5F_flush_tagged_metadata(H5F_t *f, haddr_t tag)
HGOTO_ERROR(H5E_IO, H5E_WRITEERROR, FAIL, "low level flush failed")
done:
- FUNC_LEAVE_NOAPI(ret_value);
+ FUNC_LEAVE_NOAPI(ret_value)
} /* end H5F_flush_tagged_metadata */
/*-------------------------------------------------------------------------
@@ -465,7 +465,7 @@ H5F_evict_tagged_metadata(H5F_t *f, haddr_t tag)
HGOTO_ERROR(H5E_CACHE, H5E_CANTEXPUNGE, FAIL, "unable to evict tagged metadata")
done:
- FUNC_LEAVE_NOAPI(ret_value);
+ FUNC_LEAVE_NOAPI(ret_value)
} /* end H5F_evict_tagged_metadata */
/*-------------------------------------------------------------------------
@@ -518,7 +518,7 @@ H5F__evict_cache_entries(H5F_t *f)
#endif /* NDEBUG */
done:
- FUNC_LEAVE_NOAPI(ret_value);
+ FUNC_LEAVE_NOAPI(ret_value)
} /* end H5F__evict_cache_entries() */
/*-------------------------------------------------------------------------
diff --git a/src/H5Fmpi.c b/src/H5Fmpi.c
index 8936dfc..c5368d8 100644
--- a/src/H5Fmpi.c
+++ b/src/H5Fmpi.c
@@ -221,7 +221,7 @@ H5F__set_mpi_atomicity(H5F_t *file, hbool_t flag)
HGOTO_ERROR(H5E_FILE, H5E_CANTSET, FAIL, "can't set atomicity flag");
done:
- FUNC_LEAVE_NOAPI(ret_value);
+ FUNC_LEAVE_NOAPI(ret_value)
} /* end H5F__set_mpi_atomicity() */
/*-------------------------------------------------------------------------
@@ -245,7 +245,7 @@ H5Fset_mpi_atomicity(hid_t file_id, hbool_t flag)
H5VL_native_file_optional_args_t file_opt_args; /* Arguments for optional operation */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_API(FAIL);
+ FUNC_ENTER_API(FAIL)
H5TRACE2("e", "ib", file_id, flag);
/* Get the file object */
@@ -295,7 +295,7 @@ H5F__get_mpi_atomicity(const H5F_t *file, hbool_t *flag)
HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "can't get atomicity flag");
done:
- FUNC_LEAVE_NOAPI(ret_value);
+ FUNC_LEAVE_NOAPI(ret_value)
} /* end H5F__get_mpi_atomicity() */
/*-------------------------------------------------------------------------
@@ -319,7 +319,7 @@ H5Fget_mpi_atomicity(hid_t file_id, hbool_t *flag /*out*/)
H5VL_native_file_optional_args_t file_opt_args; /* Arguments for optional operation */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_API(FAIL);
+ FUNC_ENTER_API(FAIL)
H5TRACE2("e", "ix", file_id, flag);
/* Get the file object */
diff --git a/src/H5Fsuper.c b/src/H5Fsuper.c
index d66c99d..40c3e99 100644
--- a/src/H5Fsuper.c
+++ b/src/H5Fsuper.c
@@ -380,7 +380,7 @@ H5F__super_read(H5F_t *f, H5P_genplist_t *fa_plist, hbool_t initial_read)
{
status = H5FD_locate_signature(file, &super_addr);
}
- H5E_END_TRY;
+ H5E_END_TRY
/* Set superblock address to undefined on error */
if (status < 0)
diff --git a/src/H5Gbtree2.c b/src/H5Gbtree2.c
index 62e4070..e23c772 100644
--- a/src/H5Gbtree2.c
+++ b/src/H5Gbtree2.c
@@ -280,7 +280,7 @@ H5G__dense_btree2_name_encode(uint8_t *raw, const void *_nrecord, void H5_ATTR_U
FUNC_ENTER_PACKAGE_NOERR
/* Encode the record's fields */
- UINT32ENCODE(raw, nrecord->hash)
+ UINT32ENCODE(raw, nrecord->hash);
H5MM_memcpy(raw, nrecord->id, (size_t)H5G_DENSE_FHEAP_ID_LEN);
FUNC_LEAVE_NOAPI(SUCCEED)
@@ -307,7 +307,7 @@ H5G__dense_btree2_name_decode(const uint8_t *raw, void *_nrecord, void H5_ATTR_U
FUNC_ENTER_PACKAGE_NOERR
/* Decode the record's fields */
- UINT32DECODE(raw, nrecord->hash)
+ UINT32DECODE(raw, nrecord->hash);
H5MM_memcpy(nrecord->id, raw, (size_t)H5G_DENSE_FHEAP_ID_LEN);
FUNC_LEAVE_NOAPI(SUCCEED)
@@ -428,7 +428,7 @@ H5G__dense_btree2_corder_encode(uint8_t *raw, const void *_nrecord, void H5_ATTR
FUNC_ENTER_PACKAGE_NOERR
/* Encode the record's fields */
- INT64ENCODE(raw, nrecord->corder)
+ INT64ENCODE(raw, nrecord->corder);
H5MM_memcpy(raw, nrecord->id, (size_t)H5G_DENSE_FHEAP_ID_LEN);
FUNC_LEAVE_NOAPI(SUCCEED)
@@ -455,7 +455,7 @@ H5G__dense_btree2_corder_decode(const uint8_t *raw, void *_nrecord, void H5_ATTR
FUNC_ENTER_PACKAGE_NOERR
/* Decode the record's fields */
- INT64DECODE(raw, nrecord->corder)
+ INT64DECODE(raw, nrecord->corder);
H5MM_memcpy(nrecord->id, raw, (size_t)H5G_DENSE_FHEAP_ID_LEN);
FUNC_LEAVE_NOAPI(SUCCEED)
diff --git a/src/H5Gdeprec.c b/src/H5Gdeprec.c
index 6075ab8..fd729e6 100644
--- a/src/H5Gdeprec.c
+++ b/src/H5Gdeprec.c
@@ -955,7 +955,7 @@ H5Gget_objinfo(hid_t loc_id, const char *name, hbool_t follow_link, H5G_stat_t *
H5VL_native_group_optional_args_t grp_opt_args; /* Arguments for optional operation */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_API(FAIL);
+ FUNC_ENTER_API(FAIL)
H5TRACE4("e", "i*sbx", loc_id, name, follow_link, statbuf);
/* Check arguments */
@@ -1071,7 +1071,7 @@ done:
* location for the object */
*own_loc = H5G_OWN_NONE;
- FUNC_LEAVE_NOAPI(ret_value);
+ FUNC_LEAVE_NOAPI(ret_value)
} /* end H5G__get_objinfo_cb() */
/*-------------------------------------------------------------------------
@@ -1096,7 +1096,7 @@ H5G__get_objinfo(const H5G_loc_t *loc, const char *name, hbool_t follow_link, H5
H5G_trav_goi_t udata; /* User data for callback */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_PACKAGE;
+ FUNC_ENTER_PACKAGE
/* Sanity checks */
HDassert(loc);
@@ -1128,7 +1128,7 @@ H5G__get_objinfo(const H5G_loc_t *loc, const char *name, hbool_t follow_link, H5
{
ret = H5L_get_info(loc, name, &linfo);
}
- H5E_END_TRY;
+ H5E_END_TRY
if (ret >= 0 && linfo.type != H5L_TYPE_HARD) {
statbuf->linklen = linfo.u.val_size;
@@ -1144,7 +1144,7 @@ H5G__get_objinfo(const H5G_loc_t *loc, const char *name, hbool_t follow_link, H5
}
done:
- FUNC_LEAVE_NOAPI(ret_value);
+ FUNC_LEAVE_NOAPI(ret_value)
} /* end H5G__get_objinfo() */
/*-------------------------------------------------------------------------
diff --git a/src/H5Gent.c b/src/H5Gent.c
index 096e13e..6ca9408 100644
--- a/src/H5Gent.c
+++ b/src/H5Gent.c
@@ -329,7 +329,6 @@ H5G__ent_copy(H5G_entry_t *dst, H5G_entry_t *src, H5_copy_depth_t depth)
/* Deep copy the names */
if (depth == H5_COPY_DEEP) {
/* Nothing currently */
- ;
}
else if (depth == H5_COPY_SHALLOW) {
H5G__ent_reset(src);
diff --git a/src/H5Glink.c b/src/H5Glink.c
index fcdbca3..f3bf53e 100644
--- a/src/H5Glink.c
+++ b/src/H5Glink.c
@@ -468,7 +468,7 @@ H5G__link_iterate_table(const H5G_link_table_t *ltable, hsize_t skip, hsize_t *l
*last_lnk += skip;
/* Iterate over link messages */
- H5_CHECKED_ASSIGN(u, size_t, skip, hsize_t)
+ H5_CHECKED_ASSIGN(u, size_t, skip, hsize_t);
for (; u < ltable->nlinks && !ret_value; u++) {
/* Make the callback */
ret_value = (op)(&(ltable->lnks[u]), op_data);
diff --git a/src/H5Gname.c b/src/H5Gname.c
index ccb5253..5b72e89 100644
--- a/src/H5Gname.c
+++ b/src/H5Gname.c
@@ -917,7 +917,7 @@ H5G__name_replace_cb(void *obj_ptr, hid_t obj_id, void *key)
} /* end switch */
done:
- FUNC_LEAVE_NOAPI(ret_value);
+ FUNC_LEAVE_NOAPI(ret_value)
} /* end H5G__name_replace_cb() */
/*-------------------------------------------------------------------------
diff --git a/src/H5Gnode.c b/src/H5Gnode.c
index 2b67860..101604f 100644
--- a/src/H5Gnode.c
+++ b/src/H5Gnode.c
@@ -1300,7 +1300,7 @@ H5G__node_copy(H5F_t *f, const void H5_ATTR_UNUSED *_lt_key, haddr_t addr, const
HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, H5_ITER_ERROR, "unable to get source object name")
/* Set copied metadata tag */
- H5_BEGIN_TAG(H5AC__COPIED_TAG);
+ H5_BEGIN_TAG(H5AC__COPIED_TAG)
/* Insert the new object in the destination file's group */
/* (Don't increment the link count - that's already done above for hard links) */
diff --git a/src/H5Gtest.c b/src/H5Gtest.c
index fb78775..2299fdc 100644
--- a/src/H5Gtest.c
+++ b/src/H5Gtest.c
@@ -424,7 +424,7 @@ H5G__new_dense_info_test(hid_t gid, hsize_t *name_count, hsize_t *corder_count)
api_ctx_pushed = TRUE;
/* Set metadata tag in API context */
- H5_BEGIN_TAG(grp->oloc.addr);
+ H5_BEGIN_TAG(grp->oloc.addr)
/* Get the link info */
if (H5G__obj_get_linfo(&(grp->oloc), &linfo) < 0)
diff --git a/src/H5Gtraverse.c b/src/H5Gtraverse.c
index 1e6fe20..24a9cb8 100644
--- a/src/H5Gtraverse.c
+++ b/src/H5Gtraverse.c
@@ -829,7 +829,7 @@ H5G_traverse(const H5G_loc_t *loc, const char *name, unsigned target, H5G_traver
* shouldn't be during the traversal. Note that for best tagging assertion
* coverage, setting H5C_DO_TAGGING_SANITY_CHECKS is advised.
*/
- H5_BEGIN_TAG(H5AC__INVALID_TAG);
+ H5_BEGIN_TAG(H5AC__INVALID_TAG)
/* Go perform "real" traversal */
if (H5G__traverse_real(loc, name, target, op, op_data) < 0)
diff --git a/src/H5HFcache.c b/src/H5HFcache.c
index 3a3232b..704d55a 100644
--- a/src/H5HFcache.c
+++ b/src/H5HFcache.c
@@ -1668,7 +1668,7 @@ H5HF__cache_dblock_verify_chksum(const void *_image, size_t len, void *_udata)
computed_chksum = H5_checksum_metadata(read_buf, len, 0);
/* Restore the checksum */
- UINT32ENCODE(chk_p, stored_chksum)
+ UINT32ENCODE(chk_p, stored_chksum);
/* Verify checksum */
if (stored_chksum != computed_chksum)
diff --git a/src/H5HFdbg.c b/src/H5HFdbg.c
index ffb0b9c..63f6a70 100644
--- a/src/H5HFdbg.c
+++ b/src/H5HFdbg.c
@@ -407,11 +407,11 @@ H5HF_dblock_debug_cb(H5FS_section_info_t *_sect, void *_udata)
if (sect_start < dblock_start)
start = 0;
else
- H5_CHECKED_ASSIGN(start, size_t, (sect_start - dblock_start), hsize_t)
+ H5_CHECKED_ASSIGN(start, size_t, (sect_start - dblock_start), hsize_t);
if (sect_end > dblock_end)
- H5_CHECKED_ASSIGN(end, size_t, udata->dblock_size, hsize_t)
+ H5_CHECKED_ASSIGN(end, size_t, udata->dblock_size, hsize_t);
else
- H5_CHECKED_ASSIGN(end, size_t, ((sect_end - dblock_start) + 1), hsize_t)
+ H5_CHECKED_ASSIGN(end, size_t, ((sect_end - dblock_start) + 1), hsize_t);
/* Calculate the length */
len = end - start;
diff --git a/src/H5HFhuge.c b/src/H5HFhuge.c
index 23c3330..d4bfb21 100644
--- a/src/H5HFhuge.c
+++ b/src/H5HFhuge.c
@@ -442,7 +442,7 @@ H5HF__huge_insert(H5HF_hdr_t *hdr, size_t obj_size, void *obj, void *_id)
/* Encode ID for user */
*id++ = H5HF_ID_VERS_CURR | H5HF_ID_TYPE_HUGE;
- UINT64ENCODE_VAR(id, new_id, hdr->huge_id_size)
+ UINT64ENCODE_VAR(id, new_id, hdr->huge_id_size);
} /* end else */
/* Update statistics about heap */
@@ -520,7 +520,7 @@ H5HF__huge_get_obj_len(H5HF_hdr_t *hdr, const uint8_t *id, size_t *obj_len_p)
H5HF_huge_bt2_filt_indir_rec_t search_rec; /* Record for searching for object */
/* Get ID for looking up 'huge' object in v2 B-tree */
- UINT64DECODE_VAR(id, search_rec.id, hdr->huge_id_size)
+ UINT64DECODE_VAR(id, search_rec.id, hdr->huge_id_size);
/* Look up object in v2 B-tree */
if (H5B2_find(hdr->huge_bt2, &search_rec, &found, H5HF__huge_bt2_filt_indir_found, &found_rec) <
@@ -537,7 +537,7 @@ H5HF__huge_get_obj_len(H5HF_hdr_t *hdr, const uint8_t *id, size_t *obj_len_p)
H5HF_huge_bt2_indir_rec_t search_rec; /* Record for searching for object */
/* Get ID for looking up 'huge' object in v2 B-tree */
- UINT64DECODE_VAR(id, search_rec.id, hdr->huge_id_size)
+ UINT64DECODE_VAR(id, search_rec.id, hdr->huge_id_size);
/* Look up object in v2 B-tree */
if (H5B2_find(hdr->huge_bt2, &search_rec, &found, H5HF__huge_bt2_indir_found, &found_rec) < 0)
@@ -609,7 +609,7 @@ H5HF__huge_get_obj_off(H5HF_hdr_t *hdr, const uint8_t *id, hsize_t *obj_off_p)
H5HF_huge_bt2_filt_indir_rec_t search_rec; /* Record for searching for object */
/* Get ID for looking up 'huge' object in v2 B-tree */
- UINT64DECODE_VAR(id, search_rec.id, hdr->huge_id_size)
+ UINT64DECODE_VAR(id, search_rec.id, hdr->huge_id_size);
/* Look up object in v2 B-tree */
if (H5B2_find(hdr->huge_bt2, &search_rec, &found, H5HF__huge_bt2_filt_indir_found, &found_rec) <
@@ -626,7 +626,7 @@ H5HF__huge_get_obj_off(H5HF_hdr_t *hdr, const uint8_t *id, hsize_t *obj_off_p)
H5HF_huge_bt2_indir_rec_t search_rec; /* Record for searching for object */
/* Get ID for looking up 'huge' object in v2 B-tree */
- UINT64DECODE_VAR(id, search_rec.id, hdr->huge_id_size)
+ UINT64DECODE_VAR(id, search_rec.id, hdr->huge_id_size);
/* Look up object in v2 B-tree */
if (H5B2_find(hdr->huge_bt2, &search_rec, &found, H5HF__huge_bt2_indir_found, &found_rec) < 0)
@@ -708,7 +708,7 @@ H5HF__huge_op_real(H5HF_hdr_t *hdr, const uint8_t *id, hbool_t is_read, H5HF_ope
H5HF_huge_bt2_filt_indir_rec_t search_rec; /* Record for searching for object */
/* Get ID for looking up 'huge' object in v2 B-tree */
- UINT64DECODE_VAR(id, search_rec.id, hdr->huge_id_size)
+ UINT64DECODE_VAR(id, search_rec.id, hdr->huge_id_size);
/* Look up object in v2 B-tree */
if (H5B2_find(hdr->huge_bt2, &search_rec, &found, H5HF__huge_bt2_filt_indir_found, &found_rec) <
@@ -727,7 +727,7 @@ H5HF__huge_op_real(H5HF_hdr_t *hdr, const uint8_t *id, hbool_t is_read, H5HF_ope
H5HF_huge_bt2_indir_rec_t search_rec; /* Record for searching for object */
/* Get ID for looking up 'huge' object in v2 B-tree */
- UINT64DECODE_VAR(id, search_rec.id, hdr->huge_id_size)
+ UINT64DECODE_VAR(id, search_rec.id, hdr->huge_id_size);
/* Look up object in v2 B-tree */
if (H5B2_find(hdr->huge_bt2, &search_rec, &found, H5HF__huge_bt2_indir_found, &found_rec) < 0)
@@ -855,7 +855,7 @@ H5HF__huge_write(H5HF_hdr_t *hdr, const uint8_t *id, const void *obj)
}
/* Get ID for looking up 'huge' object in v2 B-tree */
- UINT64DECODE_VAR(id, search_rec.id, hdr->huge_id_size)
+ UINT64DECODE_VAR(id, search_rec.id, hdr->huge_id_size);
/* Look up object in v2 B-tree */
if (H5B2_find(hdr->huge_bt2, &search_rec, &found, H5HF__huge_bt2_indir_found, &found_rec) < 0)
@@ -1020,7 +1020,7 @@ H5HF__huge_remove(H5HF_hdr_t *hdr, const uint8_t *id)
H5HF_huge_bt2_filt_indir_rec_t search_rec; /* Record for searching for object */
/* Get ID for looking up 'huge' object in v2 B-tree */
- UINT64DECODE_VAR(id, search_rec.id, hdr->huge_id_size)
+ UINT64DECODE_VAR(id, search_rec.id, hdr->huge_id_size);
/* Remove the record for tracking the 'huge' object from the v2 B-tree */
/* (space in the file for the object is freed in the 'remove' callback) */
@@ -1031,7 +1031,7 @@ H5HF__huge_remove(H5HF_hdr_t *hdr, const uint8_t *id)
H5HF_huge_bt2_indir_rec_t search_rec; /* Record for searching for object */
/* Get ID for looking up 'huge' object in v2 B-tree */
- UINT64DECODE_VAR(id, search_rec.id, hdr->huge_id_size)
+ UINT64DECODE_VAR(id, search_rec.id, hdr->huge_id_size);
/* Remove the record for tracking the 'huge' object from the v2 B-tree */
/* (space in the file for the object is freed in the 'remove' callback) */
diff --git a/src/H5HFpkg.h b/src/H5HFpkg.h
index 83fda1f..e036cf0 100644
--- a/src/H5HFpkg.h
+++ b/src/H5HFpkg.h
@@ -154,9 +154,11 @@
/* Decode a "managed" heap ID */
#define H5HF_MAN_ID_DECODE(i, h, f, o, l) \
- f = *(uint8_t *)i++; \
- UINT64DECODE_VAR((i), (o), (h)->heap_off_size); \
- UINT64DECODE_VAR((i), (l), (h)->heap_len_size)
+ do { \
+ f = *(uint8_t *)i++; \
+ UINT64DECODE_VAR((i), (o), (h)->heap_off_size); \
+ UINT64DECODE_VAR((i), (l), (h)->heap_len_size); \
+ } while (0)
/* Free space section types for fractal heap */
/* (values stored in free space data structures in file) */
diff --git a/src/H5HG.c b/src/H5HG.c
index 07b23a9..c6c3c8d 100644
--- a/src/H5HG.c
+++ b/src/H5HG.c
@@ -380,7 +380,7 @@ H5HG__alloc(H5F_t *f, H5HG_heap_t *heap, size_t size, unsigned *heap_flags_ptr)
ret_value = idx;
done:
- FUNC_LEAVE_NOAPI(ret_value);
+ FUNC_LEAVE_NOAPI(ret_value)
} /* end H5HG__alloc() */
/*-------------------------------------------------------------------------
@@ -823,7 +823,7 @@ done:
if (heap && H5AC_unprotect(f, H5AC_GHEAP, hobj->addr, heap, flags) < 0)
HDONE_ERROR(H5E_HEAP, H5E_CANTUNPROTECT, FAIL, "unable to release object header")
- FUNC_LEAVE_NOAPI_TAG(ret_value);
+ FUNC_LEAVE_NOAPI_TAG(ret_value)
} /* end H5HG_remove() */
/*-------------------------------------------------------------------------
diff --git a/src/H5HGdbg.c b/src/H5HGdbg.c
index 9cdf47b..e2a8a90 100644
--- a/src/H5HGdbg.c
+++ b/src/H5HGdbg.c
@@ -149,5 +149,5 @@ done:
if (h && H5AC_unprotect(f, H5AC_GHEAP, addr, h, H5AC__NO_FLAGS_SET) < 0)
HDONE_ERROR(H5E_HEAP, H5E_PROTECT, FAIL, "unable to release object header");
- FUNC_LEAVE_NOAPI(ret_value);
+ FUNC_LEAVE_NOAPI(ret_value)
} /* end H5HG_debug() */
diff --git a/src/H5HLcache.c b/src/H5HLcache.c
index bdce190..fcf93d1 100644
--- a/src/H5HLcache.c
+++ b/src/H5HLcache.c
@@ -298,11 +298,11 @@ H5HL__fl_serialize(const H5HL_t *heap)
image = heap->dblk_image + fl->offset;
if (fl->next)
- H5_ENCODE_LENGTH_LEN(image, fl->next->offset, heap->sizeof_size)
+ H5_ENCODE_LENGTH_LEN(image, fl->next->offset, heap->sizeof_size);
else
- H5_ENCODE_LENGTH_LEN(image, H5HL_FREE_NULL, heap->sizeof_size)
+ H5_ENCODE_LENGTH_LEN(image, H5HL_FREE_NULL, heap->sizeof_size);
- H5_ENCODE_LENGTH_LEN(image, fl->size, heap->sizeof_size)
+ H5_ENCODE_LENGTH_LEN(image, fl->size, heap->sizeof_size);
}
FUNC_LEAVE_NOAPI_VOID
diff --git a/src/H5HLdblk.c b/src/H5HLdblk.c
index 6a938f4..73aa9b6 100644
--- a/src/H5HLdblk.c
+++ b/src/H5HLdblk.c
@@ -112,7 +112,7 @@ done:
/* H5FL_FREE always returns NULL so we can't check for errors */
dblk = H5FL_FREE(H5HL_dblk_t, dblk);
- FUNC_LEAVE_NOAPI(ret_value);
+ FUNC_LEAVE_NOAPI(ret_value)
} /* end H5HL__dblk_new() */
/*-------------------------------------------------------------------------
diff --git a/src/H5Iint.c b/src/H5Iint.c
index 8a6b7ae..6bf32d7 100644
--- a/src/H5Iint.c
+++ b/src/H5Iint.c
@@ -480,9 +480,9 @@ H5I__destroy_type(H5I_type_t type)
}
H5E_END_TRY /* don't care about errors */
- /* Check if we should release the ID class */
- if (type_info->cls->flags & H5I_CLASS_IS_APPLICATION)
- type_info->cls = H5MM_xfree_const(type_info->cls);
+ /* Check if we should release the ID class */
+ if (type_info->cls->flags & H5I_CLASS_IS_APPLICATION)
+ type_info->cls = H5MM_xfree_const(type_info->cls);
HASH_CLEAR(hh, type_info->hash_table);
type_info->hash_table = NULL;
@@ -827,7 +827,7 @@ H5I_is_file_object(hid_t id)
H5I_type_t type = H5I_get_type(id);
htri_t ret_value = FAIL;
- FUNC_ENTER_NOAPI(FAIL);
+ FUNC_ENTER_NOAPI(FAIL)
/* Fail if the ID type is out of range */
if (type < 1 || type >= H5I_NTYPES)
@@ -851,7 +851,7 @@ H5I_is_file_object(hid_t id)
ret_value = FALSE;
done:
- FUNC_LEAVE_NOAPI(ret_value);
+ FUNC_LEAVE_NOAPI(ret_value)
} /* H5I_is_file_object() */
/*-------------------------------------------------------------------------
diff --git a/src/H5O.c b/src/H5O.c
index c92f4ae..f782152 100644
--- a/src/H5O.c
+++ b/src/H5O.c
@@ -2093,7 +2093,7 @@ H5O__disable_mdc_flushes(H5O_loc_t *oloc)
HGOTO_ERROR(H5E_OHDR, H5E_CANTCORK, FAIL, "unable to cork object");
done:
- FUNC_LEAVE_NOAPI(ret_value);
+ FUNC_LEAVE_NOAPI(ret_value)
} /* H5O__disable_mdc_flushes() */
/*-------------------------------------------------------------------------
@@ -2118,7 +2118,7 @@ H5Odisable_mdc_flushes(hid_t object_id)
H5VL_loc_params_t loc_params; /* Location parameters */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_API(FAIL);
+ FUNC_ENTER_API(FAIL)
H5TRACE1("e", "i", object_id);
/* Make sure the ID is a file object */
@@ -2166,7 +2166,7 @@ H5O__enable_mdc_flushes(H5O_loc_t *oloc)
HGOTO_ERROR(H5E_OHDR, H5E_CANTUNCORK, FAIL, "unable to uncork object");
done:
- FUNC_LEAVE_NOAPI(ret_value);
+ FUNC_LEAVE_NOAPI(ret_value)
} /* H5O__enable_mdc_flushes() */
/*-------------------------------------------------------------------------
@@ -2191,7 +2191,7 @@ H5Oenable_mdc_flushes(hid_t object_id)
H5VL_loc_params_t loc_params; /* Location parameters */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_API(FAIL);
+ FUNC_ENTER_API(FAIL)
H5TRACE1("e", "i", object_id);
/* Make sure the ID is a file object */
@@ -2270,7 +2270,7 @@ H5Oare_mdc_flushes_disabled(hid_t object_id, hbool_t *are_disabled)
H5VL_loc_params_t loc_params; /* Location parameters */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_API(FAIL);
+ FUNC_ENTER_API(FAIL)
H5TRACE2("e", "i*b", object_id, are_disabled);
/* Sanity check */
diff --git a/src/H5Oainfo.c b/src/H5Oainfo.c
index 6d0261d..b5e21ef 100644
--- a/src/H5Oainfo.c
+++ b/src/H5Oainfo.c
@@ -131,7 +131,7 @@ H5O__ainfo_decode(H5F_t *f, H5O_t H5_ATTR_UNUSED *open_oh, unsigned H5_ATTR_UNUS
if (ainfo->track_corder) {
if (H5_IS_BUFFER_OVERFLOW(p, 2, p_end))
HGOTO_ERROR(H5E_OHDR, H5E_OVERFLOW, NULL, "ran off end of input buffer while decoding");
- UINT16DECODE(p, ainfo->max_crt_idx)
+ UINT16DECODE(p, ainfo->max_crt_idx);
}
else
ainfo->max_crt_idx = H5O_MAX_CRT_ORDER_IDX;
@@ -428,7 +428,7 @@ H5O__ainfo_copy_file(H5F_t H5_ATTR_NDEBUG_UNUSED *file_src, void *mesg_src, H5F_
/* Prepare to copy dense attributes - actual copy in post_copy */
/* Set copied metadata tag */
- H5_BEGIN_TAG(H5AC__COPIED_TAG);
+ H5_BEGIN_TAG(H5AC__COPIED_TAG)
if (H5A__dense_create(file_dst, ainfo_dst) < 0)
HGOTO_ERROR_TAG(H5E_OHDR, H5E_CANTINIT, NULL, "unable to create dense storage for attributes")
diff --git a/src/H5Oattr.c b/src/H5Oattr.c
index 1d48a78..20eeae3 100644
--- a/src/H5Oattr.c
+++ b/src/H5Oattr.c
@@ -408,7 +408,7 @@ H5O__attr_encode(H5F_t *f, uint8_t *p, const void *mesg)
HDmemset(p, 0, attr->shared->data_size);
done:
- FUNC_LEAVE_NOAPI(ret_value);
+ FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O__attr_encode() */
/*--------------------------------------------------------------------------
diff --git a/src/H5Ocache.c b/src/H5Ocache.c
index da200b0..48de673 100644
--- a/src/H5Ocache.c
+++ b/src/H5Ocache.c
@@ -456,7 +456,7 @@ H5O__cache_serialize(const H5F_t *f, void *image, size_t len, void *_thing)
/* Number of messages */
#ifdef H5O_ENABLE_BAD_MESG_COUNT
if (oh->store_bad_mesg_count)
- UINT16ENCODE(chunk_image, (oh->nmesgs - 1))
+ UINT16ENCODE(chunk_image, (oh->nmesgs - 1));
else
#endif /* H5O_ENABLE_BAD_MESG_COUNT */
UINT16ENCODE(chunk_image, oh->nmesgs);
@@ -1269,7 +1269,7 @@ H5O__chunk_deserialize(H5O_t *oh, haddr_t addr, size_t chunk_size, const uint8_t
if (oh->version == H5O_VERSION_1) {
if (H5_IS_BUFFER_OVERFLOW(chunk_image, 2, p_end))
HGOTO_ERROR(H5E_OHDR, H5E_OVERFLOW, FAIL, "ran off end of input buffer while decoding");
- UINT16DECODE(chunk_image, id)
+ UINT16DECODE(chunk_image, id);
}
else {
if (H5_IS_BUFFER_OVERFLOW(chunk_image, 1, p_end))
diff --git a/src/H5Ocopy.c b/src/H5Ocopy.c
index 8d39800..9da56c7 100644
--- a/src/H5Ocopy.c
+++ b/src/H5Ocopy.c
@@ -745,7 +745,7 @@ H5O__copy_header_real(const H5O_loc_t *oloc_src, H5O_loc_t *oloc_dst /*out*/, H5
HGOTO_ERROR(H5E_CACHE, H5E_CANTTAG, FAIL, "unable to re-tag metadata entries")
/* Set metadata tag for destination object's object header */
- H5_BEGIN_TAG(oloc_dst->addr);
+ H5_BEGIN_TAG(oloc_dst->addr)
/* Insert destination object header in cache */
if (H5AC_insert_entry(oloc_dst->file, H5AC_OHDR, oloc_dst->addr, oh_dst, H5AC__NO_FLAGS_SET) < 0)
diff --git a/src/H5Odeprec.c b/src/H5Odeprec.c
index 01cd580..81d3b38 100644
--- a/src/H5Odeprec.c
+++ b/src/H5Odeprec.c
@@ -91,14 +91,14 @@ static herr_t H5O__get_info_old(H5VL_object_t *vol_obj, H5VL_loc_params_t *loc_p
static herr_t
H5O__reset_info1(H5O_info1_t *oinfo)
{
- FUNC_ENTER_PACKAGE_NOERR;
+ FUNC_ENTER_PACKAGE_NOERR
/* Reset the passed-in info struct */
HDmemset(oinfo, 0, sizeof(H5O_info1_t));
oinfo->type = H5O_TYPE_UNKNOWN;
oinfo->addr = HADDR_UNDEF;
- FUNC_LEAVE_NOAPI(SUCCEED);
+ FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5O__reset_info1() */
/*-------------------------------------------------------------------------
@@ -201,7 +201,7 @@ H5O__iterate1_adapter(hid_t obj_id, const char *name, const H5O_info2_t *oinfo2,
ret_value = (shim_data->real_op)(obj_id, name, &oinfo, shim_data->real_op_data);
done:
- FUNC_LEAVE_NOAPI(ret_value);
+ FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O__iterate1_adapter() */
/*-------------------------------------------------------------------------
diff --git a/src/H5Odtype.c b/src/H5Odtype.c
index cab2eb2..db9dde5 100644
--- a/src/H5Odtype.c
+++ b/src/H5Odtype.c
@@ -384,13 +384,13 @@ H5O__dtype_decode_helper(unsigned *ioflags /*in,out*/, const uint8_t **pp, H5T_t
HGOTO_ERROR(H5E_OHDR, H5E_OVERFLOW, FAIL,
"ran off end of input buffer while decoding");
UINT32DECODE_VAR(*pp, dt->shared->u.compnd.memb[dt->shared->u.compnd.nmembs].offset,
- offset_nbytes)
+ offset_nbytes);
}
else {
if (H5_IS_KNOWN_BUFFER_OVERFLOW(skip, *pp, 4, p_end))
HGOTO_ERROR(H5E_OHDR, H5E_OVERFLOW, FAIL,
"ran off end of input buffer while decoding");
- UINT32DECODE(*pp, dt->shared->u.compnd.memb[dt->shared->u.compnd.nmembs].offset)
+ UINT32DECODE(*pp, dt->shared->u.compnd.memb[dt->shared->u.compnd.nmembs].offset);
}
/* Older versions of the library allowed a field to have
@@ -1141,9 +1141,9 @@ H5O__dtype_encode_helper(uint8_t **pp, const H5T_t *dt)
/* Member offset */
/* (starting with version 3 of the datatype message, use the minimum # of bytes required) */
if (dt->shared->version >= H5O_DTYPE_VERSION_3)
- UINT32ENCODE_VAR(*pp, (uint32_t)dt->shared->u.compnd.memb[i].offset, offset_nbytes)
+ UINT32ENCODE_VAR(*pp, (uint32_t)dt->shared->u.compnd.memb[i].offset, offset_nbytes);
else
- UINT32ENCODE(*pp, dt->shared->u.compnd.memb[i].offset)
+ UINT32ENCODE(*pp, dt->shared->u.compnd.memb[i].offset);
/* If we don't have any array fields, write out the old style
* member information, for better backward compatibility
diff --git a/src/H5Oflush.c b/src/H5Oflush.c
index 2348673..d7eb68c 100644
--- a/src/H5Oflush.c
+++ b/src/H5Oflush.c
@@ -269,7 +269,7 @@ done:
if (objs_incr && file)
H5F_decr_nopen_objs(file);
- FUNC_LEAVE_NOAPI(ret_value);
+ FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O_refresh_metadata() */
/*-------------------------------------------------------------------------
@@ -344,7 +344,7 @@ H5O__refresh_metadata_close(H5O_loc_t *oloc, H5G_loc_t *obj_loc, hid_t oid)
HGOTO_ERROR(H5E_OHDR, H5E_SYSTEM, FAIL, "unable to cork the object")
done:
- FUNC_LEAVE_NOAPI(ret_value);
+ FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O__refresh_metadata_close() */
/*-------------------------------------------------------------------------
@@ -434,5 +434,5 @@ H5O_refresh_metadata_reopen(hid_t oid, hid_t apl_id, H5G_loc_t *obj_loc, H5VL_t
HGOTO_ERROR(H5E_OHDR, H5E_CANTREGISTER, FAIL, "unable to re-register object ID after refresh")
done:
- FUNC_LEAVE_NOAPI(ret_value);
+ FUNC_LEAVE_NOAPI(ret_value)
} /* end H5O_refresh_metadata_reopen() */
diff --git a/src/H5Oginfo.c b/src/H5Oginfo.c
index df45e53..59121c9 100644
--- a/src/H5Oginfo.c
+++ b/src/H5Oginfo.c
@@ -118,8 +118,8 @@ H5O__ginfo_decode(H5F_t H5_ATTR_UNUSED *f, H5O_t H5_ATTR_UNUSED *open_oh, unsign
if (ginfo->store_link_phase_change) {
if (H5_IS_BUFFER_OVERFLOW(p, 2 * 2, p_end))
HGOTO_ERROR(H5E_OHDR, H5E_OVERFLOW, NULL, "ran off end of input buffer while decoding")
- UINT16DECODE(p, ginfo->max_compact)
- UINT16DECODE(p, ginfo->min_dense)
+ UINT16DECODE(p, ginfo->max_compact);
+ UINT16DECODE(p, ginfo->min_dense);
}
else {
ginfo->max_compact = H5G_CRT_GINFO_MAX_COMPACT;
@@ -130,8 +130,8 @@ H5O__ginfo_decode(H5F_t H5_ATTR_UNUSED *f, H5O_t H5_ATTR_UNUSED *open_oh, unsign
if (ginfo->store_est_entry_info) {
if (H5_IS_BUFFER_OVERFLOW(p, 2 * 2, p_end))
HGOTO_ERROR(H5E_OHDR, H5E_OVERFLOW, NULL, "ran off end of input buffer while decoding")
- UINT16DECODE(p, ginfo->est_num_entries)
- UINT16DECODE(p, ginfo->est_name_len)
+ UINT16DECODE(p, ginfo->est_num_entries);
+ UINT16DECODE(p, ginfo->est_name_len);
}
else {
ginfo->est_num_entries = H5G_CRT_GINFO_EST_NUM_ENTRIES;
@@ -183,14 +183,14 @@ H5O__ginfo_encode(H5F_t H5_ATTR_UNUSED *f, hbool_t H5_ATTR_UNUSED disable_shared
/* Store the max. # of links to store compactly & the min. # of links to store densely */
if (ginfo->store_link_phase_change) {
- UINT16ENCODE(p, ginfo->max_compact)
- UINT16ENCODE(p, ginfo->min_dense)
+ UINT16ENCODE(p, ginfo->max_compact);
+ UINT16ENCODE(p, ginfo->min_dense);
} /* end if */
/* Estimated # of entries & name lengths */
if (ginfo->store_est_entry_info) {
- UINT16ENCODE(p, ginfo->est_num_entries)
- UINT16ENCODE(p, ginfo->est_name_len)
+ UINT16ENCODE(p, ginfo->est_num_entries);
+ UINT16ENCODE(p, ginfo->est_name_len);
} /* end if */
FUNC_LEAVE_NOAPI(SUCCEED)
diff --git a/src/H5Oint.c b/src/H5Oint.c
index 621b5a0..f262545 100644
--- a/src/H5Oint.c
+++ b/src/H5Oint.c
@@ -517,7 +517,7 @@ H5O_apply_ohdr(H5F_t *f, H5O_t *oh, hid_t ocpl_id, size_t size_hint, size_t init
}
/* Set metadata tag in API context */
- H5_BEGIN_TAG(oh_addr);
+ H5_BEGIN_TAG(oh_addr)
/* Cache object header */
if (H5AC_insert_entry(f, H5AC_OHDR, oh_addr, oh, insert_flags) < 0)
@@ -537,7 +537,7 @@ H5O_apply_ohdr(H5F_t *f, H5O_t *oh, hid_t ocpl_id, size_t size_hint, size_t init
HGOTO_ERROR(H5E_OHDR, H5E_CANTOPENOBJ, FAIL, "unable to open object header")
done:
- FUNC_LEAVE_NOAPI(ret_value);
+ FUNC_LEAVE_NOAPI(ret_value)
} /* H5O_apply_ohdr() */
/*-------------------------------------------------------------------------
@@ -2521,7 +2521,7 @@ H5O_get_oh_flags(const H5O_t *oh)
{
FUNC_ENTER_NOAPI_NOINIT_NOERR
HDassert(oh);
- FUNC_LEAVE_NOAPI(oh->flags); /* flags can be 0 */
+ FUNC_LEAVE_NOAPI(oh->flags) /* flags can be 0 */
} /* H5O_get_oh_flags() */
/*-------------------------------------------------------------------------
@@ -2542,7 +2542,7 @@ H5O_get_oh_mtime(const H5O_t *oh)
FUNC_ENTER_NOAPI_NOINIT_NOERR
HDassert(oh);
HDassert(oh->mtime);
- FUNC_LEAVE_NOAPI(oh->mtime);
+ FUNC_LEAVE_NOAPI(oh->mtime)
} /* H5O_get_oh_mtime() */
/*-------------------------------------------------------------------------
@@ -2559,7 +2559,7 @@ H5O_get_oh_version(const H5O_t *oh)
FUNC_ENTER_NOAPI_NOINIT_NOERR
HDassert(oh);
HDassert(oh->version);
- FUNC_LEAVE_NOAPI(oh->version);
+ FUNC_LEAVE_NOAPI(oh->version)
} /* H5O_get_oh_version() */
/*-------------------------------------------------------------------------
@@ -3085,12 +3085,12 @@ done:
static herr_t
H5O__reset_info2(H5O_info2_t *oinfo)
{
- FUNC_ENTER_PACKAGE_NOERR;
+ FUNC_ENTER_PACKAGE_NOERR
/* Reset the passed-in info struct */
HDmemset(oinfo, 0, sizeof(H5O_info2_t));
oinfo->type = H5O_TYPE_UNKNOWN;
oinfo->token = H5O_TOKEN_UNDEF;
- FUNC_LEAVE_NOAPI(SUCCEED);
+ FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5O__reset_info2() */
diff --git a/src/H5Olayout.c b/src/H5Olayout.c
index cfe1e63..e24bfc4 100644
--- a/src/H5Olayout.c
+++ b/src/H5Olayout.c
@@ -578,7 +578,7 @@ H5O__layout_decode(H5F_t *f, H5O_t H5_ATTR_UNUSED *open_oh, unsigned H5_ATTR_UNU
if (H5_IS_BUFFER_OVERFLOW(heap_block_p, H5F_sizeof_size(f), heap_block_p_end))
HGOTO_ERROR(H5E_OHDR, H5E_OVERFLOW, NULL,
"ran off end of input buffer while decoding")
- H5F_DECODE_LENGTH(f, heap_block_p, tmp_hsize)
+ H5F_DECODE_LENGTH(f, heap_block_p, tmp_hsize);
/* Allocate entry list */
if (NULL == (mesg->storage.u.virt.list = (H5O_storage_virtual_ent_t *)H5MM_calloc(
@@ -728,7 +728,7 @@ H5O__layout_decode(H5F_t *f, H5O_t H5_ATTR_UNUSED *open_oh, unsigned H5_ATTR_UNU
if (H5_IS_BUFFER_OVERFLOW(heap_block_p, 4, heap_block_p_end))
HGOTO_ERROR(H5E_OHDR, H5E_OVERFLOW, NULL,
"ran off end of input buffer while decoding")
- UINT32DECODE(heap_block_p, stored_chksum)
+ UINT32DECODE(heap_block_p, stored_chksum);
/* Compute checksum */
computed_chksum = H5_checksum_metadata(heap_block, block_size - (size_t)4, 0);
diff --git a/src/H5Olinfo.c b/src/H5Olinfo.c
index e091ee6..0330f21 100644
--- a/src/H5Olinfo.c
+++ b/src/H5Olinfo.c
@@ -138,7 +138,7 @@ H5O__linfo_decode(H5F_t *f, H5O_t H5_ATTR_UNUSED *open_oh, unsigned H5_ATTR_UNUS
if (linfo->track_corder) {
if (H5_IS_BUFFER_OVERFLOW(p, 8, p_end))
HGOTO_ERROR(H5E_OHDR, H5E_OVERFLOW, NULL, "ran off end of input buffer while decoding")
- INT64DECODE(p, linfo->max_corder)
+ INT64DECODE(p, linfo->max_corder);
}
else
linfo->max_corder = 0;
@@ -208,7 +208,7 @@ H5O__linfo_encode(H5F_t *f, hbool_t H5_ATTR_UNUSED disable_shared, uint8_t *p, c
/* Max. link creation order value for the group, if tracked */
if (linfo->track_corder)
- INT64ENCODE(p, linfo->max_corder)
+ INT64ENCODE(p, linfo->max_corder);
/* Address of fractal heap to store "dense" links */
H5F_addr_encode(f, &p, linfo->fheap_addr);
@@ -458,7 +458,7 @@ H5O__linfo_post_copy_file_cb(const H5O_link_t *src_lnk, void *_udata)
dst_lnk_init = TRUE;
/* Set metadata tag in API context */
- H5_BEGIN_TAG(H5AC__COPIED_TAG);
+ H5_BEGIN_TAG(H5AC__COPIED_TAG)
/* Insert the new object in the destination file's group */
/* (Doesn't increment the link count - that's already been taken care of for hard links) */
diff --git a/src/H5Olink.c b/src/H5Olink.c
index 2c48af1..b4c34de 100644
--- a/src/H5Olink.c
+++ b/src/H5Olink.c
@@ -149,7 +149,7 @@ H5O__link_decode(H5F_t *f, H5O_t H5_ATTR_UNUSED *open_oh, unsigned H5_ATTR_UNUSE
if (link_flags & H5O_LINK_STORE_CORDER) {
if (H5_IS_BUFFER_OVERFLOW(p, 8, p_end))
HGOTO_ERROR(H5E_OHDR, H5E_OVERFLOW, NULL, "ran off end of input buffer while decoding")
- INT64DECODE(p, lnk->corder)
+ INT64DECODE(p, lnk->corder);
lnk->corder_valid = TRUE;
}
else {
@@ -223,7 +223,7 @@ H5O__link_decode(H5F_t *f, H5O_t H5_ATTR_UNUSED *open_oh, unsigned H5_ATTR_UNUSE
/* Get the link value */
if (H5_IS_BUFFER_OVERFLOW(p, 2, p_end))
HGOTO_ERROR(H5E_OHDR, H5E_OVERFLOW, NULL, "ran off end of input buffer while decoding")
- UINT16DECODE(p, len)
+ UINT16DECODE(p, len);
if (len == 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTLOAD, NULL, "invalid link length")
@@ -247,7 +247,7 @@ H5O__link_decode(H5F_t *f, H5O_t H5_ATTR_UNUSED *open_oh, unsigned H5_ATTR_UNUSE
/* A UD link. Get the user-supplied data */
if (H5_IS_BUFFER_OVERFLOW(p, 2, p_end))
HGOTO_ERROR(H5E_OHDR, H5E_OVERFLOW, NULL, "ran off end of input buffer while decoding")
- UINT16DECODE(p, len)
+ UINT16DECODE(p, len);
if (lnk->type == H5L_TYPE_EXTERNAL && len < 3)
HGOTO_ERROR(H5E_OHDR, H5E_OVERFLOW, NULL, "external link information length < 3")
lnk->u.ud.size = len;
@@ -332,7 +332,7 @@ H5O__link_encode(H5F_t *f, hbool_t H5_ATTR_UNUSED disable_shared, uint8_t *p, co
/* Store the link creation order in the file, if its valid */
if (lnk->corder_valid)
- INT64ENCODE(p, lnk->corder)
+ INT64ENCODE(p, lnk->corder);
/* Store a non-default link name character set */
if (link_flags & H5O_LINK_STORE_NAME_CSET)
@@ -375,7 +375,7 @@ H5O__link_encode(H5F_t *f, hbool_t H5_ATTR_UNUSED disable_shared, uint8_t *p, co
/* Store the link value */
len = (uint16_t)HDstrlen(lnk->u.soft.name);
HDassert(len > 0);
- UINT16ENCODE(p, len)
+ UINT16ENCODE(p, len);
H5MM_memcpy(p, lnk->u.soft.name, (size_t)len);
p += len;
break;
@@ -389,7 +389,7 @@ H5O__link_encode(H5F_t *f, hbool_t H5_ATTR_UNUSED disable_shared, uint8_t *p, co
/* Store the user-supplied data, however long it is */
len = (uint16_t)lnk->u.ud.size;
- UINT16ENCODE(p, len)
+ UINT16ENCODE(p, len);
if (len > 0) {
H5MM_memcpy(p, lnk->u.ud.udata, (size_t)len);
p += len;
diff --git a/src/H5Omessage.c b/src/H5Omessage.c
index 1c25d44..8dd8526 100644
--- a/src/H5Omessage.c
+++ b/src/H5Omessage.c
@@ -2047,7 +2047,7 @@ H5O_msg_flush(H5F_t *f, H5O_t *oh, H5O_mesg_t *mesg)
/* Encode the message prefix */
if (oh->version == H5O_VERSION_1)
- UINT16ENCODE(p, msg_id)
+ UINT16ENCODE(p, msg_id);
else
*p++ = (uint8_t)msg_id;
HDassert(mesg->raw_size < H5O_MESG_MAX_SIZE);
diff --git a/src/H5Opline.c b/src/H5Opline.c
index 711a67b..a40f027 100644
--- a/src/H5Opline.c
+++ b/src/H5Opline.c
@@ -229,7 +229,7 @@ H5O__pline_decode(H5F_t H5_ATTR_UNUSED *f, H5O_t H5_ATTR_UNUSED *open_oh, unsign
for (size_t j = 0; j < filter->cd_nelmts; j++) {
if (H5_IS_BUFFER_OVERFLOW(p, 4, p_end))
HGOTO_ERROR(H5E_OHDR, H5E_OVERFLOW, NULL, "ran off end of input buffer while decoding")
- UINT32DECODE(p, filter->cd_values[j])
+ UINT32DECODE(p, filter->cd_values[j]);
}
if (pline->version == H5O_PLINE_VERSION_1)
diff --git a/src/H5Orefcount.c b/src/H5Orefcount.c
index f4d3b5c..da36551 100644
--- a/src/H5Orefcount.c
+++ b/src/H5Orefcount.c
@@ -104,7 +104,7 @@ H5O__refcount_decode(H5F_t H5_ATTR_UNUSED *f, H5O_t H5_ATTR_UNUSED *open_oh,
/* Get reference count for object */
if (H5_IS_BUFFER_OVERFLOW(p, 4, p_end))
HGOTO_ERROR(H5E_OHDR, H5E_OVERFLOW, NULL, "ran off end of input buffer while decoding")
- UINT32DECODE(p, *refcount)
+ UINT32DECODE(p, *refcount);
/* Set return value */
ret_value = refcount;
diff --git a/src/H5Oshared.c b/src/H5Oshared.c
index 22d71a0..a6af84e 100644
--- a/src/H5Oshared.c
+++ b/src/H5Oshared.c
@@ -602,7 +602,7 @@ H5O__shared_copy_file(H5F_t H5_ATTR_NDEBUG_UNUSED *file_src, H5F_t *file_dst,
if (shared_src->type != H5O_SHARE_TYPE_COMMITTED) {
/* Simulate trying to share new message in the destination file. */
/* Set copied metadata tag */
- H5_BEGIN_TAG(H5AC__COPIED_TAG);
+ H5_BEGIN_TAG(H5AC__COPIED_TAG)
if (H5SM_try_share(file_dst, NULL, H5SM_DEFER, mesg_type->id, _native_dst, mesg_flags) < 0)
HGOTO_ERROR_TAG(H5E_OHDR, H5E_WRITEERROR, FAIL, "unable to determine if message should be shared")
diff --git a/src/H5Ostab.c b/src/H5Ostab.c
index 4a94485..3b7417d 100644
--- a/src/H5Ostab.c
+++ b/src/H5Ostab.c
@@ -307,7 +307,7 @@ H5O__stab_copy_file(H5F_t *file_src, void *native_src, H5F_t *file_dst,
HGOTO_ERROR(H5E_SYM, H5E_CANTGETSIZE, NULL, "can't query local heap size")
/* Set copy metadata tag */
- H5_BEGIN_TAG(H5AC__COPIED_TAG);
+ H5_BEGIN_TAG(H5AC__COPIED_TAG)
/* Create components of symbol table message */
if (H5G__stab_create_components(file_dst, stab_dst, size_hint) < 0)
diff --git a/src/H5Otest.c b/src/H5Otest.c
index 687d7c6..f3e6745 100644
--- a/src/H5Otest.c
+++ b/src/H5Otest.c
@@ -197,7 +197,7 @@ H5O__is_attr_empty_test(hid_t oid)
HDassert(nattrs == 0);
/* Set metadata tag in API context */
- H5_BEGIN_TAG(loc->addr);
+ H5_BEGIN_TAG(loc->addr)
/* Open the name index v2 B-tree */
if (NULL == (bt2_name = H5B2_open(loc->file, ainfo.name_bt2_addr, NULL)))
@@ -299,7 +299,7 @@ H5O__num_attrs_test(hid_t oid, hsize_t *nattrs)
HDassert(obj_nattrs == 0);
/* Set metadata tag in API context */
- H5_BEGIN_TAG(loc->addr);
+ H5_BEGIN_TAG(loc->addr)
/* Open the name index v2 B-tree */
if (NULL == (bt2_name = H5B2_open(loc->file, ainfo.name_bt2_addr, NULL)))
@@ -376,7 +376,7 @@ H5O__attr_dense_info_test(hid_t oid, hsize_t *name_count, hsize_t *corder_count)
api_ctx_pushed = TRUE;
/* Set metadata tag in API context */
- H5_BEGIN_TAG(loc->addr);
+ H5_BEGIN_TAG(loc->addr)
/* Get the object header */
if (NULL == (oh = H5O_protect(loc, H5AC__READ_ONLY_FLAG, FALSE)))
diff --git a/src/H5PLpath.c b/src/H5PLpath.c
index 9619b13..965479f 100644
--- a/src/H5PLpath.c
+++ b/src/H5PLpath.c
@@ -579,7 +579,7 @@ H5PL__path_table_iterate(H5PL_iterate_type_t iter_type, H5PL_iterate_t iter_op,
}
done:
- FUNC_LEAVE_NOAPI(ret_value);
+ FUNC_LEAVE_NOAPI(ret_value)
} /* end H5PL__path_table_iterate() */
/*-------------------------------------------------------------------------
diff --git a/src/H5Pdcpl.c b/src/H5Pdcpl.c
index 298baa5..2e814d3 100644
--- a/src/H5Pdcpl.c
+++ b/src/H5Pdcpl.c
@@ -460,7 +460,7 @@ H5P__dcrt_layout_enc(const void *value, void **_pp, size_t *size)
/* Encode chunk dims */
HDcompile_assert(sizeof(uint32_t) == sizeof(layout->u.chunk.dim[0]));
for (u = 0; u < (size_t)layout->u.chunk.ndims; u++) {
- UINT32ENCODE(*pp, layout->u.chunk.dim[u])
+ UINT32ENCODE(*pp, layout->u.chunk.dim[u]);
*size += sizeof(uint32_t);
} /* end for */
} /* end if */
@@ -468,7 +468,7 @@ H5P__dcrt_layout_enc(const void *value, void **_pp, size_t *size)
uint64_t nentries = (uint64_t)layout->storage.u.virt.list_nused;
/* Encode number of entries */
- UINT64ENCODE(*pp, nentries)
+ UINT64ENCODE(*pp, nentries);
*size += (size_t)8;
/* Iterate over entries */
@@ -613,7 +613,7 @@ H5P__dcrt_layout_dec(const void **_pp, void *value)
/* Set rank & dimensions */
tmp_layout.u.chunk.ndims = (unsigned)ndims;
for (u = 0; u < ndims; u++)
- UINT32DECODE(*pp, tmp_layout.u.chunk.dim[u])
+ UINT32DECODE(*pp, tmp_layout.u.chunk.dim[u]);
/* Point at the newly set up struct */
layout = &tmp_layout;
@@ -624,7 +624,7 @@ H5P__dcrt_layout_dec(const void **_pp, void *value)
uint64_t nentries; /* Number of VDS mappings */
/* Decode number of entries */
- UINT64DECODE(*pp, nentries)
+ UINT64DECODE(*pp, nentries);
if (nentries == (uint64_t)0)
/* Just use the default struct */
@@ -1093,7 +1093,7 @@ H5P__dcrt_fill_value_enc(const void *value, void **_pp, size_t *size)
*(*pp)++ = (uint8_t)fill->fill_time;
/* Encode size of fill value */
- INT64ENCODE(*pp, fill->size)
+ INT64ENCODE(*pp, fill->size);
/* Encode the fill value & datatype */
if (fill->size > 0) {
@@ -1183,7 +1183,7 @@ H5P__dcrt_fill_value_dec(const void **_pp, void *_value)
fill->fill_time = (H5D_fill_time_t) * (*pp)++;
/* Decode fill size */
- INT64DECODE(*pp, fill->size)
+ INT64DECODE(*pp, fill->size);
/* Check if there's a fill value */
if (fill->size > 0) {
diff --git a/src/H5Pdxpl.c b/src/H5Pdxpl.c
index ec033c1..2ad8b02 100644
--- a/src/H5Pdxpl.c
+++ b/src/H5Pdxpl.c
@@ -587,15 +587,15 @@ H5P__dxfr_btree_split_ratio_enc(const void *value, void **_pp, size_t *size)
*(*pp)++ = (uint8_t)sizeof(double);
/* Encode the left split value */
- H5_ENCODE_DOUBLE(*pp, *(const double *)btree_split_ratio)
+ H5_ENCODE_DOUBLE(*pp, *(const double *)btree_split_ratio);
btree_split_ratio++;
/* Encode the middle split value */
- H5_ENCODE_DOUBLE(*pp, *(const double *)btree_split_ratio)
+ H5_ENCODE_DOUBLE(*pp, *(const double *)btree_split_ratio);
btree_split_ratio++;
/* Encode the right split value */
- H5_ENCODE_DOUBLE(*pp, *(const double *)btree_split_ratio)
+ H5_ENCODE_DOUBLE(*pp, *(const double *)btree_split_ratio);
} /* end if */
/* Size of B-tree split ratio values */
@@ -640,9 +640,9 @@ H5P__dxfr_btree_split_ratio_dec(const void **_pp, void *_value)
HGOTO_ERROR(H5E_PLIST, H5E_BADVALUE, FAIL, "double value can't be decoded")
/* Decode the left, middle & left B-tree split ratios */
- H5_DECODE_DOUBLE(*pp, btree_split_ratio[0])
- H5_DECODE_DOUBLE(*pp, btree_split_ratio[1])
- H5_DECODE_DOUBLE(*pp, btree_split_ratio[2])
+ H5_DECODE_DOUBLE(*pp, btree_split_ratio[0]);
+ H5_DECODE_DOUBLE(*pp, btree_split_ratio[1]);
+ H5_DECODE_DOUBLE(*pp, btree_split_ratio[2]);
done:
FUNC_LEAVE_NOAPI(ret_value)
diff --git a/src/H5Pencdec.c b/src/H5Pencdec.c
index 2ee02c8..ebfa567 100644
--- a/src/H5Pencdec.c
+++ b/src/H5Pencdec.c
@@ -176,7 +176,7 @@ H5P__encode_unsigned(const void *value, void **_pp, size_t *size)
*(*pp)++ = (uint8_t)sizeof(unsigned);
/* Encode the value */
- H5_ENCODE_UNSIGNED(*pp, *(const unsigned *)value)
+ H5_ENCODE_UNSIGNED(*pp, *(const unsigned *)value);
} /* end if */
/* Set size needed for encoding */
@@ -283,7 +283,7 @@ H5P__encode_double(const void *value, void **_pp, size_t *size)
*(*pp)++ = (uint8_t)sizeof(double);
/* Encode the value */
- H5_ENCODE_DOUBLE(*pp, *(const double *)value)
+ H5_ENCODE_DOUBLE(*pp, *(const double *)value);
} /* end if */
/* Set size needed for encoding */
@@ -538,7 +538,7 @@ H5P__decode_unsigned(const void **_pp, void *_value)
if (enc_size != sizeof(unsigned))
HGOTO_ERROR(H5E_PLIST, H5E_BADVALUE, FAIL, "unsigned value can't be decoded")
- H5_DECODE_UNSIGNED(*pp, *value)
+ H5_DECODE_UNSIGNED(*pp, *value);
done:
FUNC_LEAVE_NOAPI(ret_value)
@@ -643,7 +643,7 @@ H5P__decode_double(const void **_pp, void *_value)
if (enc_size != sizeof(double))
HGOTO_ERROR(H5E_PLIST, H5E_BADVALUE, FAIL, "double value can't be decoded")
- H5_DECODE_DOUBLE(*pp, *value)
+ H5_DECODE_DOUBLE(*pp, *value);
done:
FUNC_LEAVE_NOAPI(ret_value)
diff --git a/src/H5Pfcpl.c b/src/H5Pfcpl.c
index f5d0db4..aa06240 100644
--- a/src/H5Pfcpl.c
+++ b/src/H5Pfcpl.c
@@ -712,7 +712,7 @@ H5P__fcrt_btree_rank_enc(const void *value, void **_pp, size_t *size)
/* Encode all the btree */
for (u = 0; u < H5B_NUM_BTREE_ID; u++) {
/* Encode the left split value */
- H5_ENCODE_UNSIGNED(*pp, *(const unsigned *)btree_k)
+ H5_ENCODE_UNSIGNED(*pp, *(const unsigned *)btree_k);
btree_k++;
} /* end for */
} /* end if */
@@ -760,7 +760,7 @@ H5P__fcrt_btree_rank_dec(const void **_pp, void *_value)
/* Decode all the type flags */
for (u = 0; u < H5B_NUM_BTREE_ID; u++)
- H5_DECODE_UNSIGNED(*pp, btree_k[u])
+ H5_DECODE_UNSIGNED(*pp, btree_k[u]);
done:
FUNC_LEAVE_NOAPI(ret_value)
@@ -999,7 +999,7 @@ H5P__fcrt_shmsg_index_types_enc(const void *value, void **_pp, size_t *size)
/* Encode all the type flags */
for (u = 0; u < H5O_SHMESG_MAX_NINDEXES; u++) {
/* Encode the left split value */
- H5_ENCODE_UNSIGNED(*pp, *(const unsigned *)type_flags)
+ H5_ENCODE_UNSIGNED(*pp, *(const unsigned *)type_flags);
type_flags++;
} /* end for */
} /* end if */
@@ -1048,7 +1048,7 @@ H5P__fcrt_shmsg_index_types_dec(const void **_pp, void *_value)
/* Decode all the type flags */
for (u = 0; u < H5O_SHMESG_MAX_NINDEXES; u++)
- H5_DECODE_UNSIGNED(*pp, type_flags[u])
+ H5_DECODE_UNSIGNED(*pp, type_flags[u]);
done:
FUNC_LEAVE_NOAPI(ret_value)
@@ -1090,7 +1090,7 @@ H5P__fcrt_shmsg_index_minsize_enc(const void *value, void **_pp, size_t *size)
/* Encode all the minsize values */
for (u = 0; u < H5O_SHMESG_MAX_NINDEXES; u++) {
/* Encode the left split value */
- H5_ENCODE_UNSIGNED(*pp, *(const unsigned *)minsizes)
+ H5_ENCODE_UNSIGNED(*pp, *(const unsigned *)minsizes);
minsizes++;
} /* end for */
} /* end if */
@@ -1139,7 +1139,7 @@ H5P__fcrt_shmsg_index_minsize_dec(const void **_pp, void *_value)
/* Decode all the minsize values */
for (u = 0; u < H5O_SHMESG_MAX_NINDEXES; u++)
- H5_DECODE_UNSIGNED(*pp, minsizes[u])
+ H5_DECODE_UNSIGNED(*pp, minsizes[u]);
done:
FUNC_LEAVE_NOAPI(ret_value)
diff --git a/src/H5Pgcpl.c b/src/H5Pgcpl.c
index 0fd3a68..15099a6 100644
--- a/src/H5Pgcpl.c
+++ b/src/H5Pgcpl.c
@@ -534,11 +534,11 @@ H5P__gcrt_group_info_enc(const void *value, void **_pp, size_t *size)
FUNC_ENTER_PACKAGE_NOERR
if (NULL != *pp) {
- UINT32ENCODE(*pp, ginfo->lheap_size_hint)
- UINT16ENCODE(*pp, ginfo->max_compact)
- UINT16ENCODE(*pp, ginfo->min_dense)
- UINT16ENCODE(*pp, ginfo->est_num_entries)
- UINT16ENCODE(*pp, ginfo->est_name_len)
+ UINT32ENCODE(*pp, ginfo->lheap_size_hint);
+ UINT16ENCODE(*pp, ginfo->max_compact);
+ UINT16ENCODE(*pp, ginfo->min_dense);
+ UINT16ENCODE(*pp, ginfo->est_num_entries);
+ UINT16ENCODE(*pp, ginfo->est_name_len);
} /* end if */
*size += sizeof(uint16_t) * 4 + sizeof(uint32_t);
@@ -574,11 +574,11 @@ H5P__gcrt_group_info_dec(const void **_pp, void *_value)
HDmemset(ginfo, 0, sizeof(H5O_ginfo_t));
*ginfo = H5G_def_ginfo_g;
- UINT32DECODE(*pp, ginfo->lheap_size_hint)
- UINT16DECODE(*pp, ginfo->max_compact)
- UINT16DECODE(*pp, ginfo->min_dense)
- UINT16DECODE(*pp, ginfo->est_num_entries)
- UINT16DECODE(*pp, ginfo->est_name_len)
+ UINT32DECODE(*pp, ginfo->lheap_size_hint);
+ UINT16DECODE(*pp, ginfo->max_compact);
+ UINT16DECODE(*pp, ginfo->min_dense);
+ UINT16DECODE(*pp, ginfo->est_num_entries);
+ UINT16DECODE(*pp, ginfo->est_name_len);
/* Update fields */
if (ginfo->max_compact != H5G_CRT_GINFO_MAX_COMPACT || ginfo->min_dense != H5G_CRT_GINFO_MIN_DENSE)
@@ -628,7 +628,7 @@ H5P__gcrt_link_info_enc(const void *value, void **_pp, size_t *size)
*(*pp)++ = (uint8_t)sizeof(unsigned);
/* Encode the value */
- H5_ENCODE_UNSIGNED(*pp, crt_order_flags)
+ H5_ENCODE_UNSIGNED(*pp, crt_order_flags);
} /* end if */
*size += (1 + sizeof(unsigned));
@@ -670,7 +670,7 @@ H5P__gcrt_link_info_dec(const void **_pp, void *_value)
HDmemset(linfo, 0, sizeof(H5O_linfo_t));
*linfo = H5G_def_linfo_g;
- H5_DECODE_UNSIGNED(*pp, crt_order_flags)
+ H5_DECODE_UNSIGNED(*pp, crt_order_flags);
/* Update fields */
linfo->track_corder = (hbool_t)((crt_order_flags & H5P_CRT_ORDER_TRACKED) ? TRUE : FALSE);
diff --git a/src/H5Pocpl.c b/src/H5Pocpl.c
index bad857f..a9968b0 100644
--- a/src/H5Pocpl.c
+++ b/src/H5Pocpl.c
@@ -1386,10 +1386,10 @@ H5P__ocrt_pipeline_enc(const void *value, void **_pp, size_t *size)
unsigned v; /* Local index variable */
/* encode filter ID */
- INT32ENCODE(*pp, pline->filter[u].id)
+ INT32ENCODE(*pp, pline->filter[u].id);
/* encode filter flags */
- H5_ENCODE_UNSIGNED(*pp, pline->filter[u].flags)
+ H5_ENCODE_UNSIGNED(*pp, pline->filter[u].flags);
/* encode filter name if it exists */
if (NULL != pline->filter[u].name) {
@@ -1413,7 +1413,7 @@ H5P__ocrt_pipeline_enc(const void *value, void **_pp, size_t *size)
/* encode all values */
for (v = 0; v < pline->filter[u].cd_nelmts; v++)
- H5_ENCODE_UNSIGNED(*pp, pline->filter[u].cd_values[v])
+ H5_ENCODE_UNSIGNED(*pp, pline->filter[u].cd_values[v]);
} /* end for */
} /* end if */
@@ -1482,10 +1482,10 @@ H5P__ocrt_pipeline_dec(const void **_pp, void *_value)
unsigned v; /* Local index variable */
/* decode filter id */
- INT32DECODE(*pp, filter.id)
+ INT32DECODE(*pp, filter.id);
/* decode filter flags */
- H5_DECODE_UNSIGNED(*pp, filter.flags)
+ H5_DECODE_UNSIGNED(*pp, filter.flags);
/* decode value indicating if the name is encoded */
has_name = *(*pp)++;
@@ -1512,7 +1512,7 @@ H5P__ocrt_pipeline_dec(const void **_pp, void *_value)
/* decode values */
for (v = 0; v < filter.cd_nelmts; v++)
- H5_DECODE_UNSIGNED(*pp, filter.cd_values[v])
+ H5_DECODE_UNSIGNED(*pp, filter.cd_values[v]);
/* Add the filter to the I/O pipeline */
if (H5Z_append(pline, filter.id, filter.flags, filter.cd_nelmts, filter.cd_values) < 0)
diff --git a/src/H5Pocpypl.c b/src/H5Pocpypl.c
index 98c9d8a..b61bcf9 100644
--- a/src/H5Pocpypl.c
+++ b/src/H5Pocpypl.c
@@ -210,7 +210,7 @@ H5P__free_merge_comm_dtype_list(H5O_copy_dtype_merge_list_t *dt_list)
dt_list = tmp_node;
} /* end while */
- FUNC_LEAVE_NOAPI(NULL);
+ FUNC_LEAVE_NOAPI(NULL)
} /* H5P__free_merge_comm_dtype_list */
/*--------------------------------------------------------------------------
diff --git a/src/H5Shyper.c b/src/H5Shyper.c
index 9f567d3..376426d 100644
--- a/src/H5Shyper.c
+++ b/src/H5Shyper.c
@@ -540,7 +540,7 @@ H5S__hyper_get_op_gen(void)
{
FUNC_ENTER_PACKAGE_NOERR
- FUNC_LEAVE_NOAPI(H5S_hyper_op_gen_g++);
+ FUNC_LEAVE_NOAPI(H5S_hyper_op_gen_g++)
} /* end H5S__hyper_op_gen() */
/*-------------------------------------------------------------------------
@@ -4041,13 +4041,13 @@ H5S__hyper_serialize(H5S_t *space, uint8_t **p)
UINT16ENCODE(pp, diminfo[u].start);
UINT16ENCODE(pp, diminfo[u].stride);
if (diminfo[u].count == H5S_UNLIMITED)
- UINT16ENCODE(pp, H5S_UINT16_MAX)
+ UINT16ENCODE(pp, H5S_UINT16_MAX);
else
- UINT16ENCODE(pp, diminfo[u].count)
+ UINT16ENCODE(pp, diminfo[u].count);
if (diminfo[u].block == H5S_UNLIMITED)
- UINT16ENCODE(pp, H5S_UINT16_MAX)
+ UINT16ENCODE(pp, H5S_UINT16_MAX);
else
- UINT16ENCODE(pp, diminfo[u].block)
+ UINT16ENCODE(pp, diminfo[u].block);
} /* end for */
break;
@@ -4057,13 +4057,13 @@ H5S__hyper_serialize(H5S_t *space, uint8_t **p)
UINT32ENCODE(pp, diminfo[u].start);
UINT32ENCODE(pp, diminfo[u].stride);
if (diminfo[u].count == H5S_UNLIMITED)
- UINT32ENCODE(pp, H5S_UINT32_MAX)
+ UINT32ENCODE(pp, H5S_UINT32_MAX);
else
- UINT32ENCODE(pp, diminfo[u].count)
+ UINT32ENCODE(pp, diminfo[u].count);
if (diminfo[u].block == H5S_UNLIMITED)
- UINT32ENCODE(pp, H5S_UINT32_MAX)
+ UINT32ENCODE(pp, H5S_UINT32_MAX);
else
- UINT32ENCODE(pp, diminfo[u].block)
+ UINT32ENCODE(pp, diminfo[u].block);
} /* end for */
break;
@@ -4073,13 +4073,13 @@ H5S__hyper_serialize(H5S_t *space, uint8_t **p)
UINT64ENCODE(pp, diminfo[u].start);
UINT64ENCODE(pp, diminfo[u].stride);
if (diminfo[u].count == H5S_UNLIMITED)
- UINT64ENCODE(pp, H5S_UINT64_MAX)
+ UINT64ENCODE(pp, H5S_UINT64_MAX);
else
- UINT64ENCODE(pp, diminfo[u].count)
+ UINT64ENCODE(pp, diminfo[u].count);
if (diminfo[u].block == H5S_UNLIMITED)
- UINT64ENCODE(pp, H5S_UINT64_MAX)
+ UINT64ENCODE(pp, H5S_UINT64_MAX);
else
- UINT64ENCODE(pp, diminfo[u].block)
+ UINT64ENCODE(pp, diminfo[u].block);
} /* end for */
if (version == H5S_HYPER_VERSION_2)
len += (4 * space->extent.rank * 8);
@@ -5081,7 +5081,7 @@ H5S__hyper_unlim_dim(const H5S_t *space)
{
FUNC_ENTER_PACKAGE_NOERR
- FUNC_LEAVE_NOAPI(space->select.sel_info.hslab->unlim_dim);
+ FUNC_LEAVE_NOAPI(space->select.sel_info.hslab->unlim_dim)
} /* end H5S__hyper_unlim_dim() */
/*--------------------------------------------------------------------------
diff --git a/src/H5Tconv.c b/src/H5Tconv.c
index 8118eb0..7c50a3c 100644
--- a/src/H5Tconv.c
+++ b/src/H5Tconv.c
@@ -1041,12 +1041,12 @@ done:
/* Swap two elements (I & J) of an array using a temporary variable */
#define H5_SWAP_BYTES(ARRAY, I, J) \
- { \
+ do { \
uint8_t _tmp; \
_tmp = ARRAY[I]; \
ARRAY[I] = ARRAY[J]; \
ARRAY[J] = _tmp; \
- }
+ } while (0)
/* Minimum size of variable-length conversion buffer */
#define H5T_VLEN_MIN_CONF_BUF_SIZE 4096
diff --git a/src/H5VLcallback.c b/src/H5VLcallback.c
index 8191d29..c078579 100644
--- a/src/H5VLcallback.c
+++ b/src/H5VLcallback.c
@@ -3752,7 +3752,7 @@ H5VL__file_open_find_connector_cb(H5PL_type_t plugin_type, const void *plugin_in
{
status = H5VL_file_specific(NULL, &vol_cb_args, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL);
}
- H5E_END_TRY;
+ H5E_END_TRY
if (status < 0) {
ssize_t new_num_errors = 0;
diff --git a/src/H5VLnative.c b/src/H5VLnative.c
index b667808..f686219 100644
--- a/src/H5VLnative.c
+++ b/src/H5VLnative.c
@@ -557,7 +557,7 @@ H5VL_native_get_file_struct(void *obj, H5I_type_t type, H5F_t **file)
H5O_loc_t *oloc = NULL; /* Object location for ID */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(FAIL);
+ FUNC_ENTER_NOAPI(FAIL)
*file = NULL;
diff --git a/src/H5VMprivate.h b/src/H5VMprivate.h
index 49bb53d..0c96fef 100644
--- a/src/H5VMprivate.h
+++ b/src/H5VMprivate.h
@@ -35,13 +35,13 @@ typedef herr_t (*H5VM_opvv_func_t)(hsize_t dst_off, hsize_t src_off, size_t len,
/* Other functions */
#define H5VM_vector_cpy(N, DST, SRC) \
- { \
+ do { \
HDassert(sizeof(*(DST)) == sizeof(*(SRC))); \
if (SRC) \
H5MM_memcpy(DST, SRC, (N) * sizeof(*(DST))); \
else \
HDmemset(DST, 0, (N) * sizeof(*(DST))); \
- }
+ } while (0)
#define H5VM_vector_zero(N, DST) HDmemset(DST, 0, (N) * sizeof(*(DST)))
@@ -49,7 +49,7 @@ typedef herr_t (*H5VM_opvv_func_t)(hsize_t dst_off, hsize_t src_off, size_t len,
* dimension (UNLIM_DIM) value to offset 0, sliding any intermediate values down
* one position. */
#define H5VM_swizzle_coords(TYPE, COORDS, UNLIM_DIM) \
- { \
+ do { \
/* COORDS must be an array of type TYPE */ \
HDassert(sizeof(COORDS[0]) == sizeof(TYPE)); \
\
@@ -60,14 +60,14 @@ typedef herr_t (*H5VM_opvv_func_t)(hsize_t dst_off, hsize_t src_off, size_t len,
HDmemmove(&(COORDS)[1], &(COORDS)[0], sizeof(TYPE) * (UNLIM_DIM)); \
(COORDS)[0] = _tmp; \
} /* end if */ \
- }
+ } while (0)
/* Given a coordinate offset array (COORDS) of type TYPE, move the value at
* offset 0 to offset of the unlimied dimension (UNLIM_DIM), sliding any
* intermediate values up one position. Undoes the "swizzle_coords" operation.
*/
#define H5VM_unswizzle_coords(TYPE, COORDS, UNLIM_DIM) \
- { \
+ do { \
/* COORDS must be an array of type TYPE */ \
HDassert(sizeof(COORDS[0]) == sizeof(TYPE)); \
\
@@ -78,7 +78,7 @@ typedef herr_t (*H5VM_opvv_func_t)(hsize_t dst_off, hsize_t src_off, size_t len,
HDmemmove(&(COORDS)[0], &(COORDS)[1], sizeof(TYPE) * (UNLIM_DIM)); \
(COORDS)[UNLIM_DIM] = _tmp; \
} /* end if */ \
- }
+ } while (0)
/* A null pointer is equivalent to a zero vector */
#define H5VM_ZERO NULL
diff --git a/src/H5Zscaleoffset.c b/src/H5Zscaleoffset.c
index 4f35fe3..6ef559e 100644
--- a/src/H5Zscaleoffset.c
+++ b/src/H5Zscaleoffset.c
@@ -255,7 +255,7 @@ H5Z_class2_t H5Z_SCALEOFFSET[1] = {{
/* Get the fill value for integer type */
#define H5Z_scaleoffset_get_filval_1(type, cd_values, fill_val) \
- { \
+ do { \
unsigned _i = H5Z_SCALEOFFSET_PARM_FILVAL; /* index into cd_values */ \
uint32_t _cd_value; /* Current cd_value */ \
char *_fv_p; /* Pointer to current byte in fill_val */ \
@@ -319,15 +319,16 @@ H5Z_class2_t H5Z_SCALEOFFSET[1] = {{
H5MM_memcpy(_fv_p, (char *)&_cd_value + 4 - _size_rem, _size_rem); \
} /* end if */ \
} /* end else */ \
- }
+ } while (0)
/* Get the fill value for floating-point type */
#define H5Z_scaleoffset_get_filval_2(type, cd_values, filval) \
- { \
+ do { \
if (sizeof(type) <= sizeof(long long)) \
- H5Z_scaleoffset_get_filval_1(type, cd_values, filval) else HGOTO_ERROR( \
- H5E_PLINE, H5E_BADTYPE, FAIL, "cannot find matched integer datatype") \
- }
+ H5Z_scaleoffset_get_filval_1(type, cd_values, filval); \
+ else \
+ HGOTO_ERROR(H5E_PLINE, H5E_BADTYPE, FAIL, "cannot find matched integer datatype") \
+ } while (0)
/* Find maximum and minimum values of a buffer with fill value defined for integer type */
#define H5Z_scaleoffset_max_min_1(i, d_nelmts, buf, filval, max, min) \
@@ -455,32 +456,32 @@ H5Z_class2_t H5Z_SCALEOFFSET[1] = {{
unsigned i; \
\
if (filavail == H5Z_SCALEOFFSET_FILL_DEFINED) { /* fill value defined */ \
- H5Z_scaleoffset_get_filval_1(type, cd_values, \
- filval) if (*minbits == H5Z_SO_INT_MINBITS_DEFAULT) \
- { /* minbits not set yet, calculate max, min, and minbits */ \
+ H5Z_scaleoffset_get_filval_1(type, cd_values, filval); \
+ if (*minbits == \
+ H5Z_SO_INT_MINBITS_DEFAULT) { /* minbits not set yet, calculate max, min, and minbits */ \
H5Z_scaleoffset_max_min_1(i, d_nelmts, buf, filval, max, min) \
H5Z_scaleoffset_check_1(type, max, min, minbits) span = (type)(max - min + 1); \
*minbits = H5Z__scaleoffset_log2((unsigned long long)(span + 1)); \
} \
else /* minbits already set, only calculate min */ \
- H5Z_scaleoffset_min_1( \
- i, d_nelmts, buf, filval, \
- min) if (*minbits != sizeof(type) * 8) /* change values if minbits != full precision */ \
- for (i = 0; i < d_nelmts; i++) buf[i] = \
- (type)((buf[i] == filval) ? (((type)1 << *minbits) - 1) : (buf[i] - min)); \
+ H5Z_scaleoffset_min_1(i, d_nelmts, buf, filval, min); \
+ if (*minbits != sizeof(type) * 8) /* change values if minbits != full precision */ \
+ for (i = 0; i < d_nelmts; i++) \
+ buf[i] = (type)((buf[i] == filval) ? (((type)1 << *minbits) - 1) : (buf[i] - min)); \
} \
else { /* fill value undefined */ \
if (*minbits == \
H5Z_SO_INT_MINBITS_DEFAULT) { /* minbits not set yet, calculate max, min, and minbits */ \
- H5Z_scaleoffset_max_min_2(i, d_nelmts, buf, max, min) \
- H5Z_scaleoffset_check_1(type, max, min, minbits) span = (type)(max - min + 1); \
+ H5Z_scaleoffset_max_min_2(i, d_nelmts, buf, max, min); \
+ H5Z_scaleoffset_check_1(type, max, min, minbits); \
+ span = (type)(max - min + 1); \
*minbits = H5Z__scaleoffset_log2((unsigned long long)span); \
} \
else /* minbits already set, only calculate min */ \
- H5Z_scaleoffset_min_2( \
- i, d_nelmts, buf, \
- min) if (*minbits != sizeof(type) * 8) /* change values if minbits != full precision */ \
- for (i = 0; i < d_nelmts; i++) buf[i] = (type)(buf[i] - min); \
+ H5Z_scaleoffset_min_2(i, d_nelmts, buf, min); \
+ if (*minbits != sizeof(type) * 8) /* change values if minbits != full precision */ \
+ for (i = 0; i < d_nelmts; i++) \
+ buf[i] = (type)(buf[i] - min); \
} \
*minval = min; \
} while (0)
@@ -493,20 +494,19 @@ H5Z_class2_t H5Z_SCALEOFFSET[1] = {{
unsigned i; \
\
if (filavail == H5Z_SCALEOFFSET_FILL_DEFINED) { /* fill value defined */ \
- H5Z_scaleoffset_get_filval_1(type, cd_values, \
- filval) if (*minbits == H5Z_SO_INT_MINBITS_DEFAULT) \
- { /* minbits not set yet, calculate max, min, and minbits */ \
+ H5Z_scaleoffset_get_filval_1(type, cd_values, filval); \
+ if (*minbits == \
+ H5Z_SO_INT_MINBITS_DEFAULT) { /* minbits not set yet, calculate max, min, and minbits */ \
H5Z_scaleoffset_max_min_1(i, d_nelmts, buf, filval, max, min) \
H5Z_scaleoffset_check_2(type, max, min, minbits) span = (unsigned type)(max - min + 1); \
*minbits = H5Z__scaleoffset_log2((unsigned long long)(span + 1)); \
} \
else /* minbits already set, only calculate min */ \
- H5Z_scaleoffset_min_1( \
- i, d_nelmts, buf, filval, \
- min) if (*minbits != sizeof(type) * 8) /* change values if minbits != full precision */ \
- for (i = 0; i < d_nelmts; i++) buf[i] = \
- (type)((buf[i] == filval) ? (type)(((unsigned type)1 << *minbits) - 1) \
- : (buf[i] - min)); \
+ H5Z_scaleoffset_min_1(i, d_nelmts, buf, filval, min); \
+ if (*minbits != sizeof(type) * 8) /* change values if minbits != full precision */ \
+ for (i = 0; i < d_nelmts; i++) \
+ buf[i] = (type)((buf[i] == filval) ? (type)(((unsigned type)1 << *minbits) - 1) \
+ : (buf[i] - min)); \
} \
else { /* fill value undefined */ \
if (*minbits == \
@@ -603,29 +603,29 @@ H5Z_class2_t H5Z_SCALEOFFSET[1] = {{
\
*minval = 0; \
if (filavail == H5Z_SCALEOFFSET_FILL_DEFINED) { /* fill value defined */ \
- H5Z_scaleoffset_get_filval_2(type, cd_values, filval) \
- H5Z_scaleoffset_max_min_3(i, d_nelmts, buf, filval, max, min, D_val) \
- H5Z_scaleoffset_check_3(i, type, pow_fun, round_fun, max, min, minbits, D_val) span = \
- (unsigned long long)(llround_fun(max * pow_fun((type)10, (type)D_val) - \
- min * pow_fun((type)10, (type)D_val)) + \
- 1); \
+ H5Z_scaleoffset_get_filval_2(type, cd_values, filval); \
+ H5Z_scaleoffset_max_min_3(i, d_nelmts, buf, filval, max, min, D_val); \
+ H5Z_scaleoffset_check_3(i, type, pow_fun, round_fun, max, min, minbits, D_val); \
+ span = (unsigned long long)(llround_fun(max * pow_fun((type)10, (type)D_val) - \
+ min * pow_fun((type)10, (type)D_val)) + \
+ 1); \
*minbits = H5Z__scaleoffset_log2(span + 1); \
if (*minbits != sizeof(type) * 8) /* change values if minbits != full precision */ \
H5Z_scaleoffset_modify_1(i, type, pow_fun, abs_fun, lround_fun, llround_fun, buf, d_nelmts, \
- filval, minbits, min, D_val) \
+ filval, minbits, min, D_val); \
} \
else { /* fill value undefined */ \
- H5Z_scaleoffset_max_min_2(i, d_nelmts, buf, max, min) \
- H5Z_scaleoffset_check_3(i, type, pow_fun, round_fun, max, min, minbits, D_val) span = \
- (unsigned long long)(llround_fun(max * pow_fun((type)10, (type)D_val) - \
- min * pow_fun((type)10, (type)D_val)) + \
- 1); \
+ H5Z_scaleoffset_max_min_2(i, d_nelmts, buf, max, min); \
+ H5Z_scaleoffset_check_3(i, type, pow_fun, round_fun, max, min, minbits, D_val); \
+ span = (unsigned long long)(llround_fun(max * pow_fun((type)10, (type)D_val) - \
+ min * pow_fun((type)10, (type)D_val)) + \
+ 1); \
*minbits = H5Z__scaleoffset_log2(span); \
if (*minbits != sizeof(type) * 8) /* change values if minbits != full precision */ \
H5Z_scaleoffset_modify_2(i, type, pow_fun, lround_fun, llround_fun, buf, d_nelmts, min, \
- D_val) \
+ D_val); \
} \
- H5Z_scaleoffset_save_min(i, type, minval, min) \
+ H5Z_scaleoffset_save_min(i, type, minval, min); \
} while (0)
/* Postdecompress for unsigned integer type */
@@ -635,8 +635,9 @@ H5Z_class2_t H5Z_SCALEOFFSET[1] = {{
unsigned i; \
\
if (filavail == H5Z_SCALEOFFSET_FILL_DEFINED) { /* fill value defined */ \
- H5Z_scaleoffset_get_filval_1(type, cd_values, filval) for (i = 0; i < d_nelmts; i++) buf[i] = \
- (type)((buf[i] == (((type)1 << minbits) - 1)) ? filval : (buf[i] + minval)); \
+ H5Z_scaleoffset_get_filval_1(type, cd_values, filval); \
+ for (i = 0; i < d_nelmts; i++) \
+ buf[i] = (type)((buf[i] == (((type)1 << minbits) - 1)) ? filval : (buf[i] + minval)); \
} \
else /* fill value undefined */ \
for (i = 0; i < d_nelmts; i++) \
@@ -650,9 +651,11 @@ H5Z_class2_t H5Z_SCALEOFFSET[1] = {{
unsigned i; \
\
if (filavail == H5Z_SCALEOFFSET_FILL_DEFINED) { /* fill value defined */ \
- H5Z_scaleoffset_get_filval_1(type, cd_values, filval) for (i = 0; i < d_nelmts; i++) buf[i] = \
- (type)(((unsigned type)buf[i] == (((unsigned type)1 << minbits) - 1)) ? filval \
- : (buf[i] + minval)); \
+ H5Z_scaleoffset_get_filval_1(type, cd_values, filval); \
+ for (i = 0; i < d_nelmts; i++) \
+ buf[i] = (type)(((unsigned type)buf[i] == (((unsigned type)1 << minbits) - 1)) \
+ ? filval \
+ : (buf[i] + minval)); \
} \
else /* fill value undefined */ \
for (i = 0; i < d_nelmts; i++) \
@@ -661,7 +664,7 @@ H5Z_class2_t H5Z_SCALEOFFSET[1] = {{
/* Retrieve minimum value of floating-point type */
#define H5Z_scaleoffset_get_min(type, minval, min) \
- { \
+ do { \
if (sizeof(type) <= sizeof(long long)) \
/* retrieve min value from corresponding position \
* byte-order has already been swapped as appropriate, but be sure to \
@@ -675,11 +678,11 @@ H5Z_class2_t H5Z_SCALEOFFSET[1] = {{
} /* end else */ \
else \
HGOTO_ERROR(H5E_PLINE, H5E_BADTYPE, FAIL, "cannot find matched integer datatype") \
- }
+ } while (0)
/* Modify values of data in postdecompression if fill value defined for floating-point type */
#define H5Z_scaleoffset_modify_3(i, type, pow_fun, buf, d_nelmts, filval, minbits, min, D_val) \
- { \
+ do { \
if (sizeof(type) == sizeof(int)) \
for (i = 0; i < d_nelmts; i++) \
buf[i] = \
@@ -702,11 +705,11 @@ H5Z_class2_t H5Z_SCALEOFFSET[1] = {{
min); \
else \
HGOTO_ERROR(H5E_PLINE, H5E_BADTYPE, FAIL, "cannot find matched integer datatype") \
- }
+ } while (0)
/* Modify values of data in postdecompression if fill value undefined for floating-point type */
#define H5Z_scaleoffset_modify_4(i, type, pow_fun, buf, d_nelmts, min, D_val) \
- { \
+ do { \
if (sizeof(type) == sizeof(int)) \
for (i = 0; i < d_nelmts; i++) \
buf[i] = ((type)(*(int *)((void *)&buf[i])) / pow_fun((type)10, (type)D_val) + min); \
@@ -718,7 +721,7 @@ H5Z_class2_t H5Z_SCALEOFFSET[1] = {{
buf[i] = ((type)(*(long long *)((void *)&buf[i])) / pow_fun((type)10, (type)D_val) + min); \
else \
HGOTO_ERROR(H5E_PLINE, H5E_BADTYPE, FAIL, "cannot find matched integer datatype") \
- }
+ } while (0)
/* Postdecompress for floating-point type using variable-minimum-bits method */
#define H5Z_scaleoffset_postdecompress_3(type, pow_fun, data, d_nelmts, filavail, cd_values, minbits, \
@@ -727,15 +730,14 @@ H5Z_class2_t H5Z_SCALEOFFSET[1] = {{
type *buf = (type *)data, filval = 0, min = 0; \
unsigned i; \
\
- H5Z_scaleoffset_get_min(type, minval, min) \
+ H5Z_scaleoffset_get_min(type, minval, min); \
\
- if (filavail == H5Z_SCALEOFFSET_FILL_DEFINED) \
- { /* fill value defined */ \
- H5Z_scaleoffset_get_filval_2(type, cd_values, filval) \
- H5Z_scaleoffset_modify_3(i, type, pow_fun, buf, d_nelmts, filval, minbits, min, D_val) \
+ if (filavail == H5Z_SCALEOFFSET_FILL_DEFINED) { /* fill value defined */ \
+ H5Z_scaleoffset_get_filval_2(type, cd_values, filval); \
+ H5Z_scaleoffset_modify_3(i, type, pow_fun, buf, d_nelmts, filval, minbits, min, D_val); \
} \
else /* fill value undefined */ \
- H5Z_scaleoffset_modify_4(i, type, pow_fun, buf, d_nelmts, min, D_val) \
+ H5Z_scaleoffset_modify_4(i, type, pow_fun, buf, d_nelmts, min, D_val); \
} while (0)
/*-------------------------------------------------------------------------
@@ -1538,9 +1540,10 @@ H5Z__scaleoffset_postdecompress_i(void *data, unsigned d_nelmts, enum H5Z_scaleo
unsigned i;
if (filavail == H5Z_SCALEOFFSET_FILL_DEFINED) { /* fill value defined */
- H5Z_scaleoffset_get_filval_1(signed char, cd_values, filval) for (i = 0; i < d_nelmts;
- i++) buf[i] =
- (signed char)((buf[i] == (((unsigned char)1 << minbits) - 1)) ? filval : (buf[i] + sminval));
+ H5Z_scaleoffset_get_filval_1(signed char, cd_values, filval);
+ for (i = 0; i < d_nelmts; i++)
+ buf[i] = (signed char)((buf[i] == (((unsigned char)1 << minbits) - 1)) ? filval
+ : (buf[i] + sminval));
}
else /* fill value undefined */
for (i = 0; i < d_nelmts; i++)
diff --git a/src/H5Ztrans.c b/src/H5Ztrans.c
index 39f9e9d..cd19a39 100644
--- a/src/H5Ztrans.c
+++ b/src/H5Ztrans.c
@@ -897,7 +897,7 @@ H5Z__parse_factor(H5Z_token *current, H5Z_datval_ptrs *dat_val_pointers)
ret_value = factor;
done:
- FUNC_LEAVE_NOAPI(ret_value);
+ FUNC_LEAVE_NOAPI(ret_value)
}
/*-------------------------------------------------------------------------
@@ -1396,7 +1396,7 @@ H5Z__xform_reduce_tree(H5Z_node *tree)
}
}
- FUNC_LEAVE_NOAPI_VOID;
+ FUNC_LEAVE_NOAPI_VOID
}
/*-------------------------------------------------------------------------
@@ -1429,7 +1429,7 @@ H5Z__do_op(H5Z_node *tree)
else if (tree->type == H5Z_XFORM_MINUS)
H5Z_XFORM_DO_OP6(-)
- FUNC_LEAVE_NOAPI_VOID;
+ FUNC_LEAVE_NOAPI_VOID
}
/*-------------------------------------------------------------------------
diff --git a/src/H5checksum.c b/src/H5checksum.c
index cb1f754..cd3fb4c 100644
--- a/src/H5checksum.c
+++ b/src/H5checksum.c
@@ -284,7 +284,7 @@ rotates.
*/
#define H5_lookup3_rot(x, k) (((x) << (k)) ^ ((x) >> (32 - (k))))
#define H5_lookup3_mix(a, b, c) \
- { \
+ do { \
a -= c; \
a ^= H5_lookup3_rot(c, 4); \
c += b; \
@@ -303,7 +303,7 @@ rotates.
c -= b; \
c ^= H5_lookup3_rot(b, 4); \
b += a; \
- }
+ } while (0)
/*
-------------------------------------------------------------------------------
@@ -331,7 +331,7 @@ and these came close:
-------------------------------------------------------------------------------
*/
#define H5_lookup3_final(a, b, c) \
- { \
+ do { \
c ^= b; \
c -= H5_lookup3_rot(b, 14); \
a ^= c; \
@@ -346,7 +346,7 @@ and these came close:
b -= H5_lookup3_rot(a, 14); \
c ^= b; \
c -= H5_lookup3_rot(b, 24); \
- }
+ } while (0)
/*
-------------------------------------------------------------------------------
diff --git a/src/H5encode.h b/src/H5encode.h
index 6a320f1..3ec12b6 100644
--- a/src/H5encode.h
+++ b/src/H5encode.h
@@ -27,23 +27,23 @@
*/
#define INT16ENCODE(p, i) \
- { \
+ do { \
*(p) = (uint8_t)((unsigned)(i)&0xff); \
(p)++; \
*(p) = (uint8_t)(((unsigned)(i) >> 8) & 0xff); \
(p)++; \
- }
+ } while (0)
#define UINT16ENCODE(p, i) \
- { \
+ do { \
*(p) = (uint8_t)((unsigned)(i)&0xff); \
(p)++; \
*(p) = (uint8_t)(((unsigned)(i) >> 8) & 0xff); \
(p)++; \
- }
+ } while (0)
#define INT32ENCODE(p, i) \
- { \
+ do { \
*(p) = (uint8_t)((uint32_t)(i)&0xff); \
(p)++; \
*(p) = (uint8_t)(((uint32_t)(i) >> 8) & 0xff); \
@@ -52,10 +52,10 @@
(p)++; \
*(p) = (uint8_t)(((uint32_t)(i) >> 24) & 0xff); \
(p)++; \
- }
+ } while (0)
#define UINT32ENCODE(p, i) \
- { \
+ do { \
*(p) = (uint8_t)((i)&0xff); \
(p)++; \
*(p) = (uint8_t)(((i) >> 8) & 0xff); \
@@ -64,12 +64,12 @@
(p)++; \
*(p) = (uint8_t)(((i) >> 24) & 0xff); \
(p)++; \
- }
+ } while (0)
/* Encode an unsigned integer into a variable-sized buffer */
/* (Assumes that the high bits of the integer are zero) */
#define ENCODE_VAR(p, typ, n, l) \
- { \
+ do { \
typ _n = (n); \
size_t _i; \
uint8_t *_p = (uint8_t *)(p); \
@@ -77,14 +77,14 @@
for (_i = 0; _i < l; _i++, _n >>= 8) \
*_p++ = (uint8_t)(_n & 0xff); \
(p) = (uint8_t *)(p) + l; \
- }
+ } while (0)
/* Encode a 32-bit unsigned integer into a variable-sized buffer */
/* (Assumes that the high bits of the integer are zero) */
#define UINT32ENCODE_VAR(p, n, l) ENCODE_VAR(p, uint32_t, n, l)
#define INT64ENCODE(p, n) \
- { \
+ do { \
int64_t _n = (n); \
size_t _i; \
uint8_t *_p = (uint8_t *)(p); \
@@ -94,10 +94,10 @@
for (/*void*/; _i < 8; _i++) \
*_p++ = (uint8_t)((n) < 0 ? 0xff : 0); \
(p) = (uint8_t *)(p) + 8; \
- }
+ } while (0)
#define UINT64ENCODE(p, n) \
- { \
+ do { \
uint64_t _n = (n); \
size_t _i; \
uint8_t *_p = (uint8_t *)(p); \
@@ -107,21 +107,21 @@
for (/*void*/; _i < 8; _i++) \
*_p++ = 0; \
(p) = (uint8_t *)(p) + 8; \
- }
+ } while (0)
/* Encode a 64-bit unsigned integer into a variable-sized buffer */
/* (Assumes that the high bits of the integer are zero) */
#define UINT64ENCODE_VAR(p, n, l) ENCODE_VAR(p, uint64_t, n, l)
#define H5_ENCODE_UNSIGNED(p, n) \
- { \
+ do { \
HDcompile_assert(sizeof(unsigned) == sizeof(uint32_t)); \
- UINT32ENCODE(p, n) \
- }
+ UINT32ENCODE(p, n); \
+ } while (0)
/* Assumes the endianness of uint64_t is the same as double */
#define H5_ENCODE_DOUBLE(p, n) \
- { \
+ do { \
uint64_t _n; \
size_t _u; \
uint8_t *_p = (uint8_t *)(p); \
@@ -132,7 +132,7 @@
for (_u = 0; _u < sizeof(uint64_t); _u++, _n >>= 8) \
*_p++ = (uint8_t)(_n & 0xff); \
(p) = (uint8_t *)(p) + 8; \
- }
+ } while (0)
/* DECODE converts little endian bytes pointed by p to integer values and store
* it in i. For signed values, need to do sign-extension when converting
@@ -143,23 +143,23 @@
*/
#define INT16DECODE(p, i) \
- { \
+ do { \
(i) = (int16_t)((*(p)&0xff)); \
(p)++; \
(i) |= (int16_t)(((*(p)&0xff) << 8) | ((*(p)&0x80) ? ~0xffff : 0x0)); \
(p)++; \
- }
+ } while (0)
#define UINT16DECODE(p, i) \
- { \
+ do { \
(i) = (uint16_t)(*(p)&0xff); \
(p)++; \
(i) |= (uint16_t)((*(p)&0xff) << 8); \
(p)++; \
- }
+ } while (0)
#define INT32DECODE(p, i) \
- { \
+ do { \
(i) = ((int32_t)(*(p)&0xff)); \
(p)++; \
(i) |= ((int32_t)(*(p)&0xff) << 8); \
@@ -168,10 +168,10 @@
(p)++; \
(i) |= ((int32_t)(((*(p) & (unsigned)0xff) << 24) | ((*(p)&0x80) ? ~0xffffffffULL : 0x0ULL))); \
(p)++; \
- }
+ } while (0)
#define UINT32DECODE(p, i) \
- { \
+ do { \
(i) = (uint32_t)(*(p)&0xff); \
(p)++; \
(i) |= ((uint32_t)(*(p)&0xff) << 8); \
@@ -180,12 +180,12 @@
(p)++; \
(i) |= ((uint32_t)(*(p)&0xff) << 24); \
(p)++; \
- }
+ } while (0)
/* Decode a variable-sized buffer */
/* (Assumes that the high bits of the integer will be zero) */
#define DECODE_VAR(p, n, l) \
- { \
+ do { \
size_t _i; \
\
n = 0; \
@@ -193,14 +193,14 @@
for (_i = 0; _i < l; _i++) \
n = (n << 8) | *(--p); \
(p) += l; \
- }
+ } while (0)
/* Decode a variable-sized buffer into a 32-bit unsigned integer */
/* (Assumes that the high bits of the integer will be zero) */
#define UINT32DECODE_VAR(p, n, l) DECODE_VAR(p, n, l)
#define INT64DECODE(p, n) \
- { \
+ do { \
/* WE DON'T CHECK FOR OVERFLOW! */ \
size_t _i; \
\
@@ -209,10 +209,10 @@
for (_i = 0; _i < sizeof(int64_t); _i++) \
n = (n << 8) | *(--p); \
(p) += 8; \
- }
+ } while (0)
#define UINT64DECODE(p, n) \
- { \
+ do { \
/* WE DON'T CHECK FOR OVERFLOW! */ \
size_t _i; \
\
@@ -221,21 +221,21 @@
for (_i = 0; _i < sizeof(uint64_t); _i++) \
n = (n << 8) | *(--p); \
(p) += 8; \
- }
+ } while (0)
/* Decode a variable-sized buffer into a 64-bit unsigned integer */
/* (Assumes that the high bits of the integer will be zero) */
#define UINT64DECODE_VAR(p, n, l) DECODE_VAR(p, n, l)
#define H5_DECODE_UNSIGNED(p, n) \
- { \
+ do { \
HDcompile_assert(sizeof(unsigned) == sizeof(uint32_t)); \
- UINT32DECODE(p, n) \
- }
+ UINT32DECODE(p, n); \
+ } while (0)
/* Assumes the endianness of uint64_t is the same as double */
#define H5_DECODE_DOUBLE(p, n) \
- { \
+ do { \
uint64_t _n; \
size_t _u; \
\
@@ -247,37 +247,41 @@
_n = (_n << 8) | *(--p); \
HDmemcpy(&(n), &_n, sizeof(double)); \
(p) += 8; \
- }
+ } while (0)
/* Macros to encode/decode offset/length's for storing in the file */
#define H5_ENCODE_LENGTH_LEN(p, l, s) \
- switch (s) { \
- case 4: \
- UINT32ENCODE(p, l); \
- break; \
- case 8: \
- UINT64ENCODE(p, l); \
- break; \
- case 2: \
- UINT16ENCODE(p, l); \
- break; \
- default: \
- HDassert("bad sizeof size" && 0); \
- }
+ do { \
+ switch (s) { \
+ case 4: \
+ UINT32ENCODE(p, l); \
+ break; \
+ case 8: \
+ UINT64ENCODE(p, l); \
+ break; \
+ case 2: \
+ UINT16ENCODE(p, l); \
+ break; \
+ default: \
+ HDassert("bad sizeof size" && 0); \
+ } \
+ } while (0)
#define H5_DECODE_LENGTH_LEN(p, l, s) \
- switch (s) { \
- case 4: \
- UINT32DECODE(p, l); \
- break; \
- case 8: \
- UINT64DECODE(p, l); \
- break; \
- case 2: \
- UINT16DECODE(p, l); \
- break; \
- default: \
- HDassert("bad sizeof size" && 0); \
- }
+ do { \
+ switch (s) { \
+ case 4: \
+ UINT32DECODE(p, l); \
+ break; \
+ case 8: \
+ UINT64DECODE(p, l); \
+ break; \
+ case 2: \
+ UINT16DECODE(p, l); \
+ break; \
+ default: \
+ HDassert("bad sizeof size" && 0); \
+ } \
+ } while (0)
#endif /* H5encode_H */
diff --git a/src/H5private.h b/src/H5private.h
index 0b822a7..433472b 100644
--- a/src/H5private.h
+++ b/src/H5private.h
@@ -1378,10 +1378,15 @@ H5_DLL int HDvasprintf(char **bufp, const char *fmt, va_list _ap);
* that will always generate the expected name.
*/
#define H5_CHECKED_ASSIGN(dst, dsttype, src, srctype) \
- ASSIGN_##srctype##_TO_##dsttype(dst, dsttype, src, srctype)
+ do { \
+ ASSIGN_##srctype##_TO_##dsttype(dst, dsttype, src, srctype) \
+ } while (0)
#else /* NDEBUG */
-#define H5_CHECKED_ASSIGN(dst, dsttype, src, srctype) (dst) = (dsttype)(src);
+#define H5_CHECKED_ASSIGN(dst, dsttype, src, srctype) \
+ do { \
+ (dst) = (dsttype)(src); \
+ } while (0)
#endif /* NDEBUG */
#if defined(H5_HAVE_WINDOW_PATH)