summaryrefslogtreecommitdiffstats
path: root/src/H5Tconv.c
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/H5Tconv.c
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/H5Tconv.c')
-rw-r--r--src/H5Tconv.c4
1 files changed, 2 insertions, 2 deletions
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