diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2001-01-09 21:22:30 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2001-01-09 21:22:30 (GMT) |
commit | 35bc545296209684a5c46db0cde11beb9403a4dc (patch) | |
tree | 98b5a037ed928085b98abc1fee71fc62f81073c1 /src/H5Sselect.c | |
parent | 1290c4808d3e9890c765b1445f66b823c9026734 (diff) | |
download | hdf5-35bc545296209684a5c46db0cde11beb9403a4dc.zip hdf5-35bc545296209684a5c46db0cde11beb9403a4dc.tar.gz hdf5-35bc545296209684a5c46db0cde11beb9403a4dc.tar.bz2 |
[svn-r3252] Purpose:
Code cleanup.
Description:
Fixed _lots_ (I mean _tons_) of warnings spit out by the gcc with the
extra warnings. Including a few show-stoppers for compression on IRIX
machines.
Solution:
Changed lots of variables' types to more sensible and consistent types,
more range-checking, more variable typecasts, etc.
Platforms tested:
FreeBSD 4.2 (hawkwind), IRIX64-64 (modi4)
Diffstat (limited to 'src/H5Sselect.c')
-rw-r--r-- | src/H5Sselect.c | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/src/H5Sselect.c b/src/H5Sselect.c index c2b2fd2..b99bb53 100644 --- a/src/H5Sselect.c +++ b/src/H5Sselect.c @@ -69,7 +69,7 @@ H5S_select_copy (H5S_t *dst, const H5S_t *src) /* Need to copy order information still */ /* Copy offset information */ - if (NULL==(dst->select.offset = H5FL_ARR_ALLOC(hssize_t, src->extent.u.simple.rank,1))) { + if (NULL==(dst->select.offset = H5FL_ARR_ALLOC(hssize_t,(hsize_t)src->extent.u.simple.rank,1))) { HRETURN_ERROR (H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed"); } @@ -563,8 +563,7 @@ H5S_select_deserialize (H5S_t *space, const uint8_t *buf) ret_value=H5S_none_select_deserialize(space,buf); break; - case H5S_SEL_ERROR: - case H5S_SEL_N: + default: break; } @@ -592,7 +591,7 @@ static hssize_t H5S_get_select_hyper_nblocks(H5S_t *space) { hssize_t ret_value=FAIL; /* return value */ - intn i; /* Counter */ + uintn u; /* Counter */ FUNC_ENTER (H5S_get_select_hyper_nblocks, FAIL); @@ -604,13 +603,13 @@ H5S_get_select_hyper_nblocks(H5S_t *space) #ifdef QAK { H5S_hyper_dim_t *diminfo=space->select.sel_info.hslab.diminfo; -for(i=0; i<space->extent.u.simple.rank; i++) - printf("%s: (%d) start=%d, stride=%d, count=%d, block=%d\n",FUNC,i,(int)diminfo[i].start,(int)diminfo[i].stride,(int)diminfo[i].count,(int)diminfo[i].block); +for(u=0; u<space->extent.u.simple.rank; u++) + printf("%s: (%u) start=%d, stride=%d, count=%d, block=%d\n",FUNC,u,(int)diminfo[u].start,(int)diminfo[u].stride,(int)diminfo[u].count,(int)diminfo[u].block); } #endif /*QAK */ /* Check each dimension */ - for(ret_value=1,i=0; i<space->extent.u.simple.rank; i++) - ret_value*=space->select.sel_info.hslab.app_diminfo[i].count; + for(ret_value=1,u=0; u<space->extent.u.simple.rank; u++) + ret_value*=space->select.sel_info.hslab.app_diminfo[u].count; } /* end if */ else ret_value = (hssize_t)space->select.sel_info.hslab.hyper_lst->count; |