summaryrefslogtreecommitdiffstats
path: root/test/tvltypes.c
diff options
context:
space:
mode:
authorQuincey Koziol <quincey@koziol.cc>2016-09-27 17:29:16 (GMT)
committerQuincey Koziol <quincey@koziol.cc>2016-09-27 17:29:16 (GMT)
commitfa66428a6dd3e9250497618afa6402008c7ed409 (patch)
tree33d2e0c499f90fbd137607a01ae35d9058d058a3 /test/tvltypes.c
parent6d5ee49ff3a33b30b9a7baf0af4f1929ad8d3b72 (diff)
downloadhdf5-fa66428a6dd3e9250497618afa6402008c7ed409.zip
hdf5-fa66428a6dd3e9250497618afa6402008c7ed409.tar.gz
hdf5-fa66428a6dd3e9250497618afa6402008c7ed409.tar.bz2
Description:
Further warning cleanups: from 667 warnings to 503.
Diffstat (limited to 'test/tvltypes.c')
-rw-r--r--test/tvltypes.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/test/tvltypes.c b/test/tvltypes.c
index f8a6a91..d00519d 100644
--- a/test/tvltypes.c
+++ b/test/tvltypes.c
@@ -1001,8 +1001,8 @@ test_vltypes_compound_vlen_vlen(void)
float f;
hvl_t v;
} s1;
- s1 wdata[SPACE3_DIM1]; /* data to write */
- s1 rdata[SPACE3_DIM1]; /* data to read */
+ s1 *wdata; /* data to write */
+ s1 *rdata; /* data to read */
hid_t fid1; /* HDF5 File IDs */
hid_t dataset; /* Dataset ID */
hid_t sid1; /* Dataspace ID */
@@ -1016,6 +1016,10 @@ test_vltypes_compound_vlen_vlen(void)
MESSAGE(5, ("Testing Compound Datatypes with VL Atomic Datatype Component Functionality\n"));
/* Allocate and initialize VL data to write */
+ wdata = (s1 *)HDmalloc(sizeof(s1) * SPACE3_DIM1);
+ CHECK(wdata, NULL, "HDmalloc");
+ rdata = (s1 *)HDmalloc(sizeof(s1) * SPACE3_DIM1);
+ CHECK(rdata, NULL, "HDmalloc");
for(i = 0; i < SPACE3_DIM1; i++) {
wdata[i].i = (int)(i * 10);
wdata[i].f = (float)(i * 20) / 3.0F;
@@ -1147,6 +1151,10 @@ test_vltypes_compound_vlen_vlen(void)
/* Close file */
ret = H5Fclose(fid1);
CHECK(ret, FAIL, "H5Fclose");
+
+ /* Release buffers */
+ HDfree(wdata);
+ HDfree(rdata);
} /* end test_vltypes_compound_vlen_vlen() */
/****************************************************************