summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorDana Robinson <derobins@hdfgroup.org>2020-04-26 09:54:29 (GMT)
committerDana Robinson <derobins@hdfgroup.org>2020-04-26 09:54:29 (GMT)
commitde3bfa697a9fcb4fabf755b2bda7fa553abfcebb (patch)
treeac3fa249bba993c42bb5f532072d4f23f4c2197c /test
parenta8676d74d9fc50c0da4dcf4cf5646e4a8b2352ba (diff)
downloadhdf5-de3bfa697a9fcb4fabf755b2bda7fa553abfcebb.zip
hdf5-de3bfa697a9fcb4fabf755b2bda7fa553abfcebb.tar.gz
hdf5-de3bfa697a9fcb4fabf755b2bda7fa553abfcebb.tar.bz2
Updates to tools warning PR from code review.
Diffstat (limited to 'test')
-rw-r--r--test/h5test.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/test/h5test.h b/test/h5test.h
index 891697a..b1ddc58 100644
--- a/test/h5test.h
+++ b/test/h5test.h
@@ -152,7 +152,7 @@ H5TEST_DLLVAR MPI_Info h5_io_info_g; /* MPI INFO object for IO */
* HDfree(array);
*/
#define H5TEST_ALLOCATE_2D_ARRAY(ARR, TYPE, DIMS_I, DIMS_J) \
-{ \
+do { \
/* Prefix with h5taa to avoid shadow warnings */ \
size_t h5taa_pointers_size = 0; \
size_t h5taa_data_size = 0; \
@@ -167,10 +167,10 @@ H5TEST_DLLVAR MPI_Info h5_io_info_g; /* MPI INFO object for IO */
\
for (h5taa_i = 1; h5taa_i < (DIMS_I); h5taa_i++) \
ARR[h5taa_i] = ARR[h5taa_i-1] + (DIMS_J); \
-}
+} while(0)
#define H5TEST_FILL_2D_ARRAY(ARR, TYPE, DIMS_I, DIMS_J) \
-{ \
+do { \
/* Prefix with h5tfa to avoid shadow warnings */ \
int h5tfa_i = 0; \
int h5tfa_j = 0; \
@@ -181,7 +181,7 @@ H5TEST_DLLVAR MPI_Info h5_io_info_g; /* MPI INFO object for IO */
ARR[h5tfa_i][h5tfa_j] = h5tfa_count; \
h5tfa_count++; \
} \
-}
+} while(0)
#ifdef __cplusplus