diff options
author | Allen Byrne <50328838+byrnHDF@users.noreply.github.com> | 2023-08-03 18:30:34 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-08-03 18:30:34 (GMT) |
commit | 27b2d6735cbc326dbfa3f8e0a07ca7ba82ffe253 (patch) | |
tree | 1ece8273bcfba450d48d1c848ea2ec3aad017d83 /test/use_disable_mdc_flushes.c | |
parent | 7fc8531b767855e69fb4016783a1131ba581fd5b (diff) | |
download | hdf5-27b2d6735cbc326dbfa3f8e0a07ca7ba82ffe253.zip hdf5-27b2d6735cbc326dbfa3f8e0a07ca7ba82ffe253.tar.gz hdf5-27b2d6735cbc326dbfa3f8e0a07ca7ba82ffe253.tar.bz2 |
Merge Fixes the last of the -Wextra-semi-stmt warnings #3326 (#3338)
Diffstat (limited to 'test/use_disable_mdc_flushes.c')
-rw-r--r-- | test/use_disable_mdc_flushes.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/test/use_disable_mdc_flushes.c b/test/use_disable_mdc_flushes.c index d11f71c..49dfa96 100644 --- a/test/use_disable_mdc_flushes.c +++ b/test/use_disable_mdc_flushes.c @@ -35,10 +35,10 @@ static const char *progname_g = "use_disable_mdc_flushes"; /* program name */ #define UC_RANK 3 /* use case dataset rank */ #define Chunksize_DFT 256 /* chunksize default */ #define Hgoto_error(val) \ - { \ + do { \ ret_value = val; \ goto done; \ - } + } while (0) static char *filename_g; static hsize_t nplanes_g; @@ -112,14 +112,14 @@ parse_option(int argc, char *const argv[]) fprintf(stderr, "bad number of planes %s, must be a positive integer\n", optarg); usage(progname_g); Hgoto_error(-1); - }; + } break; case 's': /* use swmr file open mode */ if ((use_swmr_g = atoi(optarg)) < 0) { fprintf(stderr, "swmr value should be 0(no) or 1(yes)\n"); usage(progname_g); Hgoto_error(-1); - }; + } break; case 'y': /* Number of planes per chunk */ if ((chunkplanes_g = atoi(optarg)) <= 0) { @@ -127,14 +127,14 @@ parse_option(int argc, char *const argv[]) optarg); usage(progname_g); Hgoto_error(-1); - }; + } break; case 'z': /* size of chunk=(z,z) */ if ((chunksize_g = atoi(optarg)) <= 0) { fprintf(stderr, "bad chunksize %s, must be a positive integer\n", optarg); usage(progname_g); Hgoto_error(-1); - }; + } break; case '?': fprintf(stderr, "getopt returned '%c'.\n", c); @@ -152,7 +152,7 @@ parse_option(int argc, char *const argv[]) if ((filename_g = (char *)malloc(HDstrlen(progname_g) + 4)) == NULL) { fprintf(stderr, "malloc: failed\n"); Hgoto_error(-1); - }; + } HDstrcpy(filename_g, progname_g); HDstrcat(filename_g, ".h5"); } @@ -375,7 +375,7 @@ write_file(void) if ((buffer = (UC_CTYPE *)malloc((size_t)memdims[1] * (size_t)memdims[2] * sizeof(UC_CTYPE))) == NULL) { fprintf(stderr, "malloc: failed\n"); return -1; - }; + } /* * Get dataset rank and dimension. @@ -403,7 +403,7 @@ write_file(void) if ((m_sid = H5Screate_simple(rank, memdims, NULL)) < 0) { fprintf(stderr, "H5Screate_simple for memory failed\n"); return -1; - }; + } /* write planes */ count[0] = 1; |