Merge pull request #294 in HDFFV/hdf5 from ~DEROBINS/hdf5_der:develop to develop
* commit 'd875f7f3e65754f5618246cec47a75690a58e80c': Minor warning fixes.
This commit is contained in:
@@ -475,7 +475,7 @@ hbool_t
|
||||
H5AC_cache_is_clean(const H5F_t *f, H5AC_ring_t inner_ring)
|
||||
{
|
||||
H5C_t *cache_ptr;
|
||||
hbool_t ret_value; /* Return value */
|
||||
hbool_t ret_value = FALSE; /* Return value */
|
||||
|
||||
FUNC_ENTER_NOAPI_NOINIT_NOERR
|
||||
|
||||
|
||||
@@ -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)) {
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -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)
|
||||
;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user