diff options
author | Sean McBride <sean@rogue-research.com> | 2023-06-16 04:49:02 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-06-16 04:49:02 (GMT) |
commit | 68eba3da69e659fab69bbef5901ce42e82cea1dc (patch) | |
tree | f36805f798df6c04092c14dc6803d2cb82f6eff2 /src/H5FDonion_header.c | |
parent | 10093f7c4345061bdbebc12888debbf08fe85a5b (diff) | |
download | hdf5-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/H5FDonion_header.c')
-rw-r--r-- | src/H5FDonion_header.c | 16 |
1 files changed, 8 insertions, 8 deletions
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() */ |