summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorAlbert Cheng <acheng@hdfgroup.org>1998-01-30 08:35:12 (GMT)
committerAlbert Cheng <acheng@hdfgroup.org>1998-01-30 08:35:12 (GMT)
commitfa5fd6a800c9c309add0d4c92bfb13fcfbed0e19 (patch)
tree5356ebdca66a267f236e41747757fc9238d57616 /test
parent69902d92781798acc58583f579afc4253e2ec243 (diff)
downloadhdf5-fa5fd6a800c9c309add0d4c92bfb13fcfbed0e19.zip
hdf5-fa5fd6a800c9c309add0d4c92bfb13fcfbed0e19.tar.gz
hdf5-fa5fd6a800c9c309add0d4c92bfb13fcfbed0e19.tar.bz2
[svn-r200] Purpose: bug fix.
Problem: Step 8 failed because H5Pcreate_simple expects size_t dimension array but the code used an int array. (In IRIX64 -64 mode, size_t is a 64bit unsigned long but ints are only 32 bits long.) casting it to size_t* just avoided warning message but did not change the data type. Solution: Throw in a kludge by using a temporary dimension array of size_t. Can't change the type of h_size since it is also used for the hyperslab routine which expects an int dimension array. The Hyperslab routine will be changed. Put in a patch for now.
Diffstat (limited to 'test')
-rw-r--r--test/cmpd_dset.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/test/cmpd_dset.c b/test/cmpd_dset.c
index f504f66..25742f6 100644
--- a/test/cmpd_dset.c
+++ b/test/cmpd_dset.c
@@ -395,8 +395,15 @@ STEP 8: Read middle third hyperslab into memory array.\n");
assert (status>=0);
/* Create memory data space */
- s8_m_sid = H5Pcreate_simple (2, (size_t *)h_size);
+ { /* H5Pcreate_simple expects dimsize be size_t type. */
+ /* Use a temporary array. A kludge--need to fix hyperslab */
+ /* argument types later. */
+ size_t tdim[2];
+ tdim[0] = h_size[0];
+ tdim[1] = h_size[1];
+ s8_m_sid = H5Pcreate_simple (2, tdim);
assert (s8_m_sid>=0);
+ }
/* Read the dataset */
s8 = calloc (h_size[0]*h_size[1], sizeof(s1_t));