summaryrefslogtreecommitdiffstats
path: root/test/cmpd_dset.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2014-07-30 20:56:40 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2014-07-30 20:56:40 (GMT)
commite8c162613b75fb3b269830defa769728f439db72 (patch)
tree7c02108c8d1012fb7e8a2b54c5503a5c2f5c019c /test/cmpd_dset.c
parentff1a9ae0e74ded0274729313ba24df578ffaf678 (diff)
downloadhdf5-e8c162613b75fb3b269830defa769728f439db72.zip
hdf5-e8c162613b75fb3b269830defa769728f439db72.tar.gz
hdf5-e8c162613b75fb3b269830defa769728f439db72.tar.bz2
[svn-r25497] Description:
Merge changes that correspond to the 64-bit ID changes (without the actual switch to 64-bit IDs) to the 1.8 release branch. (Plus a few minor cleanups and alignments with the trunk that aren't on the branch) Tested on: Mac OSX/64 10.9.4 (amazon) w/C++ & FORTRAN (h5committested on branch already for a week)
Diffstat (limited to 'test/cmpd_dset.c')
-rw-r--r--test/cmpd_dset.c34
1 files changed, 17 insertions, 17 deletions
diff --git a/test/cmpd_dset.c b/test/cmpd_dset.c
index 433c488..a782fb0 100644
--- a/test/cmpd_dset.c
+++ b/test/cmpd_dset.c
@@ -614,7 +614,7 @@ test_compound (char *filename, hid_t fapl)
if ((s8_m_sid = H5Screate_simple (2, h_size, NULL)) < 0) goto error;
/* Read the dataset */
- s8 = (s1_t *) calloc ((size_t)(h_size[0]*h_size[1]), sizeof(s1_t));
+ s8 = (s1_t *) HDcalloc ((size_t)(h_size[0]*h_size[1]), sizeof(s1_t));
assert (s8);
if (H5Dread (dataset, s1_tid, s8_m_sid, s8_f_sid, H5P_DEFAULT, s8) < 0) {
goto error;
@@ -641,7 +641,7 @@ test_compound (char *filename, hid_t fapl)
}
}
- free (s8);
+ HDfree (s8);
s8 = NULL;
PASSED();
@@ -781,7 +781,7 @@ test_compound (char *filename, hid_t fapl)
f_offset[1] = NY/3;
h_size[0] = 2*NX/3 - f_offset[0];
h_size[1] = 2*NY/3 - f_offset[1];
- s11 = (s4_t *) malloc ((size_t)h_size[0]*(size_t)h_size[1]*sizeof(s4_t));
+ s11 = (s4_t *) HDmalloc ((size_t)h_size[0]*(size_t)h_size[1]*sizeof(s4_t));
assert (s11);
/* Initialize */
@@ -793,7 +793,7 @@ test_compound (char *filename, hid_t fapl)
if (H5Dwrite (dataset, s4_tid, s8_m_sid, s8_f_sid, PRESERVE, s11) < 0) {
goto error;
}
- free (s11);
+ HDfree (s11);
s11=NULL;
/* Read the whole thing */
@@ -1380,12 +1380,12 @@ test_hdf5_src_subset(char *filename, hid_t fapl)
goto error;
/* Allocate space and initialize data */
- orig = (unsigned char*)malloc(NX * NY * sizeof(stype1));
+ orig = (unsigned char*)HDmalloc(NX * NY * sizeof(stype1));
initialize_stype1(orig, (size_t)NX*NY);
- rbuf = (unsigned char*)malloc(NX * NY * sizeof(stype2));
+ rbuf = (unsigned char*)HDmalloc(NX * NY * sizeof(stype2));
- rew_buf = (unsigned char*)malloc(NX * NY * sizeof(stype3));
+ rew_buf = (unsigned char*)HDmalloc(NX * NY * sizeof(stype3));
initialize_stype3(rew_buf, (size_t)NX*NY);
@@ -1515,9 +1515,9 @@ test_hdf5_src_subset(char *filename, hid_t fapl)
if(H5Fclose(file) < 0)
FAIL_STACK_ERROR
- free(orig);
- free(rbuf);
- free(rew_buf);
+ HDfree(orig);
+ HDfree(rbuf);
+ HDfree(rew_buf);
PASSED();
return 0;
@@ -1585,12 +1585,12 @@ test_hdf5_dst_subset(char *filename, hid_t fapl)
goto error;
/* Allocate space and initialize data */
- orig = (unsigned char*)malloc(NX * NY * sizeof(stype2));
+ orig = (unsigned char*)HDmalloc(NX * NY * sizeof(stype2));
initialize_stype2(orig, (size_t)NX*NY);
- rbuf = (unsigned char*)malloc(NX * NY * sizeof(stype1));
+ rbuf = (unsigned char*)HDmalloc(NX * NY * sizeof(stype1));
- rew_buf = (unsigned char*)malloc(NX * NY * sizeof(stype4));
+ rew_buf = (unsigned char*)HDmalloc(NX * NY * sizeof(stype4));
initialize_stype4(rew_buf, (size_t)NX*NY);
/* Create dataset creation property list */
@@ -1719,9 +1719,9 @@ test_hdf5_dst_subset(char *filename, hid_t fapl)
if(H5Fclose(file) < 0)
goto error;
- free(orig);
- free(rbuf);
- free(rew_buf);
+ HDfree(orig);
+ HDfree(rbuf);
+ HDfree(rew_buf);
PASSED();
return 0;
@@ -2183,7 +2183,7 @@ main (int argc, char *argv[])
fprintf(stderr, "usage: %s [--noopt]\n", argv[0]);
exit(1);
}
- H5Tunregister(H5T_PERS_DONTCARE, NULL, -1, -1, H5T__conv_struct_opt);
+ H5Tunregister(H5T_PERS_DONTCARE, NULL, (hid_t)-1, (hid_t)-1, H5T__conv_struct_opt);
}
/* Create the file */