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/H5AC.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/H5AC.c')
-rw-r--r-- | src/H5AC.c | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -100,13 +100,13 @@ H5AC_create(H5F_t *f, intn size_hint) "memory allocation failed"); } cache->nslots = size_hint; - cache->slot = H5FL_ARR_ALLOC(H5AC_info_ptr_t,cache->nslots,1); + cache->slot = H5FL_ARR_ALLOC(H5AC_info_ptr_t,(hsize_t)cache->nslots,1); if (NULL==cache->slot) { f->shared->cache = H5FL_FREE (H5AC_t,f->shared->cache); HRETURN_ERROR (H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed"); } #ifdef H5AC_DEBUG - if ((cache->prot = H5FL_ARR_ALLOC(H5AC_prot_t,cache->nslots,1))==NULL) { + if ((cache->prot = H5FL_ARR_ALLOC(H5AC_prot_t,(hsize_t)cache->nslots,1))==NULL) { cache->slot = H5FL_ARR_FREE (H5AC_info_ptr_t,cache->slot); f->shared->cache = H5FL_FREE (H5AC_t,f->shared->cache); HRETURN_ERROR (H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed"); @@ -414,10 +414,10 @@ H5AC_flush(H5F_t *f, const H5AC_class_t *type, haddr_t addr, hbool_t destroy) * Sort the cache entries by address since flushing them in * ascending order by address may be much more efficient. */ - if (NULL==(map=H5FL_ARR_ALLOC(intn,cache->nslots,0))) { - HRETURN_ERROR (H5E_RESOURCE, H5E_NOSPACE, FAIL, + if (NULL==(map=H5FL_ARR_ALLOC(intn,(hsize_t)cache->nslots,0))) { + HRETURN_ERROR (H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed"); - } + } for (i = nslots = 0; i < cache->nslots; i++) { if (cache->slot[i]!=NULL) map[nslots++] = i; |