From fa5fd6a800c9c309add0d4c92bfb13fcfbed0e19 Mon Sep 17 00:00:00 2001 From: Albert Cheng Date: Fri, 30 Jan 1998 03:35:12 -0500 Subject: [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. --- test/cmpd_dset.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) 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)); -- cgit v0.12