[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.
This commit is contained in:
Albert Cheng 1998-01-30 03:35:12 -05:00
parent 69902d9278
commit fa5fd6a800

View File

@ -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));