summaryrefslogtreecommitdiffstats
path: root/src/H5Sselect.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2009-01-08 16:54:49 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2009-01-08 16:54:49 (GMT)
commit596f9b43271b088bf4f13783024f0a75ac05011c (patch)
treed1c30cb9aa9a74cda2ab95e3a94e954375398197 /src/H5Sselect.c
parentde5e1d93e44fdab49ab2d6b3bad4042219ad5236 (diff)
downloadhdf5-596f9b43271b088bf4f13783024f0a75ac05011c.zip
hdf5-596f9b43271b088bf4f13783024f0a75ac05011c.tar.gz
hdf5-596f9b43271b088bf4f13783024f0a75ac05011c.tar.bz2
[svn-r16278] Description:
Update layout information in DCPL to unify all information in one underlying property and switch to using H5O_layout_t for storing it, which simplifies things considerably. Also, fix many compiler warnings. Tested on: FreeBSD/32 6.3 (duty) in debug mode FreeBSD/64 6.3 (liberty) w/C++ & FORTRAN, in debug mode Linux/32 2.6 (jam) w/PGI compilers, w/C++ & FORTRAN, w/threadsafe, in debug mode Linux/64-amd64 2.6 (smirom) w/Intel compilers w/default API=1.6.x, w/C++ & FORTRAN, in production mode Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN, w/szip filter, in production mode Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN, in production mode Linux/64-ia64 2.4 (tg-login3) w/parallel, w/FORTRAN, in production mode Linux/64-amd64 2.6 (abe) w/parallel, w/FORTRAN, in production mode Mac OS X/32 10.5.6 (amazon) in debug mode Mac OS X/32 10.5.6 (amazon) w/C++ & FORTRAN, w/threadsafe, in production mode
Diffstat (limited to 'src/H5Sselect.c')
-rw-r--r--src/H5Sselect.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/src/H5Sselect.c b/src/H5Sselect.c
index 2a9c4dc..a419131 100644
--- a/src/H5Sselect.c
+++ b/src/H5Sselect.c
@@ -301,7 +301,7 @@ H5Sget_select_npoints(hid_t spaceid)
if(NULL == (space = (H5S_t *)H5I_object_verify(spaceid, H5I_DATASPACE)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a dataspace")
- ret_value = H5S_GET_SELECT_NPOINTS(space);
+ ret_value = (hssize_t)H5S_GET_SELECT_NPOINTS(space);
done:
FUNC_LEAVE_API(ret_value)
@@ -331,12 +331,12 @@ done:
hssize_t
H5S_get_select_npoints(const H5S_t *space)
{
- FUNC_ENTER_NOAPI_NOFUNC(H5S_get_select_npoints);
+ FUNC_ENTER_NOAPI_NOFUNC(H5S_get_select_npoints)
/* Check args */
- assert(space);
+ HDassert(space);
- FUNC_LEAVE_NOAPI(space->select.num_elem);
+ FUNC_LEAVE_NOAPI((hssize_t)space->select.num_elem)
} /* H5S_get_select_npoints() */
@@ -1174,7 +1174,7 @@ H5S_select_iterate(void *buf, hid_t type_id, const H5S_t *space, H5D_operator_t
iter_init = TRUE; /* Selection iteration info has been initialized */
/* Get the number of elements in selection */
- if((nelmts = H5S_GET_SELECT_NPOINTS(space)) < 0)
+ if((nelmts = (hssize_t)H5S_GET_SELECT_NPOINTS(space)) < 0)
HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCOUNT, FAIL, "can't get number of elements selected")
/* Get the rank of the dataspace */
@@ -1199,21 +1199,21 @@ H5S_select_iterate(void *buf, hid_t type_id, const H5S_t *space, H5D_operator_t
/* Loop, while sequences left to process */
for(curr_seq=0; curr_seq<nseq && user_ret==0; curr_seq++) {
/* Get the current offset */
- curr_off=off[curr_seq];
+ curr_off = off[curr_seq];
/* Get the number of bytes in sequence */
- curr_len=len[curr_seq];
+ curr_len = len[curr_seq];
/* Loop, while bytes left in sequence */
- while(curr_len>0 && user_ret==0) {
+ while(curr_len > 0 && user_ret == 0) {
/* Compute the coordinate from the offset */
- for(i=ndims, tmp_off=curr_off; i>=0; i--) {
- coords[i]=tmp_off%space_size[i];
- tmp_off/=space_size[i];
+ for(i = (int)ndims, tmp_off = curr_off; i >= 0; i--) {
+ coords[i] = tmp_off % space_size[i];
+ tmp_off /= space_size[i];
} /* end for */
/* Get the location within the user's buffer */
- loc=(unsigned char *)buf+curr_off;
+ loc = (unsigned char *)buf + curr_off;
/* Call user's callback routine */
user_ret=(*op)(loc,type_id,ndims,coords,operator_data);
@@ -1540,7 +1540,7 @@ H5S_select_fill(const void *fill, size_t fill_size, const H5S_t *space, void *_b
iter_init = 1; /* Selection iteration info has been initialized */
/* Get the number of elements in selection */
- if((nelmts = H5S_GET_SELECT_NPOINTS(space)) < 0)
+ if((nelmts = (hssize_t)H5S_GET_SELECT_NPOINTS(space)) < 0)
HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCOUNT, FAIL, "can't get number of elements selected")
/* Compute the number of bytes to process */