diff options
author | jhendersonHDF <jhenderson@hdfgroup.org> | 2022-05-08 09:38:32 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-05-08 09:38:32 (GMT) |
commit | ea27e1380cf02e5f92d61cf9509596914c14e4df (patch) | |
tree | e753ad8ab4717fd9c1359b7a65dad274c599ca1c /test | |
parent | c0f314ad03f5ef0b4366ee625c83a7955a9ea87f (diff) | |
download | hdf5-ea27e1380cf02e5f92d61cf9509596914c14e4df.zip hdf5-ea27e1380cf02e5f92d61cf9509596914c14e4df.tar.gz hdf5-ea27e1380cf02e5f92d61cf9509596914c14e4df.tar.bz2 |
Fixes for various warnings/alignment with develop branch (#1755)
Diffstat (limited to 'test')
-rw-r--r-- | test/chunk_info.c | 17 | ||||
-rw-r--r-- | test/enc_dec_plist.c | 46 | ||||
-rw-r--r-- | test/h5test.c | 21 | ||||
-rw-r--r-- | test/objcopy.c | 4 | ||||
-rw-r--r-- | test/tvltypes.c | 14 |
5 files changed, 39 insertions, 63 deletions
diff --git a/test/chunk_info.c b/test/chunk_info.c index 76132c6..a0fdac5 100644 --- a/test/chunk_info.c +++ b/test/chunk_info.c @@ -99,7 +99,8 @@ read_each_chunk(hid_t dset_id, hsize_t offset1, hsize_t offset2, void *direct_bu /* Verify that read chunk is the same as the corresponding written one */ if (HDmemcmp(direct_buf, read_buf, CHUNK_NX * CHUNK_NY) != 0) { - HDfprintf(stderr, "Read chunk differs from written chunk at offset (%d,%d)\n", offset1, offset2); + HDfprintf(stderr, "Read chunk differs from written chunk at offset (%" PRIdHSIZE ",%" PRIdHSIZE ")\n", + offset1, offset2); return (FAIL); } @@ -1205,7 +1206,6 @@ test_chunk_info_extensible_array(char *filename, hid_t fapl) hsize_t chunk_dims[2] = {CHUNK_NX, CHUNK_NY}; /* Chunk dimensions */ hsize_t maxdims[2] = {H5S_UNLIMITED, NY}; /* One unlimited dimension */ int direct_buf[NUM_CHUNKS][CHUNK_NX][CHUNK_NY]; /* Data in chunks */ - int out_buf[NX][NY]; /* Buffer to read data in */ size_t buf_size = CHUNK_NX * CHUNK_NY * sizeof(int); /* Buffer size of a chk */ unsigned filter_mask = 0; /* Filter mask */ unsigned read_flt_msk = 0; /* Filter mask after direct read */ @@ -1450,7 +1450,6 @@ test_chunk_info_version2_btrees(char *filename, hid_t fapl) hsize_t chunk_dims[2] = {CHUNK_NX, CHUNK_NY}; /* Chunk dimensions */ hsize_t maxdims[2] = {H5S_UNLIMITED, H5S_UNLIMITED}; /* Two unlimited dims */ int direct_buf[NUM_CHUNKS][CHUNK_NX][CHUNK_NY]; /* Data in chunks */ - int out_buf[NX][NY]; /* Buffer to read data in */ size_t buf_size = CHUNK_NX * CHUNK_NY * sizeof(int); /* Buffer size of a chk */ unsigned filter_mask = 0; /* Filter mask */ unsigned read_flt_msk = 0; /* Filter mask after direct read */ @@ -1774,12 +1773,12 @@ error: static int create_4x4_dset(hid_t fapl) { - hid_t fid; /* file ID */ - hid_t did; /* dataset ID */ - hid_t f_sid; /* file space ID */ - hid_t m_sid; /* memory space ID */ - hid_t pid; /* property list ID */ - hsize_t start[2]; /* chunk location to start writing */ + hid_t fid = H5I_INVALID_HID; /* file ID */ + hid_t did = H5I_INVALID_HID; /* dataset ID */ + hid_t f_sid = H5I_INVALID_HID; /* file space ID */ + hid_t m_sid = H5I_INVALID_HID; /* memory space ID */ + hid_t pid = H5I_INVALID_HID; /* property list ID */ + hsize_t start[2]; /* chunk location to start writing */ hsize_t dims[2] = {4, 4}; hsize_t chunk_dims[2] = {2, 2}; int chunk_data[2][2] = {{1, 1}, {1, 1}}; diff --git a/test/enc_dec_plist.c b/test/enc_dec_plist.c index 5879e38..d34f500 100644 --- a/test/enc_dec_plist.c +++ b/test/enc_dec_plist.c @@ -66,31 +66,27 @@ error: int main(void) { - hid_t dcpl; /* dataset create prop. list */ - hid_t dapl; /* dataset access prop. list */ - hid_t dxpl; /* dataset xfer prop. list */ - hid_t gcpl; /* group create prop. list */ - hid_t ocpypl; /* object copy prop. list */ - hid_t ocpl; /* object create prop. list */ - hid_t lcpl; /* link create prop. list */ - hid_t lapl; /* link access prop. list */ - hid_t fapl; /* file access prop. list */ - hid_t fcpl; /* file create prop. list */ - hid_t strcpl; /* string create prop. list */ - hid_t acpl; /* attribute create prop. list */ - hid_t srcspace = -1; /* Source dataspaces */ - hid_t vspace = -1; /* Virtual dset dataspaces */ - hsize_t dims[1] = {3}; /* Data space current size */ - hsize_t chunk_size[2] = {16384, 4}; /* chunk size */ - double fill = 2.7; /* Fill value */ - hsize_t max_size[1]; /* data space maximum size */ - size_t nslots = 521 * 2; - size_t nbytes = 1048576 * 10; - double w0 = 0.5; - unsigned max_compact; - unsigned min_dense; - const char * c_to_f = "x+32"; - H5F_libver_t low, high; /* Low and high bounds */ + hid_t dcpl; /* dataset create prop. list */ + hid_t dapl; /* dataset access prop. list */ + hid_t dxpl; /* dataset xfer prop. list */ + hid_t gcpl; /* group create prop. list */ + hid_t ocpypl; /* object copy prop. list */ + hid_t ocpl; /* object create prop. list */ + hid_t lcpl; /* link create prop. list */ + hid_t lapl; /* link access prop. list */ + hid_t fapl; /* file access prop. list */ + hid_t fcpl; /* file create prop. list */ + hid_t strcpl; /* string create prop. list */ + hid_t acpl; /* attribute create prop. list */ + hsize_t chunk_size[2] = {16384, 4}; /* chunk size */ + double fill = 2.7; /* Fill value */ + hsize_t max_size[1]; /* data space maximum size */ + size_t nslots = 521 * 2; + size_t nbytes = 1048576 * 10; + double w0 = 0.5; + unsigned max_compact; + unsigned min_dense; + const char *c_to_f = "x+32"; H5AC_cache_config_t my_cache_config = {H5AC__CURR_CACHE_CONFIG_VERSION, TRUE, diff --git a/test/h5test.c b/test/h5test.c index 8d0960e..9169f29 100644 --- a/test/h5test.c +++ b/test/h5test.c @@ -539,7 +539,6 @@ h5_fixname_real(const char *base_name, hid_t fapl, const char *_suffix, char *fu hbool_t nest_printf) { const char *prefix = NULL; - const char *env = NULL; /* HDF5_DRIVER environment variable */ char * ptr, last = '\0'; const char *suffix = _suffix; size_t i, j; @@ -561,25 +560,7 @@ h5_fixname_real(const char *base_name, hid_t fapl, const char *_suffix, char *fu suffix = nest_printf ? "%%05d.h5" : "%05d.h5"; } else if (H5FD_MULTI == driver) { - - /* Get the environment variable, if it exists, in case - * we are using the split driver since both of those - * use the multi VFD under the hood. - */ - env = HDgetenv("HDF5_DRIVER"); -#ifdef HDF5_DRIVER - /* Use the environment variable, then the compile-time constant */ - if (!env) - env = HDF5_DRIVER; -#endif - if (env && !HDstrcmp(env, "split")) { - /* split VFD */ - suffix = NULL; - } - else { - /* multi VFD */ - suffix = NULL; - } + suffix = NULL; } } } diff --git a/test/objcopy.c b/test/objcopy.c index e3310ca..2743ccd 100644 --- a/test/objcopy.c +++ b/test/objcopy.c @@ -6881,8 +6881,8 @@ attach_attribute_compound_vlstr(hid_t loc_id) hid_t cmpd_tid = -1; /* Compound datatype ID */ hsize_t dim1 = 1; /* Dimension size */ typedef struct { /* Compound structure for the attribute */ - int i; - char *v; + int i; + const char *v; } s1; s1 buf; /* Buffer */ int ret_value = -1; /* Return value */ diff --git a/test/tvltypes.c b/test/tvltypes.c index 61d58cf..e70f96b 100644 --- a/test/tvltypes.c +++ b/test/tvltypes.c @@ -2487,17 +2487,17 @@ test_vltypes_fill_value(void) typedef struct dtype1_struct { unsigned int gui; unsigned int pgui; - char * str_id; - char * str_name; - char * str_desc; - char * str_orig; - char * str_stat; + const char * str_id; + const char * str_name; + const char * str_desc; + const char * str_orig; + const char * str_stat; unsigned int ver; double val; double ma; double mi; - char * str_form; - char * str_unit; + const char * str_form; + const char * str_unit; } dtype1_struct; herr_t ret; |