diff options
author | Dana Robinson <derobins@hdfgroup.org> | 2017-02-09 16:53:03 (GMT) |
---|---|---|
committer | Dana Robinson <derobins@hdfgroup.org> | 2017-02-09 16:53:03 (GMT) |
commit | fc8866d41e0b585b6c6f3e2ec7fd012d543e2624 (patch) | |
tree | cfbebf28c49b5187f4adbefeb2ef8d9be3ed7ca4 /test | |
parent | 0399f55c54f862a15054712d1f976b9bfc7acec9 (diff) | |
parent | d875f7f3e65754f5618246cec47a75690a58e80c (diff) | |
download | hdf5-fc8866d41e0b585b6c6f3e2ec7fd012d543e2624.zip hdf5-fc8866d41e0b585b6c6f3e2ec7fd012d543e2624.tar.gz hdf5-fc8866d41e0b585b6c6f3e2ec7fd012d543e2624.tar.bz2 |
Merge pull request #294 in HDFFV/hdf5 from ~DEROBINS/hdf5_der:develop to develop
* commit 'd875f7f3e65754f5618246cec47a75690a58e80c':
Minor warning fixes.
Diffstat (limited to 'test')
-rw-r--r-- | test/swmr_reader.c | 6 | ||||
-rw-r--r-- | test/swmr_writer.c | 5 | ||||
-rw-r--r-- | test/use_append_chunk.c | 8 | ||||
-rw-r--r-- | test/use_append_mchunks.c | 8 | ||||
-rw-r--r-- | test/vds_swmr_writer.c | 4 |
5 files changed, 14 insertions, 17 deletions
diff --git a/test/swmr_reader.c b/test/swmr_reader.c index 0af0ece..79ac107 100644 --- a/test/swmr_reader.c +++ b/test/swmr_reader.c @@ -205,8 +205,8 @@ read_records(const char *filename, hbool_t verbose, FILE *verbose_file, hid_t fid; /* SWMR test file ID */ hid_t fapl; /* file access property list */ symbol_t record; /* The record to read from the dataset */ - unsigned read_attempts; /* The number of read attempts for metadata */ unsigned v; /* Local index variable */ + hbool_t use_log_vfd = FALSE; /* Use the log VFD (set this manually) */ HDassert(filename); HDassert(nseconds != 0); @@ -278,16 +278,14 @@ read_records(const char *filename, hbool_t verbose, FILE *verbose_file, if((fapl = h5_fileaccess()) < 0) return -1; -#ifdef QAK /* Log I/O when verbose output it enbabled */ - if(verbose) { + if(use_log_vfd) { char verbose_name[1024]; HDsnprintf(verbose_name, sizeof(verbose_name), "swmr_reader.log.%u", random_seed); H5Pset_fapl_log(fapl, verbose_name, H5FD_LOG_ALL, (size_t)(512 * 1024 * 1024)); } /* end if */ -#endif /* QAK */ /* Loop over reading records until [at least] the correct # of seconds have passed */ while(curr_time < (time_t)(start_time + (time_t)nseconds)) { diff --git a/test/swmr_writer.c b/test/swmr_writer.c index 3c2e8c6..8f6be19 100644 --- a/test/swmr_writer.c +++ b/test/swmr_writer.c @@ -78,6 +78,7 @@ open_skeleton(const char *filename, hbool_t verbose, FILE *verbose_file, hid_t fid; /* File ID for new HDF5 file */ hid_t fapl; /* File access property list */ unsigned u, v; /* Local index variable */ + hbool_t use_log_vfd = FALSE; /* Use the log VFD (set this manually) */ HDassert(filename); @@ -107,15 +108,13 @@ open_skeleton(const char *filename, hbool_t verbose, FILE *verbose_file, } #endif /* QAK */ -#ifdef QAK - if(verbose) { + if(use_log_vfd) { char verbose_name[1024]; HDsnprintf(verbose_name, sizeof(verbose_name), "swmr_writer.log.%u", random_seed); H5Pset_fapl_log(fapl, verbose_name, H5FD_LOG_ALL, (size_t)(512 * 1024 * 1024)); } /* end if */ -#endif /* QAK */ /* Open the file */ if((fid = H5Fopen(filename, H5F_ACC_RDWR | H5F_ACC_SWMR_WRITE, fapl)) < 0) diff --git a/test/use_append_chunk.c b/test/use_append_chunk.c index 1dd76c9..9e50e8b 100644 --- a/test/use_append_chunk.c +++ b/test/use_append_chunk.c @@ -91,17 +91,17 @@ int setup_parameters(int argc, char * const argv[]) return(-1); } /* set chunk dims */ - UC_opts.chunkdims[0] = UC_opts.chunkplanes; - UC_opts.chunkdims[1]=UC_opts.chunkdims[2]=UC_opts.chunksize; + UC_opts.chunkdims[0] = (hsize_t)UC_opts.chunkplanes; + UC_opts.chunkdims[1] = UC_opts.chunkdims[2] = (hsize_t)UC_opts.chunksize; /* set dataset initial and max dims */ UC_opts.dims[0] = 0; UC_opts.max_dims[0] = H5S_UNLIMITED; - UC_opts.dims[1] = UC_opts.dims[2] = UC_opts.max_dims[1]=UC_opts.max_dims[2]=UC_opts.chunksize; + UC_opts.dims[1] = UC_opts.dims[2] = UC_opts.max_dims[1] = UC_opts.max_dims[2] = (hsize_t)UC_opts.chunksize; /* set nplanes */ if (UC_opts.nplanes == 0) - UC_opts.nplanes = UC_opts.chunksize; + UC_opts.nplanes = (hsize_t)UC_opts.chunksize; /* show parameters and return */ show_parameters(); diff --git a/test/use_append_mchunks.c b/test/use_append_mchunks.c index 7728225..f9ce41b 100644 --- a/test/use_append_mchunks.c +++ b/test/use_append_mchunks.c @@ -84,17 +84,17 @@ int setup_parameters(int argc, char * const argv[]) return(-1); } /* set chunk dims */ - UC_opts.chunkdims[0] = UC_opts.chunkplanes; - UC_opts.chunkdims[1]=UC_opts.chunkdims[2]=UC_opts.chunksize; + UC_opts.chunkdims[0] = (hsize_t)UC_opts.chunkplanes; + UC_opts.chunkdims[1] = UC_opts.chunkdims[2] = (hsize_t)UC_opts.chunksize; /* set dataset initial and max dims */ UC_opts.dims[0] = 0; UC_opts.max_dims[0] = H5S_UNLIMITED; - UC_opts.dims[1] = UC_opts.dims[2] = UC_opts.max_dims[1]=UC_opts.max_dims[2]=2*UC_opts.chunksize; + UC_opts.dims[1] = UC_opts.dims[2] = UC_opts.max_dims[1] = UC_opts.max_dims[2] = 2 * (hsize_t)UC_opts.chunksize; /* set nplanes */ if (UC_opts.nplanes == 0) - UC_opts.nplanes = 2*UC_opts.chunksize; + UC_opts.nplanes = 2 * (hsize_t)UC_opts.chunksize; /* show parameters and return */ show_parameters(); diff --git a/test/vds_swmr_writer.c b/test/vds_swmr_writer.c index be7548c..abf0124 100644 --- a/test/vds_swmr_writer.c +++ b/test/vds_swmr_writer.c @@ -80,7 +80,7 @@ main(int argc, char *argv[]) /* Write planes to the dataset */ for(i = 0; i < N_PLANES_TO_WRITE; i++) { - unsigned delay; /* Time interval between plane writes */ + time_t delay; /* Time interval between plane writes */ /* Cork the dataset's metadata in the cache */ if(H5Odisable_mdc_flushes(did) < 0) @@ -118,7 +118,7 @@ main(int argc, char *argv[]) TEST_ERROR /* Wait one second between writing planes */ - delay = HDtime(0) + 1; + delay = HDtime(0) + (time_t)1; while(HDtime(0) < delay) ; |