diff options
author | David Young <dyoung@hdfgroup.org> | 2020-05-19 19:55:47 (GMT) |
---|---|---|
committer | David Young <dyoung@hdfgroup.org> | 2020-05-20 14:37:22 (GMT) |
commit | 7f0d3f431e14703eff629cf95e4a1b64792a1b0b (patch) | |
tree | 4d47234e15307219447ac00c86b40ba8ad9b7007 /tools | |
parent | eae6bb5efdc479ce76b9b679ac93c36623a4708a (diff) | |
download | hdf5-7f0d3f431e14703eff629cf95e4a1b64792a1b0b.zip hdf5-7f0d3f431e14703eff629cf95e4a1b64792a1b0b.tar.gz hdf5-7f0d3f431e14703eff629cf95e4a1b64792a1b0b.tar.bz2 |
Reduce diffs with `develop`.
Diffstat (limited to 'tools')
-rw-r--r-- | tools/test/h5dump/h5dumpgentest.c | 84 | ||||
-rw-r--r-- | tools/test/h5repack/h5repacktst.c | 10 | ||||
-rw-r--r-- | tools/test/perform/iopipe.c | 10 | ||||
-rw-r--r-- | tools/test/perform/perf.c | 2 |
4 files changed, 54 insertions, 52 deletions
diff --git a/tools/test/h5dump/h5dumpgentest.c b/tools/test/h5dump/h5dumpgentest.c index afda450..731e233 100644 --- a/tools/test/h5dump/h5dumpgentest.c +++ b/tools/test/h5dump/h5dumpgentest.c @@ -1572,7 +1572,7 @@ gent_many(void) dset1_t dset1[6]; hsize_t dim[4]; - herr_t H5_ATTR_SANITY_CHECK ret; + herr_t H5_ATTR_NDEBUG_UNUSED ret; fid = H5Fcreate(FILE12, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); @@ -2637,7 +2637,7 @@ static void gent_vldatatypes(void) hid_t file, dset, space, type; hsize_t dims[] = { SPACE1_DIM1 }; int i; - herr_t H5_ATTR_SANITY_CHECK ret=0; + herr_t H5_ATTR_NDEBUG_UNUSED ret=0; file = H5Fcreate(FILE21, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); @@ -2732,7 +2732,7 @@ gent_vldatatypes2(void) hid_t tid1, tid2; /* Datatype IDs */ hsize_t dims1[] = {SPACE1_DIM1}; unsigned i,j,k; /* counting variables */ - herr_t H5_ATTR_SANITY_CHECK ret; /* Generic return value */ + herr_t H5_ATTR_NDEBUG_UNUSED ret; /* Generic return value */ /* Allocate and initialize VL data to write */ for(i = 0; i < SPACE1_DIM1; i++) { @@ -2805,7 +2805,7 @@ static void gent_vldatatypes3(void) hid_t tid1, tid2; /* Datatype IDs */ hsize_t dims1[] = {SPACE1_DIM1}; unsigned i,j; /* counting variables */ - herr_t H5_ATTR_SANITY_CHECK ret; /* Generic return value */ + herr_t H5_ATTR_NDEBUG_UNUSED ret; /* Generic return value */ /* Allocate and initialize VL data to write */ for(i=0; i<SPACE1_DIM1; i++) { @@ -2874,7 +2874,7 @@ static void gent_vldatatypes4(void) hid_t tid1, tid2; /* Datatype IDs */ hsize_t dims1[] = {SPACE1_DIM1}; unsigned i,j; /* counting variables */ - herr_t H5_ATTR_SANITY_CHECK ret; /* Generic return value */ + herr_t H5_ATTR_NDEBUG_UNUSED ret; /* Generic return value */ /* Allocate and initialize VL data to write */ for(i=0; i<SPACE1_DIM1; i++) { @@ -2938,7 +2938,7 @@ static void gent_vldatatypes5(void) hid_t tid1; hsize_t dims1[] = {SPACE1_DIM1}; int i,j; /* counting variable */ - herr_t H5_ATTR_SANITY_CHECK ret; /* Generic return value */ + herr_t H5_ATTR_NDEBUG_UNUSED ret; /* Generic return value */ /* initialize data for dataset */ for(i=0; i<SPACE1_DIM1; i++) { @@ -3008,8 +3008,7 @@ static void gent_array1_big(void) hsize_t sdims1[] = {SPACE_ARRAY1BIG_DIM}; hsize_t tdims1[] = {ARRAY1BIG_DIM}; int i,j; /* counting variables */ - herr_t H5_ATTR_SANITY_CHECK ret; /* Generic return value */ - + herr_t H5_ATTR_NDEBUG_UNUSED ret; /* Generic return value */ /* for region reference dataset */ hid_t dset2; @@ -3143,7 +3142,7 @@ static void gent_array2(void) hsize_t sdims1[] = {SPACE1_DIM1}; hsize_t tdims2[] = {ARRAY2_DIM1,ARRAY2_DIM2,ARRAY2_DIM3}; int i,j,k,l; /* counting variables */ - herr_t H5_ATTR_SANITY_CHECK ret; /* Generic return value */ + herr_t H5_ATTR_NDEBUG_UNUSED ret; /* Generic return value */ /* Allocate and initialize array data to write */ for(i=0; i<SPACE1_DIM1; i++) @@ -3191,7 +3190,7 @@ static void gent_array3(void) hsize_t tdims1[] = {ARRAY1_DIM1}; hsize_t tdims2[] = {ARRAY3_DIM1,ARRAY3_DIM2}; int i,j,k,l; /* counting variables */ - herr_t H5_ATTR_SANITY_CHECK ret; /* Generic return value */ + herr_t H5_ATTR_NDEBUG_UNUSED ret; /* Generic return value */ /* Allocate and initialize array data to write */ for(i=0; i<SPACE1_DIM1; i++) @@ -3247,7 +3246,7 @@ static void gent_array4(void) hsize_t sdims1[] = {SPACE1_DIM1}; hsize_t tdims1[] = {ARRAY1_DIM1}; int i,j; /* counting variables */ - herr_t H5_ATTR_SANITY_CHECK ret; /* Generic return value */ + herr_t H5_ATTR_NDEBUG_UNUSED ret; /* Generic return value */ /* Initialize array data to write */ for(i=0; i<SPACE1_DIM1; i++) @@ -3314,7 +3313,7 @@ static void gent_array5(void) hsize_t sdims1[] = {SPACE1_DIM1}; hsize_t tdims1[] = {ARRAY1_DIM1}; int i,j,k; /* counting variables */ - herr_t H5_ATTR_SANITY_CHECK ret; /* Generic return value */ + herr_t H5_ATTR_NDEBUG_UNUSED ret; /* Generic return value */ /* Initialize array data to write */ for(i=0; i<SPACE1_DIM1; i++) @@ -3384,7 +3383,7 @@ static void gent_array6(void) hsize_t sdims1[] = {SPACE1_DIM1}; hsize_t tdims1[] = {ARRAY1_DIM1}; int i,j,k; /* counting variables */ - herr_t H5_ATTR_SANITY_CHECK ret; /* Generic return value */ + herr_t H5_ATTR_NDEBUG_UNUSED ret; /* Generic return value */ /* Initialize array data to write */ for(i=0; i<SPACE1_DIM1; i++) @@ -3445,7 +3444,7 @@ static void gent_array7(void) hsize_t sdims1[] = {SPACE1_DIM1}; hsize_t tdims1[] = {ARRAY1_DIM1}; int i,j,k,l; /* Index variables */ - herr_t H5_ATTR_SANITY_CHECK ret; /* Generic return value */ + herr_t H5_ATTR_NDEBUG_UNUSED ret; /* Generic return value */ /* Initialize array data to write */ for(i=0; i<SPACE1_DIM1; i++) @@ -3505,11 +3504,11 @@ static void gent_array7(void) /* Test the boundary of the display output buffer at the reallocation event */ static void gent_array8(void) { - hid_t file = -1; /* Handles */ - hid_t filetype = -1; /* Handles */ - hid_t space = -1; /* Handles */ - hid_t dset = -1; /* Handles */ - herr_t H5_ATTR_SANITY_CHECK status = -1; + hid_t file = H5I_INVALID_HID; /* Handles */ + hid_t filetype = H5I_INVALID_HID; /* Handles */ + hid_t space = H5I_INVALID_HID; /* Handles */ + hid_t dset = H5I_INVALID_HID; /* Handles */ + herr_t H5_ATTR_NDEBUG_UNUSED status = -1; hsize_t sdims[] = {F64_DIM0}; hsize_t tdims[] = {F64_DIM1}; int *wdata; /* Write buffer */ @@ -3576,7 +3575,7 @@ static void gent_empty(void) } empty_struct; hid_t file, dset, space, type; hsize_t dims[] = { SPACE1_DIM1 }; - herr_t H5_ATTR_SANITY_CHECK ret=0; + herr_t H5_ATTR_NDEBUG_UNUSED ret=0; file = H5Fcreate(FILE32, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); @@ -3992,7 +3991,7 @@ static void write_attr_in(hid_t loc_id, hid_t aid; hid_t sid; hid_t tid; - herr_t H5_ATTR_SANITY_CHECK status; + herr_t H5_ATTR_NDEBUG_UNUSED status; int val, i, j, k, n; float f; @@ -4433,7 +4432,7 @@ static void write_dset_in(hid_t loc_id, hid_t sid; hid_t tid; hid_t plist_id; - herr_t H5_ATTR_SANITY_CHECK status; + herr_t H5_ATTR_NDEBUG_UNUSED status; int val, i, j, k, n; float f; int fillvalue=2; @@ -4871,7 +4870,7 @@ static void gent_attr_all(void) hid_t root_id; hid_t sid; hsize_t dims[1] = {2}; - herr_t H5_ATTR_SANITY_CHECK status; + herr_t H5_ATTR_NDEBUG_UNUSED status; /* Create a file and a dataset */ fid = H5Fcreate(FILE40, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); @@ -5029,7 +5028,7 @@ static void gent_compound_complex(void) hid_t array4_tid; /* Array datatype handle */ hid_t datafile, dataset; /* Datafile/dataset handles */ hid_t dataspace; /* Dataspace handle */ - herr_t H5_ATTR_SANITY_CHECK status; /* Error checking variable */ + herr_t H5_ATTR_NDEBUG_UNUSED status; /* Error checking variable */ hsize_t dim[] = {F41_LENGTH}; /* Dataspace dimensions */ hsize_t array_dimb[] = {F41_DIMb}; /* Array dimensions */ hsize_t array_dimd[]={F41_ARRAY_DIMd1,F41_ARRAY_DIMd2}; /* Array dimensions */ @@ -5178,7 +5177,7 @@ static void gent_named_dtype_attr(void) hid_t aid; hid_t gid; int data=8; - herr_t H5_ATTR_SANITY_CHECK ret; + herr_t H5_ATTR_NDEBUG_UNUSED ret; /* Create a file */ fid=H5Fcreate(FILE42, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); @@ -5400,7 +5399,7 @@ make_external(hid_t fid) hsize_t cur_size[1]; /*data space current size */ hsize_t max_size[1]; /*data space maximum size */ hsize_t size; /*bytes reserved for data in the external file*/ - int H5_ATTR_SANITY_CHECK ret; + int H5_ATTR_NDEBUG_UNUSED ret; cur_size[0] = max_size[0] = 100; size = (max_size[0]*sizeof(int)/2); @@ -5807,8 +5806,7 @@ static void gent_fcontents(void) hid_t tid; /* datatype ID */ hsize_t dims[1]={4}; int buf[4]={1,2,3,4}; - int H5_ATTR_SANITY_CHECK ret; - + int H5_ATTR_NDEBUG_UNUSED ret; /* create a file */ fid = H5Fcreate(FILE46, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); @@ -5941,7 +5939,7 @@ static void gent_fvalues(void) hvl_t fillval3; /* vlen fill value */ hsize_t dimarray[1]={3}; /* array dimension */ int buf4[2][3]= {{1,2,3},{4,5,6}}; /* array */ - int H5_ATTR_SANITY_CHECK ret; + int H5_ATTR_NDEBUG_UNUSED ret; /* create a file */ fid = H5Fcreate(FILE48, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); @@ -6101,7 +6099,7 @@ static void gent_string(void) hsize_t dims1[] = {1}; hsize_t dims2[] = {SPACE1_DIM1}; hsize_t dims4[1]; - int H5_ATTR_SANITY_CHECK ret; + int H5_ATTR_NDEBUG_UNUSED ret; dims4[0] = sizeof(buf4); @@ -6196,7 +6194,8 @@ static void gent_aindices(void) int buf2[10][10]; int buf3[2][10][10]; int buf4[2][2][10][10]; - int i, j, k, l, n, H5_ATTR_SANITY_CHECK ret; + int i, j, k, l, n; + int H5_ATTR_NDEBUG_UNUSED ret; for(i = n = 0; i < 100; i++) buf1[i] = n++; @@ -6265,7 +6264,7 @@ static void gent_longlinks(void) { hid_t fid = (-1); /* File ID */ hid_t gid = (-1); /* Group ID */ - hid_t H5_ATTR_SANITY_CHECK gid2 = (-1); /* Datatype ID */ + hid_t H5_ATTR_NDEBUG_UNUSED gid2 = (-1); /* Datatype ID */ char *objname = NULL; /* Name of object [Long] */ size_t u; /* Local index variable */ @@ -6444,7 +6443,7 @@ gent_bigdims(void) hsize_t i; char c; size_t nelmts; - int H5_ATTR_SANITY_CHECK ret; + int H5_ATTR_NDEBUG_UNUSED ret; /* create a file */ fid = H5Fcreate(FILE56, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); @@ -6540,7 +6539,8 @@ gent_hyperslab(void) hid_t fid; /* file id */ hsize_t dims[2] = {32,4097}; /* big enough data size to force a second stripmine read */ double *buf; - int i, H5_ATTR_SANITY_CHECK ret; + int i; + int H5_ATTR_NDEBUG_UNUSED ret; buf = (double*) HDmalloc(32 * 4097 * sizeof(double) ); for(i = 0; i < 32 * 4097; i++) @@ -7166,7 +7166,8 @@ gent_dataset_idx(void) hsize_t dims[2]; hsize_t maxdims[2]; int buf[20][10]; - int i, j, H5_ATTR_SANITY_CHECK ret; + int i, j; + int H5_ATTR_NDEBUG_UNUSED ret; /* Get a copy of the file aaccess property */ fapl = H5Pcreate(H5P_FILE_ACCESS); @@ -7760,7 +7761,7 @@ static void gent_charsets(void) { hid_t fid, did, sid; - herr_t H5_ATTR_SANITY_CHECK status; + herr_t H5_ATTR_NDEBUG_UNUSED status; hsize_t dim[] = {1}; /* Dataspace dimensions */ typedef struct CharSetInfo { const char *ascii_p_; @@ -7834,7 +7835,7 @@ static void gent_compound_intsizes(void) { Array1Struct *Array1; hid_t Array1Structid; /* File datatype identifier */ - herr_t H5_ATTR_SANITY_CHECK status; /* Error checking variable */ + herr_t H5_ATTR_NDEBUG_UNUSED status; /* Error checking variable */ hsize_t dim[] = { F70_LENGTH }; /* Dataspace dimensions */ int m, n, o; /* Array init loop vars */ @@ -8107,7 +8108,7 @@ static void gent_compound_attr_intsizes(void) { Array1Struct *Array1 = NULL; hid_t Array1Structid; /* File datatype identifier */ - herr_t H5_ATTR_SANITY_CHECK status; /* Error checking variable */ + herr_t H5_ATTR_NDEBUG_UNUSED status; /* Error checking variable */ hsize_t dim[] = { F70_LENGTH }; /* Dataspace dimensions */ int m, n, o; /* Array init loop vars */ @@ -9059,7 +9060,7 @@ static void gent_compound_int_array(void) { Cmpd1Struct *Cmpd1; hid_t Cmpd1Structid; /* File datatype identifier */ - herr_t H5_ATTR_SANITY_CHECK status; /* Error checking variable */ + herr_t H5_ATTR_NDEBUG_UNUSED status; /* Error checking variable */ hsize_t dim[] = { F76_LENGTH }; /* Dataspace dimensions */ int m, n; /* Array init loop vars */ @@ -9315,7 +9316,7 @@ static void gent_compound_ints(void) { hid_t Cmpd1Structid; /* File datatype identifier */ hid_t Cmpd2Structid; /* File datatype identifier */ - herr_t H5_ATTR_SANITY_CHECK status; /* Error checking variable */ + herr_t H5_ATTR_NDEBUG_UNUSED status; /* Error checking variable */ hsize_t dim[] = { F77_LENGTH }; /* Dataspace dimensions */ int m; /* Array init loop vars */ @@ -10721,7 +10722,8 @@ static void gent_udfilter(void) hsize_t dims1[RANK] = {DIM1,DIM2}; hsize_t chunk_dims[RANK] = {CDIM1,CDIM2}; int buf1[DIM1][DIM2]; - int i, j, n, H5_ATTR_SANITY_CHECK ret; + int i, j, n; + int H5_ATTR_NDEBUG_UNUSED ret; for(i=n=0; i<DIM1; i++){ for(j=0; j<DIM2; j++){ diff --git a/tools/test/h5repack/h5repacktst.c b/tools/test/h5repack/h5repacktst.c index a39c048..ab0dbb7 100644 --- a/tools/test/h5repack/h5repacktst.c +++ b/tools/test/h5repack/h5repacktst.c @@ -3705,11 +3705,11 @@ out: static int make_userblock(void) { - hid_t fid = -1; - hid_t fcpl = -1; + hid_t fid = H5I_INVALID_HID; + hid_t fcpl = H5I_INVALID_HID; int fd = -1; /* File descriptor for writing userblock */ char ub[USERBLOCK_SIZE]; /* User block data */ - ssize_t H5_ATTR_SANITY_CHECK nwritten; /* # of bytes written */ + ssize_t H5_ATTR_NDEBUG_UNUSED nwritten; /* # of bytes written */ size_t u; /* Local index variable */ /* Create file creation property list with userblock set */ @@ -3772,7 +3772,7 @@ verify_userblock( const char* filename) int fd = -1; /* File descriptor for writing userblock */ char ub[USERBLOCK_SIZE]; /* User block data */ hsize_t ub_size = 0; /* User block size */ - ssize_t H5_ATTR_SANITY_CHECK nread; /* # of bytes read */ + ssize_t H5_ATTR_NDEBUG_UNUSED nread; /* # of bytes read */ size_t u; /* Local index variable */ /* Open file with userblock */ @@ -3839,7 +3839,7 @@ make_userblock_file(void) { int fd = -1; /* File descriptor for writing userblock */ char ub[USERBLOCK_SIZE]; /* User block data */ - ssize_t H5_ATTR_SANITY_CHECK nwritten; /* # of bytes written */ + ssize_t H5_ATTR_NDEBUG_UNUSED nwritten; /* # of bytes written */ size_t u; /* Local index variable */ /* initialize userblock data */ diff --git a/tools/test/perform/iopipe.c b/tools/test/perform/iopipe.c index 0e96cc7..bf4728d 100644 --- a/tools/test/perform/iopipe.c +++ b/tools/test/perform/iopipe.c @@ -133,7 +133,7 @@ synchronize (void) #if defined(H5_HAVE_WIN32_API) && ! defined(__CYGWIN__) _flushall(); #else - int H5_ATTR_SANITY_CHECK status; + int H5_ATTR_NDEBUG_UNUSED status; status = HDsystem("sync"); HDassert(status >= 0); @@ -168,8 +168,7 @@ main (void) static unsigned nread = NREAD_REQUESTS, nwrite = NWRITE_REQUESTS; unsigned char *the_data = NULL; - hid_t file, dset, file_space = -1; - herr_t H5_ATTR_SANITY_CHECK status; + hid_t file, dset, file_space = H5I_INVALID_HID; #ifdef H5_HAVE_GETRUSAGE struct rusage r_start, r_stop; #else @@ -178,8 +177,9 @@ main (void) struct timeval t_start, t_stop; int fd; unsigned u; - hssize_t H5_ATTR_SANITY_CHECK n; - off_t H5_ATTR_SANITY_CHECK offset; + herr_t H5_ATTR_NDEBUG_UNUSED status; + hssize_t H5_ATTR_NDEBUG_UNUSED n; + off_t H5_ATTR_NDEBUG_UNUSED offset; hsize_t start[2]; hsize_t count[2]; diff --git a/tools/test/perform/perf.c b/tools/test/perform/perf.c index fc25e1c..364836f 100644 --- a/tools/test/perform/perf.c +++ b/tools/test/perform/perf.c @@ -117,7 +117,7 @@ extern char *optarg; int main(int argc, char **argv) { - char *buf, *tmp, *buf2, *tmp2, *check; + char *buf, *tmp, *buf2 = NULL, *tmp2 = NULL, *check; int i, j, mynod=0, nprocs=1, my_correct = 1, correct, myerrno; double stim, etim; double write_tim = 0; |