summaryrefslogtreecommitdiffstats
path: root/test/titerate.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/titerate.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/titerate.c')
-rw-r--r--test/titerate.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/test/titerate.c b/test/titerate.c
index 9f0b900..3004d62 100644
--- a/test/titerate.c
+++ b/test/titerate.c
@@ -584,9 +584,9 @@ test_iter_group_large(hid_t fapl)
hid_t tid; /* Datatype ID */
hsize_t dims[] = {SPACE1_DIM1};
herr_t ret; /* Generic return value */
- char gname[20]; /* Temporary group name */
- iter_info names[ITER_NGROUPS+2]; /* Names of objects in the root group */
- iter_info *curr_name; /* Pointer to the current name in the root group */
+ char gname[20]; /* Temporary group name */
+ iter_info *names; /* Names of objects in the root group */
+ iter_info *curr_name; /* Pointer to the current name in the root group */
int i;
/* Compound datatype */
@@ -596,7 +596,9 @@ test_iter_group_large(hid_t fapl)
float c;
} s1_t;
- HDmemset(names, 0, sizeof names);
+ /* Allocate & initialize array */
+ names = (iter_info *)HDcalloc(sizeof(iter_info), (ITER_NGROUPS + 2));
+ CHECK(names, NULL, "HDcalloc");
/* Output message about test being performed */
MESSAGE(5, ("Testing Large Group Iteration Functionality\n"));
@@ -686,6 +688,9 @@ test_iter_group_large(hid_t fapl)
/* Close file */
ret = H5Fclose(file);
CHECK(ret, FAIL, "H5Fclose");
+
+ /* Release memory */
+ HDfree(names);
} /* test_iterate_group_large() */
/****************************************************************