summaryrefslogtreecommitdiffstats
path: root/tools/h5repack/h5repacktst.c
diff options
context:
space:
mode:
authorPedro Vicente Nunes <pvn@hdfgroup.org>2007-04-03 20:44:52 (GMT)
committerPedro Vicente Nunes <pvn@hdfgroup.org>2007-04-03 20:44:52 (GMT)
commitea63d5fb19e8b260178e6f76e8ed0504ded148a3 (patch)
tree893a048c8ebb693e3d3fd1f2d8ece524629ac494 /tools/h5repack/h5repacktst.c
parent0fb88ded47762bcafdd4317a3cd48f4c706a011c (diff)
downloadhdf5-ea63d5fb19e8b260178e6f76e8ed0504ded148a3.zip
hdf5-ea63d5fb19e8b260178e6f76e8ed0504ded148a3.tar.gz
hdf5-ea63d5fb19e8b260178e6f76e8ed0504ded148a3.tar.bz2
[svn-r13582]
Bug fix Substitute a malloc call for a calloc call while allocating a reference buffer Add a test for an empty reference case Tested linux
Diffstat (limited to 'tools/h5repack/h5repacktst.c')
-rw-r--r--tools/h5repack/h5repacktst.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/tools/h5repack/h5repacktst.c b/tools/h5repack/h5repacktst.c
index 19b4103..81c0e3c 100644
--- a/tools/h5repack/h5repacktst.c
+++ b/tools/h5repack/h5repacktst.c
@@ -168,6 +168,7 @@ int main (void)
* file with fill values
*-------------------------------------------------------------------------
*/
+
TESTING(" copy of datasets (fill values)");
if (h5repack_init (&pack_options, 0)<0)
GOERROR;
@@ -183,6 +184,7 @@ int main (void)
GOERROR;
PASSED();
+
/*-------------------------------------------------------------------------
* file with all kinds of dataset datatypes
*-------------------------------------------------------------------------
@@ -2787,11 +2789,11 @@ void write_dset_in(hid_t loc_id,
/* create 1D attributes with dimension [2], 2 elements */
hsize_t dims[1]={2};
- hsize_t dims1r[1]={1};
+ hsize_t dims1r[1]={2};
char buf1[2][2]= {"ab","de"}; /* string */
char buf2[2]= {1,2}; /* bitfield, opaque */
s_t buf3[2]= {{1,2},{3,4}}; /* compound */
- hobj_ref_t buf4[1]; /* reference */
+ hobj_ref_t buf4[2]; /* reference */
e_t buf45[2]= {RED,GREEN}; /* enum */
hvl_t buf5[2]; /* vlen */
hsize_t dimarray[1]={3}; /* array dimension */
@@ -2914,6 +2916,8 @@ void write_dset_in(hid_t loc_id,
*-------------------------------------------------------------------------
*/
/* object references ( H5R_OBJECT ) */
+ buf4[0]=0;
+ buf4[1]=0;
if (dset_name)
{
status=H5Rcreate(&buf4[0],file_id,dset_name,H5R_OBJECT,-1);