summaryrefslogtreecommitdiffstats
path: root/src/H5Gnode.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2001-01-09 21:22:30 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2001-01-09 21:22:30 (GMT)
commit35bc545296209684a5c46db0cde11beb9403a4dc (patch)
tree98b5a037ed928085b98abc1fee71fc62f81073c1 /src/H5Gnode.c
parent1290c4808d3e9890c765b1445f66b823c9026734 (diff)
downloadhdf5-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/H5Gnode.c')
-rw-r--r--src/H5Gnode.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/H5Gnode.c b/src/H5Gnode.c
index bf9f959..eaf3115 100644
--- a/src/H5Gnode.c
+++ b/src/H5Gnode.c
@@ -272,7 +272,7 @@ H5G_node_create(H5F_t *f, H5B_ins_t UNUSED op, void *_lt_key,
"unable to allocate file space");
}
sym->dirty = TRUE;
- sym->entry = H5FL_ARR_ALLOC(H5G_entry_t,2*H5G_NODE_K(f),1);
+ sym->entry = H5FL_ARR_ALLOC(H5G_entry_t,(hsize_t)(2*H5G_NODE_K(f)),1);
if (NULL==sym->entry) {
H5FL_FREE(H5G_node_t,sym);
HRETURN_ERROR (H5E_RESOURCE, H5E_NOSPACE, FAIL,
@@ -347,7 +347,7 @@ H5G_node_flush(H5F_t *f, hbool_t destroy, haddr_t addr, H5G_node_t *sym)
size = H5G_node_size(f);
/* Allocate temporary buffer */
- if ((buf=H5FL_BLK_ALLOC(symbol_node,size, 0))==NULL)
+ if ((buf=H5FL_BLK_ALLOC(symbol_node,(hsize_t)size, 0))==NULL)
HRETURN_ERROR (H5E_RESOURCE, H5E_NOSPACE, FAIL,
"memory allocation failed");
p=buf;
@@ -415,7 +415,7 @@ H5G_node_load(H5F_t *f, haddr_t addr, const void UNUSED *_udata1,
void UNUSED *_udata2)
{
H5G_node_t *sym = NULL;
- size_t size = 0;
+ hsize_t size = 0;
uint8_t *buf = NULL;
const uint8_t *p = NULL;
H5G_node_t *ret_value = NULL; /*for error handling */
@@ -439,11 +439,11 @@ H5G_node_load(H5F_t *f, haddr_t addr, const void UNUSED *_udata1,
"memory allocation failed for symbol table node");
p=buf;
if (NULL==(sym = H5FL_ALLOC(H5G_node_t,1)) ||
- NULL==(sym->entry=H5FL_ARR_ALLOC(H5G_entry_t,2*H5G_NODE_K(f),1))) {
+ NULL==(sym->entry=H5FL_ARR_ALLOC(H5G_entry_t,(hsize_t)(2*H5G_NODE_K(f)),1))) {
HGOTO_ERROR (H5E_RESOURCE, H5E_NOSPACE, NULL,
"memory allocation failed");
}
- if (H5F_block_read(f, H5FD_MEM_BTREE, addr, (hsize_t)size, H5P_DEFAULT, buf) < 0) {
+ if (H5F_block_read(f, H5FD_MEM_BTREE, addr, size, H5P_DEFAULT, buf) < 0) {
HGOTO_ERROR(H5E_SYM, H5E_READERROR, NULL,
"unabel to read symbol table node");
}
@@ -989,7 +989,7 @@ H5G_node_remove(H5F_t *f, haddr_t addr, void *_lt_key/*in,out*/,
sn->dirty = TRUE;
if (H5AC_unprotect(f, H5AC_SNODE, addr, sn)<0 ||
H5AC_flush(f, H5AC_SNODE, addr, TRUE)<0 ||
- H5MF_xfree(f, H5FD_MEM_BTREE, addr, H5G_node_size(f))<0) {
+ H5MF_xfree(f, H5FD_MEM_BTREE, addr, (hsize_t)H5G_node_size(f))<0) {
sn = NULL;
HGOTO_ERROR(H5E_SYM, H5E_PROTECT, H5B_INS_ERROR,
"unable to free symbol table node");