summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/flushrefresh.c10
-rw-r--r--test/tsohm.c8
2 files changed, 9 insertions, 9 deletions
diff --git a/test/flushrefresh.c b/test/flushrefresh.c
index 6454cee..745b6ef 100644
--- a/test/flushrefresh.c
+++ b/test/flushrefresh.c
@@ -66,23 +66,23 @@
static FILE *errorfile;
#define ERRFILE "flushrefresh_ERROR"
#define PROCESS_ERROR \
- { \
+ do { \
errorfile = fopen(ERRFILE, "w+"); \
fprintf(errorfile, "Error occurred in flushrefresh.\n"); \
fflush(errorfile); \
fclose(errorfile); \
TEST_ERROR; \
- }
+ } while (0)
#define CLEANUP_FILES \
- { \
+ do { \
HDremove(ERRFILE); \
HDremove(FILENAME); \
HDremove(SIGNAL_TO_SCRIPT); \
HDremove(SIGNAL_BETWEEN_PROCESSES_1); \
HDremove(SIGNAL_BETWEEN_PROCESSES_2); \
HDremove(SIGNAL_FROM_SCRIPT); \
- }
+ } while (0)
/* ===================== */
/* Function Declarations */
@@ -177,7 +177,7 @@ main(int argc, char *argv[])
else {
/* Illegal number of arguments supplied. Error. */
fprintf(stderr, "Error. %d is an Invalid number of arguments to main().\n", argc);
- PROCESS_ERROR
+ PROCESS_ERROR;
} /* end if */
return EXIT_SUCCESS;
diff --git a/test/tsohm.c b/test/tsohm.c
index 31dacd5..fd931a0 100644
--- a/test/tsohm.c
+++ b/test/tsohm.c
@@ -3266,7 +3266,7 @@ verify_dataset_extension(hid_t fcpl_id, hbool_t close_reopen)
* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
*/
#define TSOHM_VDE_VERIFY_SPACES(dims) \
- { \
+ do { \
/* Open dataspaces \
*/ \
space1_id = H5Dget_space(dset1_id); \
@@ -3300,7 +3300,7 @@ verify_dataset_extension(hid_t fcpl_id, hbool_t close_reopen)
CHECK_I(H5Sclose(space1_id), "H5Sclose"); \
CHECK_I(H5Sclose(space2_id), "H5Sclose"); \
CHECK_I(H5Sclose(space3_id), "H5Sclose"); \
- } /* define TSOHM_VDE_VERIFY_SPACES */
+ } while (0) /* define TSOHM_VDE_VERIFY_SPACES */
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
* Macro: TSOHM_VDE_CLOSE_REOPEN_FILE_AND_DSETS()
@@ -3315,7 +3315,7 @@ verify_dataset_extension(hid_t fcpl_id, hbool_t close_reopen)
* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
*/
#define TSOHM_VDE_CLOSE_REOPEN_FILE_AND_DSETS(n) \
- { \
+ do { \
CHECK_I(H5Dclose(dset1_id), "H5Dclose"); \
if ((n) > 1) \
CHECK_I(H5Dclose(dset2_id), "H5Dclose"); \
@@ -3335,7 +3335,7 @@ verify_dataset_extension(hid_t fcpl_id, hbool_t close_reopen)
dset3_id = H5Dopen2(file_id, "dataset3", H5P_DEFAULT); \
CHECK_I(dset3_id, "H5Dopen2"); \
} \
- } /* define TSOHM_VDE_CLOSE_REOPEN_FILE_AND_DSETS */
+ } while (0) /* define TSOHM_VDE_CLOSE_REOPEN_FILE_AND_DSETS */
/* Remember the current # of reported errors */
old_nerrs = GetTestNumErrs();