diff options
author | kmu <kmu@hdfgroup.org> | 2020-01-27 15:01:32 (GMT) |
---|---|---|
committer | kmu <kmu@hdfgroup.org> | 2020-01-27 15:01:32 (GMT) |
commit | 5163a7e1cf75edecc2d9e198a68ef00e8c124d00 (patch) | |
tree | 899b937df8ea59b756e7aab654f11ad014f75f01 /test | |
parent | f3a4e8164f99d733e6804acddfe1b3b0dfe63634 (diff) | |
download | hdf5-5163a7e1cf75edecc2d9e198a68ef00e8c124d00.zip hdf5-5163a7e1cf75edecc2d9e198a68ef00e8c124d00.tar.gz hdf5-5163a7e1cf75edecc2d9e198a68ef00e8c124d00.tar.bz2 |
fix Wredundant-decls, Wswitch-default, Wdeclaration-after-statement, Wsign-compare, Wmisleading-indentation, Wshadow
Diffstat (limited to 'test')
-rw-r--r-- | test/use_common.c | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/test/use_common.c b/test/use_common.c index 9effa06..4111b24 100644 --- a/test/use_common.c +++ b/test/use_common.c @@ -343,44 +343,45 @@ int write_uc_file(hbool_t tosend, hid_t fid) count[1]=dims[1]; count[2]=dims[2]; for (i=0; i<UC_opts.nplanes; i++){ - /* fill buffer with value i+1 */ - bufptr = buffer; - for (j=0; j<dims[1]; j++) - for (k=0; k<dims[2]; k++) - *bufptr++ = (UC_CTYPE)i; + /* fill buffer with value i+1 */ + bufptr = buffer; + for (j=0; j<dims[1]; j++) + for (k=0; k<dims[2]; k++) + *bufptr++ = (UC_CTYPE)i; /* Cork the dataset's metadata in the cache, if SWMR is enabled */ - if(UC_opts.use_swmr) + if(UC_opts.use_swmr) { if(H5Odisable_mdc_flushes(dsid) < 0) { HDfprintf(stderr, "H5Odisable_mdc_flushes failed\n"); return -1; } + } - /* extend the dataset by one for new plane */ - dims[0]=i+1; + /* extend the dataset by one for new plane */ + dims[0]=i+1; if(H5Dset_extent(dsid, dims) < 0){ HDfprintf(stderr, "H5Dset_extent failed\n"); return -1; - } + } /* Get the dataset's dataspace */ if((f_sid = H5Dget_space(dsid)) < 0){ HDfprintf(stderr, "H5Dset_extent failed\n"); return -1; - } + } - start[0]=i; + start[0]=i; /* Choose the next plane to write */ if(H5Sselect_hyperslab(f_sid, H5S_SELECT_SET, start, NULL, count, NULL) < 0){ HDfprintf(stderr, "Failed H5Sselect_hyperslab\n"); return -1; - } + } /* Write plane to the dataset */ if(H5Dwrite(dsid, UC_DATATYPE, m_sid, f_sid, H5P_DEFAULT, buffer) < 0){ HDfprintf(stderr, "Failed H5Dwrite\n"); return -1; - } + } /* Uncork the dataset's metadata from the cache, if SWMR is enabled */ if(UC_opts.use_swmr) @@ -389,12 +390,11 @@ int write_uc_file(hbool_t tosend, hid_t fid) return -1; } - /* flush file to make the just written plane available. */ - if(H5Dflush(dsid) < 0) - { - HDfprintf(stderr, "Failed to H5Fflush file\n"); - return -1; - } + /* flush file to make the just written plane available. */ + if(H5Dflush(dsid) < 0) { + HDfprintf(stderr, "Failed to H5Fflush file\n"); + return -1; + } } /* Done writing. Free/Close all resources including data file */ |