summaryrefslogtreecommitdiffstats
path: root/src/H5Gnode.c
diff options
context:
space:
mode:
authorRobb Matzke <matzke@llnl.gov>1998-04-08 21:43:02 (GMT)
committerRobb Matzke <matzke@llnl.gov>1998-04-08 21:43:02 (GMT)
commitc01750fa740943c0083711b353278143c79d50a3 (patch)
treefd475b7c7a3639c05b30625b43547850d687b948 /src/H5Gnode.c
parent68fa66bf8130d6a6e607e233da8cc61a154bf172 (diff)
downloadhdf5-c01750fa740943c0083711b353278143c79d50a3.zip
hdf5-c01750fa740943c0083711b353278143c79d50a3.tar.gz
hdf5-c01750fa740943c0083711b353278143c79d50a3.tar.bz2
[svn-r338] Changes since 19980407
---------------------- ./src/H5B.c ./src/H5D.c ./src/H5Dprivate.h ./src/H5Dpublic.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/H5Fsplit.c ./src/H5Fstdio.c ./src/H5G.c ./src/H5Gent.c ./src/H5Gnode.c ./src/H5HG.c ./src/H5HL.c ./src/H5MF.c ./src/H5MFprivate.h ./src/H5O.c ./src/H5Ocont.c ./src/H5Odtype.c ./src/H5Oefl.c ./src/H5Olayout.c ./src/H5Oname.c ./src/H5Oprivate.h ./src/H5Osdspace.c ./src/H5Oshared.c ./src/H5Ostab.c ./src/H5P.c ./src/H5Ppublic.h ./src/H5S.c ./src/H5Sprivate.h ./src/H5Spublic.h ./src/H5Ssimp.c ./src/H5Tconv.c ./src/H5Tpkg.h ./src/H5V.c ./src/H5Vprivate.h ./src/H5private.h ./src/H5public.h ./src/h5ls.c ./test/cmpd_dset.c ./test/dsets.c ./test/extend.c ./test/external.c ./test/hyperslab.c ./test/iopipe.c ./test/istore.c ./test/shtype.c ./test/tfile.c ./test/th5s.c Anything having to do with the size of a dataset now uses the types `hsize_t' and `hssize_t' which must be the same size and at least as large as `size_t'. This isn't fully tested yet, so hsize_t and hssize_t are defined as size_t and ssize_t in H5public.h. Setting them to larger values will trip up gcc versions less than 2.8.1 on x86 platforms. Documented unused function formals with `__unused__' before the formal name. This also has the effect of supressing warning messages for gcc since it's defined to be `__attribute__((unused))' in the H5private.h file. ./src/debug.c ./src/h5ls.c If the file name contains a `%' then the file is opened as a file family with H5P_DEFAULT for the file member access property list. ./src/h5ls.c The group name is optional, defaulting to `/'. ./src/hdf5.h Added some missing public header files.
Diffstat (limited to 'src/H5Gnode.c')
-rw-r--r--src/H5Gnode.c44
1 files changed, 18 insertions, 26 deletions
diff --git a/src/H5Gnode.c b/src/H5Gnode.c
index 5292607..02172da 100644
--- a/src/H5Gnode.c
+++ b/src/H5Gnode.c
@@ -108,7 +108,7 @@ static intn interface_initialize_g = FALSE;
*-------------------------------------------------------------------------
*/
static size_t
-H5G_node_sizeof_rkey(H5F_t *f, const void *udata __attribute__((unused)))
+H5G_node_sizeof_rkey(H5F_t *f, const void __unused__ *udata)
{
return H5F_SIZEOF_SIZE(f); /*the name offset */
}
@@ -132,8 +132,7 @@ 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 __attribute__((unused)), uint8 *raw,
- void *_key)
+H5G_node_decode_key(H5F_t *f, H5B_t __unused__ *bt, uint8 *raw, void *_key)
{
H5G_node_key_t *key = (H5G_node_key_t *) _key;
@@ -167,8 +166,7 @@ H5G_node_decode_key(H5F_t *f, H5B_t *bt __attribute__((unused)), uint8 *raw,
*-------------------------------------------------------------------------
*/
static herr_t
-H5G_node_encode_key(H5F_t *f, H5B_t *bt __attribute__((unused)),
- uint8 *raw, void *_key)
+H5G_node_encode_key(H5F_t *f, H5B_t __unused__ *bt, uint8 *raw, void *_key)
{
H5G_node_key_t *key = (H5G_node_key_t *) _key;
@@ -231,15 +229,13 @@ H5G_node_size(H5F_t *f)
*-------------------------------------------------------------------------
*/
static herr_t
-H5G_node_create(H5F_t *f, H5B_ins_t op,
- void *_lt_key, void *_udata __attribute__((unused)),
- void *_rt_key,
- haddr_t *addr/*out*/)
+H5G_node_create(H5F_t *f, H5B_ins_t __unused__ op, void *_lt_key,
+ void __unused__ *_udata, void *_rt_key, haddr_t *addr/*out*/)
{
H5G_node_key_t *lt_key = (H5G_node_key_t *) _lt_key;
H5G_node_key_t *rt_key = (H5G_node_key_t *) _rt_key;
H5G_node_t *sym = NULL;
- size_t size = 0;
+ hsize_t size = 0;
FUNC_ENTER(H5G_node_create, FAIL);
@@ -315,9 +311,8 @@ H5G_node_flush(H5F_t *f, hbool_t destroy, const haddr_t *addr,
/*
* Look for dirty entries and set the node dirty flag.
*/
- for (i = 0; i < sym->nsyms; i++) {
- if (sym->entry[i].dirty)
- sym->dirty = TRUE;
+ for (i=0; i<sym->nsyms; i++) {
+ if (sym->entry[i].dirty) sym->dirty = TRUE;
}
/*
@@ -344,7 +339,7 @@ H5G_node_flush(H5F_t *f, hbool_t destroy, const haddr_t *addr,
H5G_ent_encode_vec(f, &p, sym->entry, sym->nsyms);
HDmemset(p, 0, size - (p - buf));
- status = H5F_block_write(f, addr, size, buf);
+ status = H5F_block_write(f, addr, (hsize_t)size, buf);
buf = H5MM_xfree(buf);
if (status < 0)
HRETURN_ERROR(H5E_SYM, H5E_WRITEERROR, FAIL,
@@ -381,8 +376,8 @@ H5G_node_flush(H5F_t *f, hbool_t destroy, const haddr_t *addr,
*-------------------------------------------------------------------------
*/
static H5G_node_t *
-H5G_node_load(H5F_t *f, const haddr_t *addr, const void *_udata1,
- void *_udata2)
+H5G_node_load(H5F_t *f, const haddr_t *addr, const void __unused__ *_udata1,
+ void __unused__ *_udata2)
{
H5G_node_t *sym = NULL;
size_t size = 0;
@@ -408,7 +403,7 @@ H5G_node_load(H5F_t *f, const haddr_t *addr, const void *_udata1,
sym = H5MM_xcalloc(1, sizeof(H5G_node_t));
sym->entry = H5MM_xcalloc((intn)(2*H5G_NODE_K(f)), sizeof(H5G_entry_t));
- if (H5F_block_read(f, addr, size, buf) < 0) {
+ if (H5F_block_read(f, addr, (hsize_t)size, buf) < 0) {
HGOTO_ERROR(H5E_SYM, H5E_READERROR, NULL,
"unabel to read symbol table node");
}
@@ -589,9 +584,8 @@ 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 __attribute__((unused)),
- void *_udata, const void *_rt_key __attribute__((unused)))
+H5G_node_found(H5F_t *f, const haddr_t *addr, const void __unused__ *_lt_key,
+ void *_udata, const void __unused__ *_rt_key)
{
H5G_bt_ud1_t *bt_udata = (H5G_bt_ud1_t *) _udata;
H5G_node_t *sn = NULL;
@@ -699,12 +693,10 @@ H5G_node_found(H5F_t *f, const haddr_t *addr,
*-------------------------------------------------------------------------
*/
static H5B_ins_t
-H5G_node_insert(H5F_t *f, const haddr_t *addr,
- 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 __attribute__((unused)),
- haddr_t *new_node)
+H5G_node_insert(H5F_t *f, const haddr_t *addr, void __unused__ *_lt_key,
+ hbool_t __unused__ *lt_key_changed, void *_md_key,
+ void *_udata, void *_rt_key,
+ hbool_t __unused__ *rt_key_changed, haddr_t *new_node)
{
H5G_node_key_t *md_key = (H5G_node_key_t *) _md_key;
H5G_node_key_t *rt_key = (H5G_node_key_t *) _rt_key;