aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortradke <tradke@4825ed28-b72c-4eae-9704-e50c059e567d>2008-01-23 14:05:04 +0000
committertradke <tradke@4825ed28-b72c-4eae-9704-e50c059e567d>2008-01-23 14:05:04 +0000
commitb6ca859282341b5f0f24cc1b09026f543a8a13a3 (patch)
tree534e7e1dd7f12cbcdeccb6c2c863d6087f0e6051
parent17e6c4b8fedcef75f55066536839e8f655532f8a (diff)
fixed function argument types used in calls to H5Sselect_hyperslab()
(they had changed after HDF5 1.6.3) git-svn-id: http://svn.cactuscode.org/arrangements/CactusPUGHIO/IOHDF5/trunk@235 4825ed28-b72c-4eae-9704-e50c059e567d
-rw-r--r--src/util/hdf5_recombiner.c16
1 files changed, 13 insertions, 3 deletions
diff --git a/src/util/hdf5_recombiner.c b/src/util/hdf5_recombiner.c
index c3c662d..eb91502 100644
--- a/src/util/hdf5_recombiner.c
+++ b/src/util/hdf5_recombiner.c
@@ -616,7 +616,12 @@ static int RecombineGroupData (const char *groupname)
hid_t unchunked_datatype, unchunked_dataspace, unchunked_dataset;
hid_t slice_dataspace;
hsize_t tmp1, ndims, chunk_ndims, *dims, *chunk_dims, *slice_dims;
+#if (H5_VERS_MAJOR == 1 && \
+ (H5_VERS_MINOR < 6 || (H5_VERS_MINOR == 6 && H5_VERS_RELEASE < 4)))
hssize_t tmp2, *chunk_origin, *slice_origin;
+#else
+ hsize_t tmp2, *chunk_origin, *slice_origin;
+#endif
void *data;
char *chunkname;
H5T_class_t class;
@@ -678,7 +683,7 @@ static int RecombineGroupData (const char *groupname)
NULL));
/* allocate buffers to read a 'chunk_origin' attribute and the chunk dims */
- chunk_origin = calloc (2 * ndims, sizeof (hssize_t));
+ chunk_origin = calloc (2 * ndims, sizeof (*chunk_origin));
chunk_dims = calloc (2 * ndims, sizeof (hsize_t));
slice_origin = chunk_origin + ndims;
slice_dims = chunk_dims + ndims;
@@ -731,7 +736,12 @@ static int RecombineGroupData (const char *groupname)
chunk_ndims = H5Sget_simple_extent_npoints (dataspace);
if (chunk_ndims == ndims)
{
+#if (H5_VERS_MAJOR == 1 && \
+ (H5_VERS_MINOR < 6 || (H5_VERS_MINOR == 6 && H5_VERS_RELEASE < 4)))
CHECK_ERROR (H5Aread (attr, H5T_NATIVE_HSSIZE, chunk_origin));
+#else
+ CHECK_ERROR (H5Aread (attr, H5T_NATIVE_HSIZE, chunk_origin));
+#endif
}
CHECK_ERROR (H5Sclose (dataspace));
CHECK_ERROR (H5Tclose (datatype));
@@ -845,7 +855,7 @@ static int RecombineGroupData (const char *groupname)
chunk_origin[ndims - 1] == 0 &&
(ndims == 1 || chunk_origin[ndims - 2] == 0))
{
- memset (slice_origin, 0, ndims * sizeof (hssize_t));
+ memset (slice_origin, 0, ndims * sizeof (*slice_origin));
memcpy (slice_dims, chunk_dims, ndims * sizeof (hsize_t));
slice_dims[ndims - 1] = dims[ndims - 1];
if (ndims > 1)
@@ -860,7 +870,7 @@ static int RecombineGroupData (const char *groupname)
if (! data)
{
fprintf (stderr, "WARNING: couldn't allocate %d bytes to recombine "
- "slice of dataset '%s' !\n", size, chunkname);
+ "slice of dataset '%s' !\n", (int) size, chunkname);
CHECK_ERROR (H5Sclose (slice_dataspace));
CHECK_ERROR (H5Sclose (chunked_dataspace));
CHECK_ERROR (H5Dclose (chunked_dataset));