summaryrefslogtreecommitdiffstats
path: root/test/chunk_info.c
diff options
context:
space:
mode:
authorjhendersonHDF <jhenderson@hdfgroup.org>2022-05-08 09:38:32 (GMT)
committerGitHub <noreply@github.com>2022-05-08 09:38:32 (GMT)
commitea27e1380cf02e5f92d61cf9509596914c14e4df (patch)
treee753ad8ab4717fd9c1359b7a65dad274c599ca1c /test/chunk_info.c
parentc0f314ad03f5ef0b4366ee625c83a7955a9ea87f (diff)
downloadhdf5-ea27e1380cf02e5f92d61cf9509596914c14e4df.zip
hdf5-ea27e1380cf02e5f92d61cf9509596914c14e4df.tar.gz
hdf5-ea27e1380cf02e5f92d61cf9509596914c14e4df.tar.bz2
Fixes for various warnings/alignment with develop branch (#1755)
Diffstat (limited to 'test/chunk_info.c')
-rw-r--r--test/chunk_info.c17
1 files changed, 8 insertions, 9 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}};