diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2008-05-19 04:47:38 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2008-05-19 04:47:38 (GMT) |
commit | 90b94c00fecc7f9ce603d868d4adfa5bc5a05831 (patch) | |
tree | 905c88b48827bc7c7a1cd56ccfbc5bdf6572b267 | |
parent | feab08a0eeb4ac38c38b12fc0f43a15540d22cee (diff) | |
download | hdf5-90b94c00fecc7f9ce603d868d4adfa5bc5a05831.zip hdf5-90b94c00fecc7f9ce603d868d4adfa5bc5a05831.tar.gz hdf5-90b94c00fecc7f9ce603d868d4adfa5bc5a05831.tar.bz2 |
[svn-r15035] Description:
Backport revision 15034 from trunk:
Correct another case of using 'size_t' for chunk sizes where 'uint32_t'
was necessary.
Tested on:
FreeBSD/64 6.2 (liberty) w/C++ & FORTRAN
-rw-r--r-- | src/H5Z.c | 6 | ||||
-rw-r--r-- | src/H5Znbit.c | 3 | ||||
-rw-r--r-- | test/dsets.c | 4 |
3 files changed, 7 insertions, 6 deletions
@@ -499,7 +499,7 @@ H5Z_prelude_callback(hid_t dcpl_id, hid_t type_id, H5Z_prelude_type_t prelude_ty /* Check if the chunks have filters */ if(dcpl_pline.nused > 0) { unsigned chunk_ndims; /* # of chunk dimensions */ - size_t chunk_size[H5O_LAYOUT_NDIMS]; /* Size of chunk dimensions */ + uint32_t chunk_size[H5O_LAYOUT_NDIMS]; /* Size of chunk dimensions */ hsize_t chunk_dims[H5O_LAYOUT_NDIMS]; /* Size of chunk dimensions */ H5S_t *space; /* Dataspace describing chunk */ hid_t space_id; /* ID for dataspace describing chunk */ @@ -512,8 +512,8 @@ H5Z_prelude_callback(hid_t dcpl_id, hid_t type_id, H5Z_prelude_type_t prelude_ty HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't retrieve chunk size") /* Create a data space for a chunk & set the extent */ - for(u=0; u<chunk_ndims; u++) - chunk_dims[u]=chunk_size[u]; + for(u = 0; u < chunk_ndims; u++) + chunk_dims[u] = chunk_size[u]; if(NULL == (space = H5S_create_simple(chunk_ndims,chunk_dims,NULL))) HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCREATE, FAIL, "can't create simple dataspace") diff --git a/src/H5Znbit.c b/src/H5Znbit.c index 1b9265d..2423654 100644 --- a/src/H5Znbit.c +++ b/src/H5Znbit.c @@ -439,7 +439,7 @@ H5Z_set_parms_atomic(const H5T_t *type, unsigned cd_values[]) int dtype_offset; /* Atomic datatype's offset (in bits) */ herr_t ret_value = SUCCEED; /* Return value */ - FUNC_ENTER_NOAPI(H5Z_set_parms_atomic, FAIL) + FUNC_ENTER_NOAPI_NOINIT(H5Z_set_parms_atomic) /* Set datatype class code */ cd_values[cd_values_index++] = H5Z_NBIT_ATOMIC; @@ -799,6 +799,7 @@ H5Z_set_local_nbit(hid_t dcpl_id, hid_t type_id, hid_t space_id) /* Get total number of elements in the chunk */ if((npoints = H5S_GET_EXTENT_NPOINTS(ds)) < 0) HGOTO_ERROR(H5E_PLINE, H5E_CANTGET, FAIL, "unable to get number of points in the dataspace") + HDassert(npoints); /* Initialize index for cd_values array starting from the third entry */ cd_values_index = 2; diff --git a/test/dsets.c b/test/dsets.c index 8edc2d2..d0b2098 100644 --- a/test/dsets.c +++ b/test/dsets.c @@ -2541,8 +2541,8 @@ test_nbit_int(hid_t file) { #ifdef H5_HAVE_FILTER_NBIT hid_t dataset, datatype, mem_datatype, space, dc; - const hsize_t size[2] = {2, 5}; - const hsize_t chunk_size[2] = {2,5}; + hsize_t size[2] = {2, 5}; + hsize_t chunk_size[2] = {2,5}; int orig_data[2][5]; int new_data[2][5]; unsigned int mask; |