diff options
author | Dana Robinson <derobins@hdfgroup.org> | 2017-05-31 21:45:41 (GMT) |
---|---|---|
committer | Dana Robinson <derobins@hdfgroup.org> | 2017-05-31 21:45:41 (GMT) |
commit | fb5c13d59c8f17dca9bbe0e35e00920be2690af3 (patch) | |
tree | cb4e57d7263e8089c5f32cde3bd8ac631ec93d46 /test/use_common.c | |
parent | ef60bcd50e5cd3f66b7cd91a6b816a59c36922e2 (diff) | |
download | hdf5-fb5c13d59c8f17dca9bbe0e35e00920be2690af3.zip hdf5-fb5c13d59c8f17dca9bbe0e35e00920be2690af3.tar.gz hdf5-fb5c13d59c8f17dca9bbe0e35e00920be2690af3.tar.bz2 |
Merge of recent develop work to 1.10 branch:
* H5FD_FEAT_DEFAULT_VFD_COMPATIBLE VFD feature flag (HDFFV-10214)
* H5FDdriver_query() API call (HDFFV-10215)
* Fix to skip SWMR tests that when the current VFD is not compatible
with the default VFD (HDFFV-10197)
* Removed obsolete compiler versions from config/gnu-flags (HDFFV-9937)
* Many warning fixes
Diffstat (limited to 'test/use_common.c')
-rw-r--r-- | test/use_common.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/test/use_common.c b/test/use_common.c index 908cac9..5aa6692 100644 --- a/test/use_common.c +++ b/test/use_common.c @@ -48,6 +48,8 @@ parse_option(int argc, char * const argv[]) { int ret_value=0; int c; + int use_swmr; /* Need an int to detect errors */ + /* command line options: See function usage for a description */ const char *nagg_options = "f:hi:l:n:s:y:z:"; @@ -96,11 +98,13 @@ parse_option(int argc, char * const argv[]) }; break; case 's': /* use swmr file open mode */ - if ((UC_opts.use_swmr = HDatoi(optarg)) < 0) { - fprintf(stderr, "swmr value should be 0(no) or 1(yes)\n"); - usage(progname_g); - Hgoto_error(-1); - }; + use_swmr = HDatoi(optarg); + if (use_swmr != 0 && use_swmr != 1) { + HDfprintf(stderr, "swmr value should be 0(no) or 1(yes)\n"); + usage(progname_g); + Hgoto_error(-1); + } + UC_opts.use_swmr = (hbool_t)use_swmr; break; case 'y': /* Number of planes per chunk */ if ((UC_opts.chunkplanes = HDstrtoul(optarg, NULL, 0)) <= 0) { |