summaryrefslogtreecommitdiffstats
path: root/src/H5Gnode.c
diff options
context:
space:
mode:
authorRobb Matzke <matzke@llnl.gov>1998-04-07 15:34:16 (GMT)
committerRobb Matzke <matzke@llnl.gov>1998-04-07 15:34:16 (GMT)
commit68fa66bf8130d6a6e607e233da8cc61a154bf172 (patch)
treeb5a0e0120492c7bb9f935ab74f4cef97d6bbcbee /src/H5Gnode.c
parent92571bbe1d77c74ddefeeba6ac0b2097593c058d (diff)
downloadhdf5-68fa66bf8130d6a6e607e233da8cc61a154bf172.zip
hdf5-68fa66bf8130d6a6e607e233da8cc61a154bf172.tar.gz
hdf5-68fa66bf8130d6a6e607e233da8cc61a154bf172.tar.bz2
[svn-r337] Changes since 19980403
---------------------- ./configure.in Moved setting of compiler warning switches earlier in the file. Turned on more warning switches to gcc. ./config/linux Prints a warning if the gcc version is less than 2.8.1 since that version has problems with register allocation for `long long'. ./html/Datatypes.html Documented sharing of data types between datasets. ./src/H5G.c ./src/H5Gpublic.h Implemented H5Gmove(), H5Glink() and H5Gunlink() for hard links. Still have soft links to do. ./src/H5AC.c ./src/H5ACprivate.h ./src/H5D.c ./src/H5E.c ./src/H5Eprivate.h ./src/H5F.c ./src/H5Farray.c ./src/H5Fcore.c ./src/H5Ffamily.c ./src/H5Fistore.c ./src/H5Flow.c ./src/H5Fprivate.h ./src/H5Fpublic.h ./src/H5Fsec2.c ./src/H5Fstdio.c ./src/H5G.c ./src/H5Gent.c ./src/H5Gnode.c ./src/H5Gpkg.h ./src/H5Gprivate.h ./src/H5HG.c ./src/H5HL.c ./src/H5HLprivate.h ./src/H5I.c ./src/H5Iprivate.h ./src/H5MM.c ./src/H5MMprivate.h ./src/H5O.c ./src/H5Oefl.c ./src/H5Oprivate.h ./src/H5Osdspace.c ./src/H5Oshared.c ./src/H5Ostab.c ./src/H5P.c ./src/H5S.c ./src/H5Ssimp.c ./src/H5T.c ./src/H5Tconv.c ./src/H5Tprivate.h ./src/H5Tpublic.h ./src/H5V.c ./src/H5Vprivate.h ./src/H5detect.c ./src/h5ls.c ./test/cmpd_dset.c ./test/dsets.c ./test/external.c ./test/hyperslab.c ./test/iopipe.c ./test/istore.c ./test/shtype.c ./test/tstab.c Fixed comparisons between signed and unsigned values. Fixed warnings about unused function arguments.
Diffstat (limited to 'src/H5Gnode.c')
-rw-r--r--src/H5Gnode.c31
1 files changed, 18 insertions, 13 deletions
diff --git a/src/H5Gnode.c b/src/H5Gnode.c
index e447742..5292607 100644
--- a/src/H5Gnode.c
+++ b/src/H5Gnode.c
@@ -132,7 +132,8 @@ H5G_node_sizeof_rkey(H5F_t *f, const void *udata __attribute__((unused)))
*-------------------------------------------------------------------------
*/
static herr_t
-H5G_node_decode_key(H5F_t *f, H5B_t *bt, uint8 *raw, void *_key)
+H5G_node_decode_key(H5F_t *f, H5B_t *bt __attribute__((unused)), uint8 *raw,
+ void *_key)
{
H5G_node_key_t *key = (H5G_node_key_t *) _key;
@@ -166,7 +167,8 @@ H5G_node_decode_key(H5F_t *f, H5B_t *bt, uint8 *raw, void *_key)
*-------------------------------------------------------------------------
*/
static herr_t
-H5G_node_encode_key(H5F_t *f, H5B_t *bt, uint8 *raw, void *_key)
+H5G_node_encode_key(H5F_t *f, H5B_t *bt __attribute__((unused)),
+ uint8 *raw, void *_key)
{
H5G_node_key_t *key = (H5G_node_key_t *) _key;
@@ -230,7 +232,8 @@ H5G_node_size(H5F_t *f)
*/
static herr_t
H5G_node_create(H5F_t *f, H5B_ins_t op,
- void *_lt_key, void *_udata, void *_rt_key,
+ void *_lt_key, void *_udata __attribute__((unused)),
+ void *_rt_key,
haddr_t *addr/*out*/)
{
H5G_node_key_t *lt_key = (H5G_node_key_t *) _lt_key;
@@ -254,7 +257,7 @@ H5G_node_create(H5F_t *f, H5B_ins_t op,
"unable to allocate file space");
}
sym->dirty = TRUE;
- sym->entry = H5MM_xcalloc(2 * H5G_NODE_K(f), sizeof(H5G_entry_t));
+ sym->entry = H5MM_xcalloc((intn)(2*H5G_NODE_K(f)), sizeof(H5G_entry_t));
if (H5AC_set(f, H5AC_SNODE, addr, sym) < 0) {
H5MM_xfree(sym->entry);
H5MM_xfree(sym);
@@ -403,7 +406,7 @@ H5G_node_load(H5F_t *f, const haddr_t *addr, const void *_udata1,
size = H5G_node_size(f);
p = buf = H5MM_xmalloc(size);
sym = H5MM_xcalloc(1, sizeof(H5G_node_t));
- sym->entry = H5MM_xcalloc(2 * H5G_NODE_K(f), sizeof(H5G_entry_t));
+ sym->entry = H5MM_xcalloc((intn)(2*H5G_NODE_K(f)), sizeof(H5G_entry_t));
if (H5F_block_read(f, addr, size, buf) < 0) {
HGOTO_ERROR(H5E_SYM, H5E_READERROR, NULL,
@@ -586,8 +589,9 @@ H5G_node_cmp3(H5F_t *f, void *_lt_key, void *_udata, void *_rt_key)
*-------------------------------------------------------------------------
*/
static herr_t
-H5G_node_found(H5F_t *f, const haddr_t *addr, const void *_lt_key,
- void *_udata, const void *_rt_key)
+H5G_node_found(H5F_t *f, const haddr_t *addr,
+ const void *_lt_key __attribute__((unused)),
+ void *_udata, const void *_rt_key __attribute__((unused)))
{
H5G_bt_ud1_t *bt_udata = (H5G_bt_ud1_t *) _udata;
H5G_node_t *sn = NULL;
@@ -696,9 +700,10 @@ H5G_node_found(H5F_t *f, const haddr_t *addr, const void *_lt_key,
*/
static H5B_ins_t
H5G_node_insert(H5F_t *f, const haddr_t *addr,
- void *_lt_key, hbool_t *lt_key_changed,
+ void *_lt_key __attribute__((unused)),
+ hbool_t *lt_key_changed __attribute__((unused)),
void *_md_key, void *_udata,
- void *_rt_key, hbool_t *rt_key_changed,
+ void *_rt_key, hbool_t *rt_key_changed __attribute__((unused)),
haddr_t *new_node)
{
H5G_node_key_t *md_key = (H5G_node_key_t *) _md_key;
@@ -767,7 +772,7 @@ H5G_node_insert(H5F_t *f, const haddr_t *addr,
HGOTO_ERROR(H5E_SYM, H5E_CANTINSERT, H5B_INS_ERROR,
"unable to insert symbol name into heap");
}
- if (sn->nsyms >= 2 * H5G_NODE_K(f)) {
+ if ((size_t)(sn->nsyms) >= 2*H5G_NODE_K(f)) {
/*
* The node is full. Split it into a left and right
* node and return the address of the new right node (the
@@ -800,14 +805,14 @@ H5G_node_insert(H5F_t *f, const haddr_t *addr,
md_key->offset = sn->entry[sn->nsyms - 1].name_off;
/* Where to insert the new entry? */
- if (idx <= H5G_NODE_K(f)) {
+ if (idx <= (intn)H5G_NODE_K(f)) {
insert_into = sn;
- if (idx == H5G_NODE_K(f))
+ if (idx == (intn)H5G_NODE_K(f))
md_key->offset = offset;
} else {
idx -= H5G_NODE_K(f);
insert_into = snrt;
- if (idx == H5G_NODE_K (f)) {
+ if (idx == (intn)H5G_NODE_K (f)) {
rt_key->offset = offset;
*rt_key_changed = TRUE;
}