diff options
author | Dana Robinson <43805+derobins@users.noreply.github.com> | 2023-03-20 15:03:46 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-03-20 15:03:46 (GMT) |
commit | bdde027f6dc298cfd95053c562544a62dcfbd787 (patch) | |
tree | 84ca881c7184c5a419d06e483ad0f76bebcf1bec /tools | |
parent | ae5702bf6c6bf8b7979561dc5112284dbb5b7cf8 (diff) | |
download | hdf5-bdde027f6dc298cfd95053c562544a62dcfbd787.zip hdf5-bdde027f6dc298cfd95053c562544a62dcfbd787.tar.gz hdf5-bdde027f6dc298cfd95053c562544a62dcfbd787.tar.bz2 |
Bring warning fixes from develop (#2608)
Diffstat (limited to 'tools')
-rw-r--r-- | tools/test/h5dump/h5dumpgentest.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/tools/test/h5dump/h5dumpgentest.c b/tools/test/h5dump/h5dumpgentest.c index 406ff6a..28caedb 100644 --- a/tools/test/h5dump/h5dumpgentest.c +++ b/tools/test/h5dump/h5dumpgentest.c @@ -10496,13 +10496,17 @@ gent_bitnopaquefields(void) static void gent_intsfourdims(void) { - hid_t fid, dataset, space; - hsize_t dims[F81_RANK]; - uint32_t dset1[F81_ZDIM][F81_YDIM][F81_XDIM][F81_WDIM]; + hid_t fid, dataset, space; + hsize_t dims[F81_RANK]; + struct { + uint32_t arr[F81_ZDIM][F81_YDIM][F81_XDIM][F81_WDIM]; + } * dset1; unsigned int i, j, k, l; fid = H5Fcreate(FILE81, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); + dset1 = malloc(sizeof(*dset1)); + /* Dataset of 32 bits unsigned int */ dims[0] = F81_ZDIM; dims[1] = F81_YDIM; @@ -10515,7 +10519,7 @@ gent_intsfourdims(void) for (j = 0; j < F81_YDIM; j++) for (k = 0; k < F81_XDIM; k++) for (l = 0; l < F81_WDIM; l++) - dset1[i][j][k][l] = + dset1->arr[i][j][k][l] = i * F81_YDIM * F81_XDIM * F81_WDIM + j * F81_XDIM * F81_WDIM + k * F81_WDIM + l; H5Dwrite(dataset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, dset1); @@ -10523,6 +10527,7 @@ gent_intsfourdims(void) H5Dclose(dataset); H5Fclose(fid); + free(dset1); } /*------------------------------------------------------------------------- |