summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/H5.c8
-rw-r--r--src/H5A.c9
-rw-r--r--src/H5AC.c4
-rw-r--r--src/H5B.c7
-rw-r--r--src/H5D.c16
-rw-r--r--src/H5Distore.c46
-rw-r--r--src/H5E.c47
-rw-r--r--src/H5F.c15
-rw-r--r--src/H5FD.c10
-rw-r--r--src/H5FDcore.c24
-rw-r--r--src/H5FDfamily.c32
-rw-r--r--src/H5FDgass.c37
-rw-r--r--src/H5FDlog.c45
-rw-r--r--src/H5FDmpio.c50
-rw-r--r--src/H5FDmpiposix.c48
-rw-r--r--src/H5FDsec2.c27
-rw-r--r--src/H5FDsrb.c35
-rw-r--r--src/H5FDstream.c57
-rw-r--r--src/H5FL.c10
-rw-r--r--src/H5Fistore.c46
-rw-r--r--src/H5G.c19
-rw-r--r--src/H5Gent.c20
-rw-r--r--src/H5Gnode.c8
-rw-r--r--src/H5I.c7
-rw-r--r--src/H5O.c15
-rw-r--r--src/H5Oattr.c5
-rw-r--r--src/H5Ocomp.c24
-rw-r--r--src/H5Ocont.c8
-rw-r--r--src/H5Odtype.c16
-rw-r--r--src/H5Oefl.c13
-rw-r--r--src/H5Ofill.c32
-rw-r--r--src/H5Olayout.c14
-rw-r--r--src/H5Omtime.c18
-rw-r--r--src/H5Oname.c19
-rw-r--r--src/H5Osdspace.c18
-rw-r--r--src/H5Oshared.c15
-rw-r--r--src/H5Ostab.c22
-rw-r--r--src/H5P.c17
-rw-r--r--src/H5S.c21
-rw-r--r--src/H5Sall.c49
-rw-r--r--src/H5Shyper.c37
-rw-r--r--src/H5Smpio.c2
-rw-r--r--src/H5Snone.c63
-rw-r--r--src/H5Spoint.c42
-rw-r--r--src/H5Sselect.c1
-rw-r--r--src/H5T.c40
-rw-r--r--src/H5TB.c90
-rw-r--r--src/H5Tbit.c29
-rw-r--r--src/H5Tvlen.c23
-rw-r--r--src/H5V.c70
-rw-r--r--src/H5private.h6
51 files changed, 1042 insertions, 294 deletions
diff --git a/src/H5.c b/src/H5.c
index 4a9abdc..5794911 100644
--- a/src/H5.c
+++ b/src/H5.c
@@ -292,6 +292,7 @@ H5garbage_collect(void)
/* Call the garbage collection routines in the library */
H5FL_garbage_coll();
+done:
FUNC_LEAVE(ret_value);
} /* end H5garbage_collect() */
@@ -336,6 +337,7 @@ H5set_free_list_limits(int reg_global_lim, int reg_list_lim, int arr_global_lim,
/* Call the free list function to actually set the limits */
H5FL_set_free_list_limits(reg_global_lim, reg_list_lim, arr_global_lim, arr_list_lim, blk_global_lim, blk_list_lim);
+done:
FUNC_LEAVE(ret_value);
} /* end H5set_free_list_limits() */
@@ -467,6 +469,7 @@ H5get_libversion(unsigned *majnum, unsigned *minnum, unsigned *relnum)
if (minnum) *minnum = H5_VERS_MINOR;
if (relnum) *relnum = H5_VERS_RELEASE;
+done:
FUNC_LEAVE(ret_value);
}
@@ -569,9 +572,12 @@ done:
herr_t
H5open(void)
{
+ herr_t ret_value=SUCCEED; /* Return value */
+
FUNC_ENTER_API(H5open, FAIL);
/* all work is done by FUNC_ENTER() */
- FUNC_LEAVE(SUCCEED);
+done:
+ FUNC_LEAVE(ret_value);
}
diff --git a/src/H5A.c b/src/H5A.c
index a9efaec..678f37e 100644
--- a/src/H5A.c
+++ b/src/H5A.c
@@ -1380,7 +1380,14 @@ done:
H5G_entry_t *
H5A_entof(H5A_t *attr)
{
+ H5G_entry_t *ret_value; /* Return value */
+
FUNC_ENTER_NOAPI(H5A_entof, NULL);
assert(attr);
- FUNC_LEAVE(&(attr->ent));
+
+ /* Set return value */
+ ret_value=&(attr->ent);
+
+done:
+ FUNC_LEAVE(ret_value);
}
diff --git a/src/H5AC.c b/src/H5AC.c
index 9a0f7f6..dfdf6d4 100644
--- a/src/H5AC.c
+++ b/src/H5AC.c
@@ -1055,6 +1055,7 @@ H5AC_debug(H5F_t UNUSED *f)
H5AC_t *cache = f->shared->cache;
double miss_rate;
#endif
+ herr_t ret_value=SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(H5AC_debug, FAIL);
@@ -1114,5 +1115,6 @@ H5AC_debug(H5F_t UNUSED *f)
}
#endif
- FUNC_LEAVE(SUCCEED);
+done:
+ FUNC_LEAVE(ret_value);
}
diff --git a/src/H5B.c b/src/H5B.c
index c850f28..1348f37 100644
--- a/src/H5B.c
+++ b/src/H5B.c
@@ -1901,6 +1901,7 @@ H5B_nodesize(H5F_t *f, const H5B_class_t *type,
size_t *total_nkey_size/*out*/, size_t sizeof_rkey)
{
size_t size;
+ size_t ret_value; /* Return value */
FUNC_ENTER_NOAPI(H5B_nodesize, (size_t) 0);
@@ -1925,7 +1926,11 @@ H5B_nodesize(H5F_t *f, const H5B_class_t *type,
2 * H5B_Kvalue(f, type) * H5F_SIZEOF_ADDR(f) + /*child pointers */
(2 * H5B_Kvalue(f, type) + 1) * sizeof_rkey); /*keys */
- FUNC_LEAVE(size);
+ /* Set return value */
+ ret_value=size;
+
+done:
+ FUNC_LEAVE(ret_value);
}
diff --git a/src/H5D.c b/src/H5D.c
index 5e6765d..2d54dfc 100644
--- a/src/H5D.c
+++ b/src/H5D.c
@@ -101,9 +101,13 @@ H5FL_BLK_DEFINE_STATIC(vlen_fl_buf);
herr_t
H5D_init(void)
{
+ herr_t ret_value=SUCCEED; /* Return value */
+
FUNC_ENTER_NOAPI(H5D_init, FAIL);
/* FUNC_ENTER() does all the work */
- FUNC_LEAVE(SUCCEED);
+
+done:
+ FUNC_LEAVE(ret_value);
}
@@ -3342,7 +3346,7 @@ hsize_t
H5D_get_storage_size(H5D_t *dset)
{
unsigned u; /* Index variable */
- hsize_t ret_value=0;
+ hsize_t ret_value;
FUNC_ENTER_NOAPI(H5D_get_storage_size, 0);
@@ -3362,6 +3366,7 @@ H5D_get_storage_size(H5D_t *dset)
} /* end else */
} /* end else */
+done:
FUNC_LEAVE(ret_value);
}
@@ -3521,6 +3526,7 @@ void *
H5D_vlen_get_buf_size_alloc(size_t size, void *info)
{
H5T_vlen_bufsize_t *vlen_bufsize=(H5T_vlen_bufsize_t *)info;
+ void *ret_value; /* Return value */
FUNC_ENTER_NOAPI(H5D_vlen_get_buf_size_alloc, NULL);
@@ -3528,7 +3534,11 @@ H5D_vlen_get_buf_size_alloc(size_t size, void *info)
if ((vlen_bufsize->vl_tbuf=H5FL_BLK_REALLOC(vlen_vl_buf,vlen_bufsize->vl_tbuf,size))!=NULL)
vlen_bufsize->size+=size;
- FUNC_LEAVE(vlen_bufsize->vl_tbuf);
+ /* Set return value */
+ ret_value=vlen_bufsize->vl_tbuf;
+
+done:
+ FUNC_LEAVE(ret_value);
} /* end H5D_vlen_get_buf_size_alloc() */
diff --git a/src/H5Distore.c b/src/H5Distore.c
index 7780b2d..ffcabf3 100644
--- a/src/H5Distore.c
+++ b/src/H5Distore.c
@@ -258,6 +258,7 @@ H5F_istore_decode_key(H5F_t UNUSED *f, H5B_t *bt, uint8_t *raw, void *_key)
H5F_istore_key_t *key = (H5F_istore_key_t *) _key;
int i;
int ndims = H5F_ISTORE_NDIMS(bt);
+ herr_t ret_value=SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(H5F_istore_decode_key, FAIL);
@@ -271,11 +272,11 @@ H5F_istore_decode_key(H5F_t UNUSED *f, H5B_t *bt, uint8_t *raw, void *_key)
/* decode */
UINT32DECODE(raw, key->nbytes);
UINT32DECODE(raw, key->filter_mask);
- for (i=0; i<ndims; i++) {
+ for (i=0; i<ndims; i++)
UINT64DECODE(raw, key->offset[i]);
- }
- FUNC_LEAVE(SUCCEED);
+done:
+ FUNC_LEAVE(ret_value);
}
@@ -299,6 +300,7 @@ H5F_istore_encode_key(H5F_t UNUSED *f, H5B_t *bt, uint8_t *raw, void *_key)
H5F_istore_key_t *key = (H5F_istore_key_t *) _key;
int ndims = H5F_ISTORE_NDIMS(bt);
int i;
+ herr_t ret_value=SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(H5F_istore_encode_key, FAIL);
@@ -312,11 +314,11 @@ H5F_istore_encode_key(H5F_t UNUSED *f, H5B_t *bt, uint8_t *raw, void *_key)
/* encode */
UINT32ENCODE(raw, key->nbytes);
UINT32ENCODE(raw, key->filter_mask);
- for (i=0; i<ndims; i++) {
+ for (i=0; i<ndims; i++)
UINT64ENCODE(raw, key->offset[i]);
- }
- FUNC_LEAVE(SUCCEED);
+done:
+ FUNC_LEAVE(ret_value);
}
@@ -341,6 +343,7 @@ H5F_istore_debug_key (FILE *stream, int indent, int fwidth,
const H5F_istore_key_t *key = (const H5F_istore_key_t *)_key;
const H5F_istore_ud1_t *udata = (const H5F_istore_ud1_t *)_udata;
unsigned u;
+ herr_t ret_value=SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(H5F_istore_debug_key, FAIL);
@@ -352,12 +355,12 @@ H5F_istore_debug_key (FILE *stream, int indent, int fwidth,
"Filter mask:", key->filter_mask);
HDfprintf(stream, "%*s%-*s {", indent, "", fwidth,
"Logical offset:");
- for (u=0; u<udata->mesg.ndims; u++) {
+ for (u=0; u<udata->mesg.ndims; u++)
HDfprintf (stream, "%s%Hd", u?", ":"", key->offset[u]);
- }
HDfputs ("}\n", stream);
- FUNC_LEAVE (SUCCEED);
+done:
+ FUNC_LEAVE (ret_value);
}
@@ -389,7 +392,7 @@ H5F_istore_cmp2(H5F_t UNUSED *f, void *_lt_key, void *_udata,
H5F_istore_key_t *lt_key = (H5F_istore_key_t *) _lt_key;
H5F_istore_key_t *rt_key = (H5F_istore_key_t *) _rt_key;
H5F_istore_ud1_t *udata = (H5F_istore_ud1_t *) _udata;
- int cmp;
+ int ret_value;
FUNC_ENTER_NOAPI(H5F_istore_cmp2, FAIL);
@@ -399,9 +402,10 @@ H5F_istore_cmp2(H5F_t UNUSED *f, void *_lt_key, void *_udata,
assert(udata->mesg.ndims > 0 && udata->mesg.ndims <= H5O_LAYOUT_NDIMS);
/* Compare the offsets but ignore the other fields */
- cmp = H5V_vector_cmp_s(udata->mesg.ndims, lt_key->offset, rt_key->offset);
+ ret_value = H5V_vector_cmp_s(udata->mesg.ndims, lt_key->offset, rt_key->offset);
- FUNC_LEAVE(cmp);
+done:
+ FUNC_LEAVE(ret_value);
}
@@ -441,7 +445,7 @@ H5F_istore_cmp3(H5F_t UNUSED *f, void *_lt_key, void *_udata,
H5F_istore_key_t *lt_key = (H5F_istore_key_t *) _lt_key;
H5F_istore_key_t *rt_key = (H5F_istore_key_t *) _rt_key;
H5F_istore_ud1_t *udata = (H5F_istore_ud1_t *) _udata;
- int cmp = 0;
+ int ret_value = 0;
FUNC_ENTER_NOAPI(H5F_istore_cmp3, FAIL);
@@ -452,12 +456,14 @@ H5F_istore_cmp3(H5F_t UNUSED *f, void *_lt_key, void *_udata,
if (H5V_vector_lt_s(udata->mesg.ndims, udata->key.offset,
lt_key->offset)) {
- cmp = -1;
+ ret_value = -1;
} else if (H5V_vector_ge_s(udata->mesg.ndims, udata->key.offset,
rt_key->offset)) {
- cmp = 1;
+ ret_value = 1;
}
- FUNC_LEAVE(cmp);
+
+done:
+ FUNC_LEAVE(ret_value);
}
@@ -2210,6 +2216,7 @@ H5F_istore_debug(H5F_t *f, haddr_t addr, FILE * stream, int indent,
int fwidth, int ndims)
{
H5F_istore_ud1_t udata;
+ herr_t ret_value=SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(H5F_istore_debug, FAIL);
@@ -2218,7 +2225,8 @@ H5F_istore_debug(H5F_t *f, haddr_t addr, FILE * stream, int indent,
H5B_debug (f, addr, stream, indent, fwidth, H5B_ISTORE, &udata);
- FUNC_LEAVE (SUCCEED);
+done:
+ FUNC_LEAVE (ret_value);
}
@@ -2749,6 +2757,7 @@ H5F_istore_remove(H5F_t *f, haddr_t addr, void *_lt_key /*in,out */ ,
hbool_t *rt_key_changed /*out */ )
{
H5F_istore_key_t *lt_key = (H5F_istore_key_t *)_lt_key;
+ H5B_ins_t ret_value=H5B_INS_REMOVE; /* Return value */
FUNC_ENTER_NOAPI(H5F_istore_remove,H5B_INS_ERROR);
@@ -2756,7 +2765,8 @@ H5F_istore_remove(H5F_t *f, haddr_t addr, void *_lt_key /*in,out */ ,
*lt_key_changed = FALSE;
*rt_key_changed = FALSE;
- FUNC_LEAVE(H5B_INS_REMOVE);
+done:
+ FUNC_LEAVE(ret_value);
}
diff --git a/src/H5E.c b/src/H5E.c
index 4067b40..c4a3031 100644
--- a/src/H5E.c
+++ b/src/H5E.c
@@ -224,6 +224,7 @@ H5E_t *
H5E_get_stack(void)
{
H5E_t *estack;
+ H5E_t *ret_value; /* Return value */
FUNC_ENTER_NOAPI(H5E_get_stack,NULL);
@@ -234,7 +235,11 @@ H5E_get_stack(void)
pthread_setspecific(H5TS_errstk_key_g, (void *)estack);
}
- FUNC_LEAVE(estack);
+ /* Set return value */
+ ret_value=estack;
+
+done:
+ FUNC_LEAVE(ret_value);
}
#endif /* H5_HAVE_THREADSAFE */
@@ -297,13 +302,16 @@ H5E_init_interface (void)
herr_t
H5Eset_auto(H5E_auto_t func, void *client_data)
{
+ herr_t ret_value=SUCCEED; /* Return value */
+
FUNC_ENTER_API(H5Eset_auto, FAIL);
H5TRACE2("e","xx",func,client_data);
H5E_auto_g = func;
H5E_auto_data_g = client_data;
- FUNC_LEAVE (SUCCEED);
+done:
+ FUNC_LEAVE (ret_value);
}
@@ -326,13 +334,16 @@ H5Eset_auto(H5E_auto_t func, void *client_data)
herr_t
H5Eget_auto(H5E_auto_t *func, void **client_data)
{
+ herr_t ret_value=SUCCEED; /* Return value */
+
FUNC_ENTER_API(H5Eget_auto, FAIL);
H5TRACE2("e","*x*x",func,client_data);
if (func) *func = H5E_auto_g;
if (client_data) *client_data = H5E_auto_data_g;
- FUNC_LEAVE (SUCCEED);
+done:
+ FUNC_LEAVE (ret_value);
}
@@ -354,10 +365,14 @@ H5Eget_auto(H5E_auto_t *func, void **client_data)
herr_t
H5Eclear(void)
{
+ herr_t ret_value=SUCCEED; /* Return value */
+
FUNC_ENTER_API(H5Eclear, FAIL);
H5TRACE0("e","");
/* FUNC_ENTER() does all the work */
- FUNC_LEAVE (SUCCEED);
+
+done:
+ FUNC_LEAVE (ret_value);
}
@@ -386,7 +401,7 @@ herr_t
H5Eprint(FILE *stream)
{
H5E_t *estack = H5E_get_my_stack ();
- herr_t status = FAIL;
+ herr_t ret_value = FAIL;
/* Don't clear the error stack! :-) */
FUNC_ENTER_API_NOCLEAR(H5Eprint, FAIL);
@@ -411,9 +426,11 @@ H5Eprint(FILE *stream)
#endif
if (estack && estack->nused>0) fprintf (stream, " Back trace follows.");
HDfputc ('\n', stream);
- status = H5E_walk (H5E_WALK_DOWNWARD, H5E_walk_cb, (void*)stream);
+
+ ret_value = H5E_walk (H5E_WALK_DOWNWARD, H5E_walk_cb, (void*)stream);
- FUNC_LEAVE (status);
+done:
+ FUNC_LEAVE (ret_value);
}
@@ -435,15 +452,16 @@ H5Eprint(FILE *stream)
herr_t
H5Ewalk(H5E_direction_t direction, H5E_walk_t func, void *client_data)
{
- herr_t status = FAIL;
+ herr_t ret_value;
/* Don't clear the error stack! :-) */
FUNC_ENTER_API_NOCLEAR(H5Ewalk, FAIL);
H5TRACE3("e","Edxx",direction,func,client_data);
- status = H5E_walk (direction, func, client_data);
+ ret_value = H5E_walk (direction, func, client_data);
- FUNC_LEAVE (status);
+done:
+ FUNC_LEAVE (ret_value);
}
@@ -692,6 +710,7 @@ H5Epush(const char *file, const char *func, unsigned line, H5E_major_t maj,
ret_value = H5E_push(maj, min, func, file, line, str);
+done:
FUNC_LEAVE(ret_value);
}
@@ -714,12 +733,14 @@ herr_t
H5E_clear(void)
{
H5E_t *estack = H5E_get_my_stack ();
+ herr_t ret_value=SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(H5E_clear, FAIL);
if (estack) estack->nused = 0;
- FUNC_LEAVE(SUCCEED);
+done:
+ FUNC_LEAVE(ret_value);
}
@@ -755,6 +776,7 @@ H5E_walk (H5E_direction_t direction, H5E_walk_t func, void *client_data)
H5E_t *estack = H5E_get_my_stack ();
int i;
herr_t status;
+ herr_t ret_value=SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(H5E_walk, FAIL);
@@ -775,6 +797,7 @@ H5E_walk (H5E_direction_t direction, H5E_walk_t func, void *client_data)
}
}
- FUNC_LEAVE(SUCCEED);
+done:
+ FUNC_LEAVE(ret_value);
}
diff --git a/src/H5F.c b/src/H5F.c
index 1977033..2566b67 100644
--- a/src/H5F.c
+++ b/src/H5F.c
@@ -108,9 +108,13 @@ H5FL_BLK_EXTERN(sieve_buf);
herr_t
H5F_init(void)
{
+ herr_t ret_value=SUCCEED; /* Return value */
+
FUNC_ENTER_NOAPI(H5F_init, FAIL);
/* FUNC_ENTER() does all the work */
- FUNC_LEAVE(SUCCEED);
+
+done:
+ FUNC_LEAVE(ret_value);
}
@@ -672,11 +676,14 @@ H5F_flush_all_cb(H5F_t *f, hid_t UNUSED fid, const void *_invalidate)
herr_t
H5F_flush_all(hbool_t invalidate)
{
+ herr_t ret_value=SUCCEED; /* Return value */
+
FUNC_ENTER_NOAPI(H5F_flush_all, FAIL);
H5I_search(H5I_FILE,(H5I_search_func_t)H5F_flush_all_cb,(void*)&invalidate);
- FUNC_LEAVE(SUCCEED);
+done:
+ FUNC_LEAVE(ret_value);
}
@@ -3026,6 +3033,7 @@ H5F_mountpoint(H5G_entry_t *find/*in,out*/)
H5F_t *parent = find->file;
int lt, rt, md=(-1), cmp;
H5G_entry_t *ent = NULL;
+ herr_t ret_value=SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(H5F_mountpoint, FAIL);
@@ -3062,7 +3070,8 @@ H5F_mountpoint(H5G_entry_t *find/*in,out*/)
}
} while (!cmp);
- FUNC_LEAVE(SUCCEED);
+done:
+ FUNC_LEAVE(ret_value);
}
diff --git a/src/H5FD.c b/src/H5FD.c
index 6047e5f..ba62cdb 100644
--- a/src/H5FD.c
+++ b/src/H5FD.c
@@ -361,6 +361,7 @@ H5FD_sb_size(H5FD_t *file)
if (file->cls->sb_size)
ret_value = (file->cls->sb_size)(file);
+done:
FUNC_LEAVE(ret_value);
}
@@ -474,6 +475,7 @@ H5FD_fapl_get(H5FD_t *file)
if (file->cls->fapl_get)
ret_value = (file->cls->fapl_get)(file);
+done:
FUNC_LEAVE(ret_value);
}
@@ -993,6 +995,7 @@ H5FDcmp(const H5FD_t *f1, const H5FD_t *f2)
ret_value = H5FD_cmp(f1, f2);
+done:
FUNC_LEAVE(ret_value);
}
@@ -1076,6 +1079,7 @@ H5FDquery(const H5FD_t *f, unsigned long *flags/*out*/)
ret_value = H5FD_query(f, flags);
+done:
FUNC_LEAVE(ret_value);
}
@@ -1112,6 +1116,7 @@ H5FD_query(const H5FD_t *f, unsigned long *flags/*out*/)
else
*flags=0;
+done:
FUNC_LEAVE(ret_value);
}
@@ -2751,6 +2756,8 @@ done:
herr_t
H5FD_get_fileno(const H5FD_t *file, unsigned long *filenum)
{
+ herr_t ret_value=SUCCEED; /* Return value */
+
FUNC_ENTER_NOAPI(H5FD_get_fileno, FAIL);
assert(file);
@@ -2759,6 +2766,7 @@ H5FD_get_fileno(const H5FD_t *file, unsigned long *filenum)
/* Retrieve the file's serial number */
HDmemcpy(filenum,file->fileno,sizeof(file->fileno));
- FUNC_LEAVE(SUCCEED);
+done:
+ FUNC_LEAVE(ret_value);
} /* end H5F_get_fileno() */
diff --git a/src/H5FDcore.c b/src/H5FDcore.c
index 2f79dd0..9298587 100644
--- a/src/H5FDcore.c
+++ b/src/H5FDcore.c
@@ -144,12 +144,18 @@ static int interface_initialize_g = 0;
hid_t
H5FD_core_init(void)
{
+ hid_t ret_value=H5FD_CORE_g; /* Return value */
+
FUNC_ENTER_NOAPI(H5FD_core_init, FAIL);
if (H5I_VFL!=H5Iget_type(H5FD_CORE_g))
H5FD_CORE_g = H5FDregister(&H5FD_core_g);
- FUNC_LEAVE(H5FD_CORE_g);
+ /* Set return value */
+ ret_value=H5FD_CORE_g;
+
+done:
+ FUNC_LEAVE(ret_value);
}
@@ -527,11 +533,17 @@ done:
static haddr_t
H5FD_core_get_eoa(H5FD_t *_file)
{
+ haddr_t ret_value; /* Return value */
+
H5FD_core_t *file = (H5FD_core_t*)_file;
FUNC_ENTER_NOAPI(H5FD_core_get_eoa, HADDR_UNDEF);
- FUNC_LEAVE(file->eoa);
+ /* Set return value */
+ ret_value=file->eoa;
+
+done:
+ FUNC_LEAVE(ret_value);
}
@@ -594,11 +606,17 @@ done:
static haddr_t
H5FD_core_get_eof(H5FD_t *_file)
{
+ haddr_t ret_value; /* Return value */
+
H5FD_core_t *file = (H5FD_core_t*)_file;
FUNC_ENTER_NOAPI(H5FD_core_get_eof, HADDR_UNDEF);
- FUNC_LEAVE(MAX(file->eof, file->eoa));
+ /* Set return value */
+ ret_value=MAX(file->eof, file->eoa);
+
+done:
+ FUNC_LEAVE(ret_value);
}
diff --git a/src/H5FDfamily.c b/src/H5FDfamily.c
index db43cae..b1d445f 100644
--- a/src/H5FDfamily.c
+++ b/src/H5FDfamily.c
@@ -139,12 +139,18 @@ static int interface_initialize_g = 0;
hid_t
H5FD_family_init(void)
{
+ hid_t ret_value=H5FD_FAMILY_g; /* Return value */
+
FUNC_ENTER_NOAPI(H5FD_family_init, FAIL);
if (H5I_VFL!=H5Iget_type(H5FD_FAMILY_g))
H5FD_FAMILY_g = H5FDregister(&H5FD_family_g);
- FUNC_LEAVE(H5FD_FAMILY_g);
+ /* Set return value */
+ ret_value=H5FD_FAMILY_g;
+
+done:
+ FUNC_LEAVE(ret_value);
}
@@ -377,13 +383,15 @@ static herr_t
H5FD_family_fapl_free(void *_fa)
{
H5FD_family_fapl_t *fa = (H5FD_family_fapl_t*)_fa;
+ herr_t ret_value=SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(H5FD_family_fapl_free, FAIL);
H5I_dec_ref(fa->memb_fapl_id);
H5MM_xfree(fa);
- FUNC_LEAVE(SUCCEED);
+done:
+ FUNC_LEAVE(ret_value);
}
@@ -453,13 +461,15 @@ static herr_t
H5FD_family_dxpl_free(void *_dx)
{
H5FD_family_dxpl_t *dx = (H5FD_family_dxpl_t*)_dx;
+ herr_t ret_value=SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(H5FD_family_dxpl_free, FAIL);
H5I_dec_ref(dx->memb_dxpl_id);
H5MM_xfree(dx);
- FUNC_LEAVE(SUCCEED);
+done:
+ FUNC_LEAVE(ret_value);
}
@@ -679,6 +689,7 @@ H5FD_family_cmp(const H5FD_t *_f1, const H5FD_t *_f2)
ret_value= H5FDcmp(f1->memb[0], f2->memb[0]);
+done:
FUNC_LEAVE(ret_value);
}
@@ -716,6 +727,7 @@ H5FD_family_query(const H5FD_t UNUSED * _f, unsigned long *flags /* out */)
*flags|=H5FD_FEAT_AGGREGATE_SMALLDATA; /* OK to aggregate "small" raw data allocations */
}
+done:
FUNC_LEAVE(ret_value);
}
@@ -742,10 +754,15 @@ static haddr_t
H5FD_family_get_eoa(H5FD_t *_file)
{
H5FD_family_t *file = (H5FD_family_t*)_file;
+ haddr_t ret_value; /* Return value */
FUNC_ENTER_NOAPI(H5FD_family_get_eoa, HADDR_UNDEF);
- FUNC_LEAVE(file->eoa);
+ /* Set return value */
+ ret_value=file->eoa;
+
+done:
+ FUNC_LEAVE(ret_value);
}
@@ -845,6 +862,7 @@ H5FD_family_get_eof(H5FD_t *_file)
H5FD_family_t *file = (H5FD_family_t*)_file;
haddr_t eof=0;
int i;
+ haddr_t ret_value; /* Return value */
FUNC_ENTER_NOAPI(H5FD_family_get_eof, HADDR_UNDEF);
@@ -866,7 +884,11 @@ H5FD_family_get_eof(H5FD_t *_file)
*/
eof += i*file->memb_size;
- FUNC_LEAVE(MAX(eof, file->eoa));
+ /* Set return value */
+ ret_value=MAX(eof, file->eoa);
+
+done:
+ FUNC_LEAVE(ret_value);
}
diff --git a/src/H5FDgass.c b/src/H5FDgass.c
index 0133daf..9a5d4b7 100644
--- a/src/H5FDgass.c
+++ b/src/H5FDgass.c
@@ -184,6 +184,8 @@ static int interface_initialize_g = 0;
hid_t
H5FD_gass_init(void)
{
+ hid_t ret_value=H5FD_GASS_g; /* Return value */
+
FUNC_ENTER_NOAPI(H5FD_gass_init, FAIL);
if (!H5FD_GASS_g)
@@ -192,10 +194,14 @@ H5FD_gass_init(void)
globus_module_activate (GLOBUS_COMMON_MODULE);
globus_module_activate (GLOBUS_GASS_FILE_MODULE);
- FUNC_LEAVE(H5FD_GASS_g);
-}
+ /* Set return value */
+ ret_value=H5FD_GASS_g;
+done:
+ FUNC_LEAVE(ret_value);
+}
+
/*-------------------------------------------------------------------------
* Function: H5Pset_fapl_gass
*
@@ -301,7 +307,7 @@ done:
FUNC_LEAVE(ret_value);
}
-
+
/*-------------------------------------------------------------------------
* Function: H5FD_gass_open
*
@@ -431,6 +437,7 @@ done:
FUNC_LEAVE(ret_value);
}
+
/*-------------------------------------------------------------------------
* Function: H5FD_gass_close
*
@@ -464,10 +471,9 @@ H5FD_gass_close (H5FD_t *_file)
H5MM_xfree(file);
done:
- FUNC_LEAVE(SUCCEED);
+ FUNC_LEAVE(ret_value);
}
-
/*-------------------------------------------------------------------------
* Function: H5FD_gass_query
@@ -500,6 +506,7 @@ H5FD_gass_query(const UNUSED H5FD_t *_f, unsigned long *flags /* out */)
*flags|=H5FD_FEAT_AGGREGATE_SMALLDATA; /* OK to aggregate "small" raw data allocations */
}
+done:
FUNC_LEAVE(ret_value);
}
@@ -526,10 +533,15 @@ static haddr_t
H5FD_gass_get_eoa(H5FD_t *_file)
{
H5FD_gass_t *file = (H5FD_gass_t *)_file;
+ haddr_t ret_value; /* Return value */
FUNC_ENTER_NOAPI(H5FD_gass_get_eoa, HADDR_UNDEF);
- FUNC_LEAVE(file->eoa);
+ /* Set return value */
+ ret_value=file->eoa;
+
+done:
+ FUNC_LEAVE(ret_value);
}
@@ -553,15 +565,17 @@ static herr_t
H5FD_gass_set_eoa(H5FD_t *_file, haddr_t addr)
{
H5FD_gass_t *file = (H5FD_gass_t *)_file;
+ herr_t ret_value=SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(H5FD_gass_set_eoa, FAIL);
file->eoa = addr;
- FUNC_LEAVE(SUCCEED);
+done:
+ FUNC_LEAVE(ret_value);
}
-
+
/*-------------------------------------------------------------------------
* Function: H5FD_gass_get_eof
*
@@ -586,10 +600,15 @@ static haddr_t
H5FD_gass_get_eof(H5FD_t *_file)
{
H5FD_gass_t *file = (H5FD_gass_t*)_file;
+ haddr_t ret_value; /* Return value */
FUNC_ENTER_NOAPI(H5FD_gass_get_eof, HADDR_UNDEF);
- FUNC_LEAVE(MAX(file->eof, file->eoa));
+ /* Set return value */
+ ret_value=MAX(file->eof, file->eoa);
+
+done:
+ FUNC_LEAVE(ret_value);
}
diff --git a/src/H5FDlog.c b/src/H5FDlog.c
index c3837b3..53eb186 100644
--- a/src/H5FDlog.c
+++ b/src/H5FDlog.c
@@ -244,12 +244,18 @@ static int interface_initialize_g = 0;
hid_t
H5FD_log_init(void)
{
+ hid_t ret_value=H5FD_LOG_g; /* Return value */
+
FUNC_ENTER_NOAPI(H5FD_log_init, FAIL);
if (H5I_VFL!=H5Iget_type(H5FD_LOG_g))
H5FD_LOG_g = H5FDregister(&H5FD_log_g);
- FUNC_LEAVE(H5FD_LOG_g);
+ /* Set return value */
+ ret_value=H5FD_LOG_g;
+
+done:
+ FUNC_LEAVE(ret_value);
}
#ifdef H5_WANT_H5_V1_4_COMPAT
@@ -368,10 +374,15 @@ static void *
H5FD_log_fapl_get(H5FD_t *_file)
{
H5FD_log_t *file = (H5FD_log_t*)_file;
+ void *ret_value; /* Return value */
FUNC_ENTER_NOAPI(H5FD_log_fapl_get, NULL);
- FUNC_LEAVE(H5FD_log_fapl_copy(&(file->fa)));
+ /* Set return value */
+ ret_value= H5FD_log_fapl_copy(&(file->fa));
+
+done:
+ FUNC_LEAVE(ret_value);
} /* end H5FD_log_fapl_get() */
@@ -438,6 +449,7 @@ static herr_t
H5FD_log_fapl_free(void *_fa)
{
H5FD_log_fapl_t *fa = (H5FD_log_fapl_t*)_fa;
+ herr_t ret_value=SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(H5FD_log_fapl_free, FAIL);
@@ -446,7 +458,8 @@ H5FD_log_fapl_free(void *_fa)
H5MM_xfree(fa->logfile);
H5MM_xfree(fa);
- FUNC_LEAVE(SUCCEED);
+done:
+ FUNC_LEAVE(ret_value);
} /* end H5FD_log_fapl_free() */
@@ -786,6 +799,7 @@ H5FD_log_query(const H5FD_t UNUSED * _f, unsigned long *flags /* out */)
*flags|=H5FD_FEAT_AGGREGATE_SMALLDATA; /* OK to aggregate "small" raw data allocations */
}
+done:
FUNC_LEAVE(ret_value);
}
@@ -811,6 +825,7 @@ H5FD_log_alloc(H5FD_t *_file, H5FD_mem_t type, hsize_t size)
{
H5FD_log_t *file = (H5FD_log_t*)_file;
haddr_t addr;
+ haddr_t ret_value; /* Return value */
FUNC_ENTER_NOAPI(H5FD_log_alloc, HADDR_UNDEF);
@@ -838,7 +853,11 @@ H5FD_log_alloc(H5FD_t *_file, H5FD_mem_t type, hsize_t size)
HDfprintf(file->logfp,"%10a-%10a (%10Hu bytes) Allocated, flavor=%s\n",addr,addr+size-1,size,flavors[type]);
} /* end if */
- FUNC_LEAVE(addr);
+ /* Set return value */
+ ret_value=addr;
+
+done:
+ FUNC_LEAVE(ret_value);
} /* H5FD_log_alloc() */
@@ -864,10 +883,15 @@ static haddr_t
H5FD_log_get_eoa(H5FD_t *_file)
{
H5FD_log_t *file = (H5FD_log_t*)_file;
+ haddr_t ret_value; /* Return value */
FUNC_ENTER_NOAPI(H5FD_log_get_eoa, HADDR_UNDEF);
- FUNC_LEAVE(file->eoa);
+ /* Set return value */
+ ret_value=file->eoa;
+
+done:
+ FUNC_LEAVE(ret_value);
}
@@ -893,12 +917,14 @@ static herr_t
H5FD_log_set_eoa(H5FD_t *_file, haddr_t addr)
{
H5FD_log_t *file = (H5FD_log_t*)_file;
+ herr_t ret_value=SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(H5FD_log_set_eoa, FAIL);
file->eoa = addr;
- FUNC_LEAVE(SUCCEED);
+done:
+ FUNC_LEAVE(ret_value);
}
@@ -926,10 +952,15 @@ static haddr_t
H5FD_log_get_eof(H5FD_t *_file)
{
H5FD_log_t *file = (H5FD_log_t*)_file;
+ haddr_t ret_value; /* Return value */
FUNC_ENTER_NOAPI(H5FD_get_get_eof, HADDR_UNDEF);
- FUNC_LEAVE(MAX(file->eof, file->eoa));
+ /* Set return value */
+ ret_value=MAX(file->eof, file->eoa);
+
+done:
+ FUNC_LEAVE(ret_value);
}
diff --git a/src/H5FDmpio.c b/src/H5FDmpio.c
index 6c25caa..cf23ed4 100644
--- a/src/H5FDmpio.c
+++ b/src/H5FDmpio.c
@@ -175,12 +175,18 @@ static int interface_initialize_g = 0;
hid_t
H5FD_mpio_init(void)
{
+ hid_t ret_value=H5FD_MPIO_g; /* Return value */
+
FUNC_ENTER_NOAPI(H5FD_mpio_init, FAIL);
if (H5I_VFL!=H5Iget_type(H5FD_MPIO_g))
H5FD_MPIO_g = H5FDregister(&H5FD_mpio_g);
- FUNC_LEAVE(H5FD_MPIO_g);
+ /* Set return value */
+ ret_value=H5FD_MPIO_g;
+
+done:
+ FUNC_LEAVE(ret_value);
}
@@ -419,7 +425,7 @@ H5Pget_dxpl_mpio(hid_t dxpl_id, H5FD_mpio_xfer_t *xfer_mode/*out*/)
*xfer_mode = dx->xfer_mode;
done:
- FUNC_LEAVE(SUCCEED);
+ FUNC_LEAVE(ret_value);
}
@@ -443,13 +449,18 @@ MPI_Comm
H5FD_mpio_communicator(H5FD_t *_file)
{
H5FD_mpio_t *file = (H5FD_mpio_t*)_file;
+ MPI_Comm ret_value; /* Return value */
FUNC_ENTER_NOAPI(H5FD_mpio_communicator, MPI_COMM_NULL);
assert(file);
assert(H5FD_MPIO==file->pub.driver_id);
- FUNC_LEAVE(file->comm);
+ /* Set return value */
+ ret_value=file->comm;
+
+done:
+ FUNC_LEAVE(ret_value);
}
@@ -472,13 +483,18 @@ int
H5FD_mpio_mpi_rank(H5FD_t *_file)
{
H5FD_mpio_t *file = (H5FD_mpio_t*)_file;
+ int ret_value; /* Return value */
FUNC_ENTER_NOAPI(H5FD_mpio_mpi_rank, FAIL);
assert(file);
assert(H5FD_MPIO==file->pub.driver_id);
- FUNC_LEAVE(file->mpi_rank);
+ /* Set return value */
+ ret_value=file->mpi_rank;
+
+done:
+ FUNC_LEAVE(ret_value);
} /* end H5FD_mpio_mpi_rank() */
@@ -501,13 +517,18 @@ int
H5FD_mpio_mpi_size(H5FD_t *_file)
{
H5FD_mpio_t *file = (H5FD_mpio_t*)_file;
+ int ret_value; /* Return value */
FUNC_ENTER_NOAPI(H5FD_mpio_mpi_rank, FAIL);
assert(file);
assert(H5FD_MPIO==file->pub.driver_id);
- FUNC_LEAVE(file->mpi_size);
+ /* Set return value */
+ ret_value=file->mpi_size;
+
+done:
+ FUNC_LEAVE(ret_value);
} /* end H5FD_mpio_mpi_size() */
@@ -1032,6 +1053,7 @@ H5FD_mpio_query(const H5FD_t UNUSED *_file, unsigned long *flags /* out */)
*flags|=H5FD_FEAT_AGGREGATE_SMALLDATA; /* OK to aggregate "small" raw data allocations */
} /* end if */
+done:
FUNC_LEAVE(ret_value);
}
@@ -1058,13 +1080,18 @@ static haddr_t
H5FD_mpio_get_eoa(H5FD_t *_file)
{
H5FD_mpio_t *file = (H5FD_mpio_t*)_file;
+ haddr_t ret_value; /* Return value */
FUNC_ENTER_NOAPI(H5FD_mpio_get_eoa, HADDR_UNDEF);
assert(file);
assert(H5FD_MPIO==file->pub.driver_id);
- FUNC_LEAVE(file->eoa);
+ /* Set return value */
+ ret_value=file->eoa;
+
+done:
+ FUNC_LEAVE(ret_value);
}
@@ -1090,6 +1117,7 @@ static herr_t
H5FD_mpio_set_eoa(H5FD_t *_file, haddr_t addr)
{
H5FD_mpio_t *file = (H5FD_mpio_t*)_file;
+ herr_t ret_value=SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(H5FD_mpio_set_eoa, FAIL);
@@ -1098,7 +1126,8 @@ H5FD_mpio_set_eoa(H5FD_t *_file, haddr_t addr)
file->eoa = addr;
- FUNC_LEAVE(SUCCEED);
+done:
+ FUNC_LEAVE(ret_value);
}
@@ -1131,13 +1160,18 @@ static haddr_t
H5FD_mpio_get_eof(H5FD_t *_file)
{
H5FD_mpio_t *file = (H5FD_mpio_t*)_file;
+ haddr_t ret_value; /* Return value */
FUNC_ENTER_NOAPI(H5FD_mpio_get_eof, HADDR_UNDEF);
assert(file);
assert(H5FD_MPIO==file->pub.driver_id);
- FUNC_LEAVE(file->eof);
+ /* Set return value */
+ ret_value=file->eof;
+
+done:
+ FUNC_LEAVE(ret_value);
}
diff --git a/src/H5FDmpiposix.c b/src/H5FDmpiposix.c
index e7c5284..2d35944 100644
--- a/src/H5FDmpiposix.c
+++ b/src/H5FDmpiposix.c
@@ -240,12 +240,18 @@ static int interface_initialize_g = 0;
hid_t
H5FD_mpiposix_init(void)
{
+ hid_t ret_value=H5FD_MPIPOSIX_g; /* Return value */
+
FUNC_ENTER_NOAPI(H5FD_mpiposix_init, FAIL);
if (H5I_VFL!=H5Iget_type(H5FD_MPIPOSIX_g))
H5FD_MPIPOSIX_g = H5FDregister(&H5FD_mpiposix_g);
- FUNC_LEAVE(H5FD_MPIPOSIX_g);
+ /* Set return value */
+ ret_value=H5FD_MPIPOSIX_g;
+
+done:
+ FUNC_LEAVE(ret_value);
} /* end H5FD_mpiposix_init() */
@@ -370,13 +376,18 @@ MPI_Comm
H5FD_mpiposix_communicator(H5FD_t *_file)
{
H5FD_mpiposix_t *file = (H5FD_mpiposix_t*)_file;
+ MPI_Comm ret_value; /* Return value */
FUNC_ENTER_NOAPI(H5FD_mpiposix_communicator, MPI_COMM_NULL);
assert(file);
assert(H5FD_MPIPOSIX==file->pub.driver_id);
- FUNC_LEAVE(file->comm);
+ /* Set return value */
+ ret_value=file->comm;
+
+done:
+ FUNC_LEAVE(ret_value);
} /* end H5FD_mpi_posix_communicator() */
@@ -399,13 +410,18 @@ int
H5FD_mpiposix_mpi_rank(H5FD_t *_file)
{
H5FD_mpiposix_t *file = (H5FD_mpiposix_t*)_file;
+ int ret_value; /* Return value */
FUNC_ENTER_NOAPI(H5FD_mpiposix_mpi_rank, FAIL);
assert(file);
assert(H5FD_MPIPOSIX==file->pub.driver_id);
- FUNC_LEAVE(file->mpi_rank);
+ /* Set return value */
+ ret_value=file->mpi_rank;
+
+done:
+ FUNC_LEAVE(ret_value);
} /* end H5FD_mpiposix_mpi_rank() */
@@ -428,13 +444,18 @@ int
H5FD_mpiposix_mpi_size(H5FD_t *_file)
{
H5FD_mpiposix_t *file = (H5FD_mpiposix_t*)_file;
+ int ret_value; /* Return value */
FUNC_ENTER_NOAPI(H5FD_mpiposix_mpi_rank, FAIL);
assert(file);
assert(H5FD_MPIPOSIX==file->pub.driver_id);
- FUNC_LEAVE(file->mpi_size);
+ /* Set return value */
+ ret_value=file->mpi_size;
+
+done:
+ FUNC_LEAVE(ret_value);
} /* end H5FD_mpiposix_mpi_size() */
@@ -814,6 +835,7 @@ H5FD_mpiposix_query(const H5FD_t UNUSED *_file, unsigned long *flags /* out */)
*flags|=H5FD_FEAT_AGGREGATE_SMALLDATA; /* OK to aggregate "small" raw data allocations */
} /* end if */
+done:
FUNC_LEAVE(ret_value);
} /* end H5FD_mpiposix_query() */
@@ -839,13 +861,18 @@ static haddr_t
H5FD_mpiposix_get_eoa(H5FD_t *_file)
{
H5FD_mpiposix_t *file = (H5FD_mpiposix_t*)_file;
+ haddr_t ret_value; /* Return value */
FUNC_ENTER_NOAPI(H5FD_mpiposix_get_eoa, HADDR_UNDEF);
assert(file);
assert(H5FD_MPIPOSIX==file->pub.driver_id);
- FUNC_LEAVE(file->eoa);
+ /* Set return value */
+ ret_value=file->eoa;
+
+done:
+ FUNC_LEAVE(ret_value);
} /* end H5FD_mpiposix_get_eoa() */
@@ -870,6 +897,7 @@ static herr_t
H5FD_mpiposix_set_eoa(H5FD_t *_file, haddr_t addr)
{
H5FD_mpiposix_t *file = (H5FD_mpiposix_t*)_file;
+ herr_t ret_value=SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(H5FD_mpiposix_set_eoa, FAIL);
@@ -878,7 +906,8 @@ H5FD_mpiposix_set_eoa(H5FD_t *_file, haddr_t addr)
file->eoa = addr;
- FUNC_LEAVE(SUCCEED);
+done:
+ FUNC_LEAVE(ret_value);
} /* end H5FD_mpi_posix_set_eoa() */
@@ -908,13 +937,18 @@ static haddr_t
H5FD_mpiposix_get_eof(H5FD_t *_file)
{
H5FD_mpiposix_t *file = (H5FD_mpiposix_t*)_file;
+ haddr_t ret_value; /* Return value */
FUNC_ENTER_NOAPI(H5FD_mpiposix_get_eof, HADDR_UNDEF);
assert(file);
assert(H5FD_MPIPOSIX==file->pub.driver_id);
- FUNC_LEAVE(MAX(file->eof,file->eoa));
+ /* Set return value */
+ ret_value=MAX(file->eof,file->eoa);
+
+done:
+ FUNC_LEAVE(ret_value);
} /* end H5FD_mpiposix_get_eof() */
diff --git a/src/H5FDsec2.c b/src/H5FDsec2.c
index bd2ca96..246e486 100644
--- a/src/H5FDsec2.c
+++ b/src/H5FDsec2.c
@@ -202,12 +202,18 @@ H5FL_DEFINE_STATIC(H5FD_sec2_t);
hid_t
H5FD_sec2_init(void)
{
+ hid_t ret_value=H5FD_SEC2_g; /* Return value */
+
FUNC_ENTER_NOAPI(H5FD_sec2_init, FAIL);
if (H5I_VFL!=H5I_get_type(H5FD_SEC2_g))
H5FD_SEC2_g = H5FDregister(&H5FD_sec2_g);
- FUNC_LEAVE(H5FD_SEC2_g);
+ /* Set return value */
+ ret_value=H5FD_SEC2_g;
+
+done:
+ FUNC_LEAVE(ret_value);
}
@@ -455,6 +461,7 @@ H5FD_sec2_query(const H5FD_t UNUSED * _f, unsigned long *flags /* out */)
*flags|=H5FD_FEAT_AGGREGATE_SMALLDATA; /* OK to aggregate "small" raw data allocations */
}
+done:
FUNC_LEAVE(ret_value);
}
@@ -481,10 +488,15 @@ static haddr_t
H5FD_sec2_get_eoa(H5FD_t *_file)
{
H5FD_sec2_t *file = (H5FD_sec2_t*)_file;
+ haddr_t ret_value; /* Return value */
FUNC_ENTER_NOAPI(H5FD_sec2_get_eoa, HADDR_UNDEF);
- FUNC_LEAVE(file->eoa);
+ /* Set return value */
+ ret_value=file->eoa;
+
+done:
+ FUNC_LEAVE(ret_value);
}
@@ -510,12 +522,14 @@ static herr_t
H5FD_sec2_set_eoa(H5FD_t *_file, haddr_t addr)
{
H5FD_sec2_t *file = (H5FD_sec2_t*)_file;
+ herr_t ret_value=SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(H5FD_sec2_set_eoa, FAIL);
file->eoa = addr;
- FUNC_LEAVE(SUCCEED);
+done:
+ FUNC_LEAVE(ret_value);
}
@@ -543,10 +557,15 @@ static haddr_t
H5FD_sec2_get_eof(H5FD_t *_file)
{
H5FD_sec2_t *file = (H5FD_sec2_t*)_file;
+ haddr_t ret_value; /* Return value */
FUNC_ENTER_NOAPI(H5FD_get_get_eof, HADDR_UNDEF);
- FUNC_LEAVE(MAX(file->eof, file->eoa));
+ /* Set return value */
+ ret_value=MAX(file->eof, file->eoa);
+
+done:
+ FUNC_LEAVE(ret_value);
}
diff --git a/src/H5FDsrb.c b/src/H5FDsrb.c
index c9a33eb..7408c5b 100644
--- a/src/H5FDsrb.c
+++ b/src/H5FDsrb.c
@@ -162,12 +162,18 @@ static int interface_initialize_g = 0;
hid_t
H5FD_srb_init(void)
{
+ hid_t ret_value=H5FD_SRB_g; /* Return value */
+
FUNC_ENTER_NOAPI(H5FD_srb_init, FAIL);
if(H5I_VFL != H5Iget_type(H5FD_SRB_g))
H5FD_SRB_g = H5FDregister(&H5FD_srb_g);
- FUNC_LEAVE(H5FD_SRB_g);
+ /* Set return value */
+ ret_value=H5FD_SRB_g;
+
+done:
+ FUNC_LEAVE(ret_value);
}
@@ -422,6 +428,7 @@ static herr_t
H5FD_srb_close(H5FD_t *_file)
{
H5FD_srb_t *file = (H5FD_srb_t *)_file;
+ herr_t ret_value=SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(H5FD_srb_close, FAIL);
@@ -430,7 +437,8 @@ H5FD_srb_close(H5FD_t *_file)
H5MM_xfree(file);
- FUNC_LEAVE(SUCCEED);
+done:
+ FUNC_LEAVE(ret_value);
}
@@ -454,6 +462,8 @@ H5FD_srb_close(H5FD_t *_file)
static herr_t
H5FD_srb_query(const UNUSED H5FD_t *_f, unsigned long *flags /* out */)
{
+ herr_t ret_value=SUCCEED; /* Return value */
+
FUNC_ENTER_NOAPI(H5FD_srb_query, FAIL);
/* Set the VFL feature flags that this driver supports */
@@ -463,7 +473,8 @@ H5FD_srb_query(const UNUSED H5FD_t *_f, unsigned long *flags /* out */)
*flags|=H5FD_FEAT_AGGREGATE_SMALLDATA; /* OK to aggregate "small" raw data allocations */
}
- FUNC_LEAVE(SUCCEED);
+done:
+ FUNC_LEAVE(ret_value);
}
@@ -488,10 +499,15 @@ static haddr_t
H5FD_srb_get_eoa(H5FD_t *_file)
{
H5FD_srb_t *file = (H5FD_srb_t *)_file;
+ haddr_t ret_value; /* Return value */
FUNC_ENTER_NOAPI(H5FD_srb_get_eoa, HADDR_UNDEF);
- FUNC_LEAVE(file->eoa);
+ /* Set return value */
+ ret_value=file->eoa;
+
+done:
+ FUNC_LEAVE(ret_value);
}
@@ -517,12 +533,14 @@ static herr_t
H5FD_srb_set_eoa(H5FD_t *_file, haddr_t addr)
{
H5FD_srb_t *file = (H5FD_srb_t *)_file;
+ herr_t ret_value=SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(H5FD_srb_set_eoa, FAIL);
file->eoa = addr;
- FUNC_LEAVE(SUCCEED);
+done:
+ FUNC_LEAVE(ret_value);
}
@@ -546,10 +564,15 @@ static haddr_t
H5FD_srb_get_eof(H5FD_t *_file)
{
H5FD_srb_t *file = (H5FD_srb_t *)_file;
+ haddr_t ret_value; /* Return value */
FUNC_ENTER_NOAPI(H5FD_srb_get_eof, HADDR_UNDEF);
- FUNC_LEAVE(file->eof);
+ /* Set return value */
+ ret_value=file->eof;
+
+done:
+ FUNC_LEAVE(ret_value);
}
diff --git a/src/H5FDstream.c b/src/H5FDstream.c
index 60907f6..31f278d 100644
--- a/src/H5FDstream.c
+++ b/src/H5FDstream.c
@@ -219,6 +219,8 @@ static int interface_initialize_g = 0;
*/
hid_t H5FD_stream_init (void)
{
+ hid_t ret_value=H5FD_STREAM_g; /* Return value */
+
FUNC_ENTER_NOAPI(H5FD_stream_init, FAIL);
if (H5I_VFL != H5Iget_type (H5FD_STREAM_g)) {
@@ -233,7 +235,11 @@ hid_t H5FD_stream_init (void)
#endif
}
- FUNC_LEAVE (H5FD_STREAM_g);
+ /* Set return value */
+ ret_value=H5FD_STREAM_g;
+
+done:
+ FUNC_LEAVE(ret_value);
}
@@ -346,7 +352,7 @@ H5FD_stream_fapl_get (H5FD_t *_stream)
{
H5FD_stream_t *stream = (H5FD_stream_t *) _stream;
H5FD_stream_fapl_t *fapl;
- H5FD_t *ret_value;
+ void *ret_value;
FUNC_ENTER_NOAPI(H5FD_stream_fapl_get, NULL);
@@ -381,9 +387,9 @@ H5FD_stream_open_socket (const char *filename, int o_flags,
/* Parse "hostname:port" from filename argument */
for (separator = filename; *separator != ':' && *separator; separator++)
;
- if (separator == filename || !*separator)
+ if (separator == filename || !*separator) {
HGOTO_ERROR(H5E_ARGS,H5E_BADVALUE,H5FD_STREAM_INVALID_SOCKET,"invalid host address");
- else {
+ } else {
tmp = separator;
if (! tmp[1])
HGOTO_ERROR(H5E_ARGS,H5E_BADVALUE,H5FD_STREAM_INVALID_SOCKET,"no port number");
@@ -407,9 +413,9 @@ H5FD_stream_open_socket (const char *filename, int o_flags,
server.sin_family = AF_INET;
server.sin_port = htons (fapl->port);
- if (! (he = gethostbyname (hostname)))
+ if (! (he = gethostbyname (hostname))) {
HGOTO_ERROR(H5E_RESOURCE,H5E_NOSPACE,H5FD_STREAM_INVALID_SOCKET,"unable to get host address");
- else if (H5FD_STREAM_ERROR_CHECK (sock = socket (AF_INET, SOCK_STREAM, 0)))
+ } else if (H5FD_STREAM_ERROR_CHECK (sock = socket (AF_INET, SOCK_STREAM, 0)))
HGOTO_ERROR(H5E_RESOURCE,H5E_NOSPACE,H5FD_STREAM_INVALID_SOCKET,"unable to open socket");
if (O_RDONLY == o_flags) {
@@ -423,15 +429,15 @@ H5FD_stream_open_socket (const char *filename, int o_flags,
}
else {
server.sin_addr.s_addr = INADDR_ANY;
- if (H5FD_STREAM_IOCTL_SOCKET (sock, FIONBIO, &on) < 0)
+ if (H5FD_STREAM_IOCTL_SOCKET (sock, FIONBIO, &on) < 0) {
HGOTO_ERROR(H5E_RESOURCE,H5E_NOSPACE,H5FD_STREAM_INVALID_SOCKET,"unable to set non-blocking mode for socket");
- else if (setsockopt (sock, IPPROTO_TCP, TCP_NODELAY, (const char *) &on,
- sizeof(on)) < 0)
+ } else if (setsockopt (sock, IPPROTO_TCP, TCP_NODELAY, (const char *) &on,
+ sizeof(on)) < 0) {
HGOTO_ERROR(H5E_RESOURCE,H5E_NOSPACE,H5FD_STREAM_INVALID_SOCKET,"unable to set socket option TCP_NODELAY");
- else if (setsockopt (sock, SOL_SOCKET, SO_REUSEADDR, (const char *) &on,
- sizeof(on)) < 0)
+ } else if (setsockopt (sock, SOL_SOCKET, SO_REUSEADDR, (const char *) &on,
+ sizeof(on)) < 0) {
HGOTO_ERROR(H5E_RESOURCE,H5E_NOSPACE,H5FD_STREAM_INVALID_SOCKET,"unable to set socket option SO_REUSEADDR");
- else {
+ } else {
/* Try to bind the socket to the given port.
If maxhunt is given try some successive ports also. */
first_port = fapl->port;
@@ -558,7 +564,7 @@ H5FD_stream_open (const char *filename,
#ifdef WIN32
WSADATA wsadata;
#endif
- H5P_genplist_t *plist; /* Property list pointer */
+ H5P_genplist_t *plist=NULL; /* Property list pointer */
H5FD_t *ret_value; /* Function return value */
FUNC_ENTER_NOAPI(H5FD_stream_open, NULL);
@@ -695,6 +701,7 @@ H5FD_stream_flush (H5FD_t *_stream, unsigned UNUSED closing)
struct sockaddr from;
socklen_t fromlen;
H5FD_STREAM_SOCKET_TYPE sock;
+ herr_t ret_value=SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(H5FD_stream_flush, FAIL);
@@ -735,7 +742,8 @@ H5FD_stream_flush (H5FD_t *_stream, unsigned UNUSED closing)
stream->dirty = FALSE;
}
- FUNC_LEAVE (SUCCEED);
+done:
+ FUNC_LEAVE (ret_value);
}
@@ -797,9 +805,11 @@ done:
*-------------------------------------------------------------------------
*/
static herr_t
-H5FD_stream_query(const H5FD_t * UNUSED _f,
+H5FD_stream_query(const H5FD_t UNUSED * _f,
unsigned long *flags/*out*/)
{
+ herr_t ret_value=SUCCEED; /* Return value */
+
FUNC_ENTER_NOAPI(H5FD_stream_query, SUCCEED);
/* Set the VFL feature flags that this driver supports */
@@ -810,7 +820,8 @@ H5FD_stream_query(const H5FD_t * UNUSED _f,
*flags|=H5FD_FEAT_AGGREGATE_SMALLDATA; /* OK to aggregate "small" raw data allocations */
}
- FUNC_LEAVE (SUCCEED);
+done:
+ FUNC_LEAVE (ret_value);
}
@@ -835,10 +846,15 @@ static haddr_t
H5FD_stream_get_eoa (H5FD_t *_stream)
{
H5FD_stream_t *stream = (H5FD_stream_t *) _stream;
+ haddr_t ret_value; /* Return value */
FUNC_ENTER_NOAPI(H5FD_stream_get_eoa, HADDR_UNDEF);
- FUNC_LEAVE (stream->eoa);
+ /* Set return value */
+ ret_value=stream->eoa;
+
+done:
+ FUNC_LEAVE (ret_value);
}
@@ -900,10 +916,15 @@ static haddr_t
H5FD_stream_get_eof (H5FD_t *_stream)
{
H5FD_stream_t *stream = (H5FD_stream_t *) _stream;
+ haddr_t ret_value; /* Return value */
FUNC_ENTER_NOAPI(H5FD_stream_get_eof, HADDR_UNDEF);
- FUNC_LEAVE (MAX (stream->eof, stream->eoa));
+ /* Set return value */
+ ret_value= MAX (stream->eof, stream->eoa);
+
+done:
+ FUNC_LEAVE (ret_value);
}
diff --git a/src/H5FL.c b/src/H5FL.c
index 4045079..7e002ad 100644
--- a/src/H5FL.c
+++ b/src/H5FL.c
@@ -202,6 +202,7 @@ void *
H5FL_reg_free(H5FL_reg_head_t *head, void *obj)
{
H5FL_reg_node_t *temp; /* Temp. ptr to the new free list node allocated */
+ void *ret_value=NULL; /* Return value */
FUNC_ENTER_NOAPI(H5FL_reg_free, NULL);
@@ -241,7 +242,8 @@ H5FL_reg_free(H5FL_reg_head_t *head, void *obj)
if(H5FL_reg_gc_head.mem_freed>H5FL_reg_glb_mem_lim)
H5FL_reg_gc();
- FUNC_LEAVE(NULL);
+done:
+ FUNC_LEAVE(ret_value);
} /* end H5FL_reg_free() */
@@ -733,6 +735,7 @@ H5FL_blk_free(H5FL_blk_head_t *head, void *block)
H5FL_blk_node_t *free_list; /* The free list of nodes of correct size */
H5FL_blk_list_t *temp; /* Temp. ptr to the new free list node allocated */
size_t free_size; /* Size of the block freed */
+ void *ret_value=NULL; /* Return value */
FUNC_ENTER_NOAPI(H5FL_blk_free, NULL);
@@ -774,7 +777,8 @@ H5FL_blk_free(H5FL_blk_head_t *head, void *block)
if(H5FL_blk_gc_head.mem_freed>H5FL_blk_glb_mem_lim)
H5FL_blk_gc();
- FUNC_LEAVE(NULL);
+done:
+ FUNC_LEAVE(ret_value);
} /* end H5FL_blk_free() */
@@ -1279,6 +1283,7 @@ H5FL_arr_realloc(H5FL_arr_head_t *head, void * obj, size_t new_elem)
ret_value=H5FL_blk_realloc(&(head->u.queue),obj,head->size*new_elem);
} /* end else */
+done:
FUNC_LEAVE (ret_value);
} /* end H5FL_arr_realloc() */
@@ -1565,6 +1570,7 @@ H5FL_set_free_list_limits(int reg_global_lim, int reg_list_lim, int arr_global_l
/* limit on each block free list */
H5FL_blk_lst_mem_lim=(blk_list_lim==-1 ? UINT_MAX : (size_t)blk_list_lim);
+done:
FUNC_LEAVE(ret_value);
} /* end H5FL_set_free_list_limits() */
diff --git a/src/H5Fistore.c b/src/H5Fistore.c
index 7780b2d..ffcabf3 100644
--- a/src/H5Fistore.c
+++ b/src/H5Fistore.c
@@ -258,6 +258,7 @@ H5F_istore_decode_key(H5F_t UNUSED *f, H5B_t *bt, uint8_t *raw, void *_key)
H5F_istore_key_t *key = (H5F_istore_key_t *) _key;
int i;
int ndims = H5F_ISTORE_NDIMS(bt);
+ herr_t ret_value=SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(H5F_istore_decode_key, FAIL);
@@ -271,11 +272,11 @@ H5F_istore_decode_key(H5F_t UNUSED *f, H5B_t *bt, uint8_t *raw, void *_key)
/* decode */
UINT32DECODE(raw, key->nbytes);
UINT32DECODE(raw, key->filter_mask);
- for (i=0; i<ndims; i++) {
+ for (i=0; i<ndims; i++)
UINT64DECODE(raw, key->offset[i]);
- }
- FUNC_LEAVE(SUCCEED);
+done:
+ FUNC_LEAVE(ret_value);
}
@@ -299,6 +300,7 @@ H5F_istore_encode_key(H5F_t UNUSED *f, H5B_t *bt, uint8_t *raw, void *_key)
H5F_istore_key_t *key = (H5F_istore_key_t *) _key;
int ndims = H5F_ISTORE_NDIMS(bt);
int i;
+ herr_t ret_value=SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(H5F_istore_encode_key, FAIL);
@@ -312,11 +314,11 @@ H5F_istore_encode_key(H5F_t UNUSED *f, H5B_t *bt, uint8_t *raw, void *_key)
/* encode */
UINT32ENCODE(raw, key->nbytes);
UINT32ENCODE(raw, key->filter_mask);
- for (i=0; i<ndims; i++) {
+ for (i=0; i<ndims; i++)
UINT64ENCODE(raw, key->offset[i]);
- }
- FUNC_LEAVE(SUCCEED);
+done:
+ FUNC_LEAVE(ret_value);
}
@@ -341,6 +343,7 @@ H5F_istore_debug_key (FILE *stream, int indent, int fwidth,
const H5F_istore_key_t *key = (const H5F_istore_key_t *)_key;
const H5F_istore_ud1_t *udata = (const H5F_istore_ud1_t *)_udata;
unsigned u;
+ herr_t ret_value=SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(H5F_istore_debug_key, FAIL);
@@ -352,12 +355,12 @@ H5F_istore_debug_key (FILE *stream, int indent, int fwidth,
"Filter mask:", key->filter_mask);
HDfprintf(stream, "%*s%-*s {", indent, "", fwidth,
"Logical offset:");
- for (u=0; u<udata->mesg.ndims; u++) {
+ for (u=0; u<udata->mesg.ndims; u++)
HDfprintf (stream, "%s%Hd", u?", ":"", key->offset[u]);
- }
HDfputs ("}\n", stream);
- FUNC_LEAVE (SUCCEED);
+done:
+ FUNC_LEAVE (ret_value);
}
@@ -389,7 +392,7 @@ H5F_istore_cmp2(H5F_t UNUSED *f, void *_lt_key, void *_udata,
H5F_istore_key_t *lt_key = (H5F_istore_key_t *) _lt_key;
H5F_istore_key_t *rt_key = (H5F_istore_key_t *) _rt_key;
H5F_istore_ud1_t *udata = (H5F_istore_ud1_t *) _udata;
- int cmp;
+ int ret_value;
FUNC_ENTER_NOAPI(H5F_istore_cmp2, FAIL);
@@ -399,9 +402,10 @@ H5F_istore_cmp2(H5F_t UNUSED *f, void *_lt_key, void *_udata,
assert(udata->mesg.ndims > 0 && udata->mesg.ndims <= H5O_LAYOUT_NDIMS);
/* Compare the offsets but ignore the other fields */
- cmp = H5V_vector_cmp_s(udata->mesg.ndims, lt_key->offset, rt_key->offset);
+ ret_value = H5V_vector_cmp_s(udata->mesg.ndims, lt_key->offset, rt_key->offset);
- FUNC_LEAVE(cmp);
+done:
+ FUNC_LEAVE(ret_value);
}
@@ -441,7 +445,7 @@ H5F_istore_cmp3(H5F_t UNUSED *f, void *_lt_key, void *_udata,
H5F_istore_key_t *lt_key = (H5F_istore_key_t *) _lt_key;
H5F_istore_key_t *rt_key = (H5F_istore_key_t *) _rt_key;
H5F_istore_ud1_t *udata = (H5F_istore_ud1_t *) _udata;
- int cmp = 0;
+ int ret_value = 0;
FUNC_ENTER_NOAPI(H5F_istore_cmp3, FAIL);
@@ -452,12 +456,14 @@ H5F_istore_cmp3(H5F_t UNUSED *f, void *_lt_key, void *_udata,
if (H5V_vector_lt_s(udata->mesg.ndims, udata->key.offset,
lt_key->offset)) {
- cmp = -1;
+ ret_value = -1;
} else if (H5V_vector_ge_s(udata->mesg.ndims, udata->key.offset,
rt_key->offset)) {
- cmp = 1;
+ ret_value = 1;
}
- FUNC_LEAVE(cmp);
+
+done:
+ FUNC_LEAVE(ret_value);
}
@@ -2210,6 +2216,7 @@ H5F_istore_debug(H5F_t *f, haddr_t addr, FILE * stream, int indent,
int fwidth, int ndims)
{
H5F_istore_ud1_t udata;
+ herr_t ret_value=SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(H5F_istore_debug, FAIL);
@@ -2218,7 +2225,8 @@ H5F_istore_debug(H5F_t *f, haddr_t addr, FILE * stream, int indent,
H5B_debug (f, addr, stream, indent, fwidth, H5B_ISTORE, &udata);
- FUNC_LEAVE (SUCCEED);
+done:
+ FUNC_LEAVE (ret_value);
}
@@ -2749,6 +2757,7 @@ H5F_istore_remove(H5F_t *f, haddr_t addr, void *_lt_key /*in,out */ ,
hbool_t *rt_key_changed /*out */ )
{
H5F_istore_key_t *lt_key = (H5F_istore_key_t *)_lt_key;
+ H5B_ins_t ret_value=H5B_INS_REMOVE; /* Return value */
FUNC_ENTER_NOAPI(H5F_istore_remove,H5B_INS_ERROR);
@@ -2756,7 +2765,8 @@ H5F_istore_remove(H5F_t *f, haddr_t addr, void *_lt_key /*in,out */ ,
*lt_key_changed = FALSE;
*rt_key_changed = FALSE;
- FUNC_LEAVE(H5B_INS_REMOVE);
+done:
+ FUNC_LEAVE(ret_value);
}
diff --git a/src/H5G.c b/src/H5G.c
index fb30a3a..d12f5e3 100644
--- a/src/H5G.c
+++ b/src/H5G.c
@@ -1513,6 +1513,8 @@ done:
H5G_t *
H5G_reopen(H5G_t *grp)
{
+ H5G_t *ret_value; /* Return value */
+
FUNC_ENTER_NOAPI(H5G_reopen, NULL);
assert(grp);
@@ -1520,7 +1522,11 @@ H5G_reopen(H5G_t *grp)
grp->nref++;
- FUNC_LEAVE(grp);
+ /* Set return value */
+ ret_value=grp;
+
+done:
+ FUNC_LEAVE(ret_value);
}
@@ -1587,10 +1593,17 @@ done:
H5G_t *
H5G_rootof(H5F_t *f)
{
+ H5G_t *ret_value; /* Return value */
+
FUNC_ENTER_NOAPI(H5G_rootof, NULL);
while (f->mtab.parent)
f = f->mtab.parent;
- FUNC_LEAVE(f->shared->root_grp);
+
+ /* Set return value */
+ ret_value=f->shared->root_grp;
+
+done:
+ FUNC_LEAVE(ret_value);
}
@@ -1788,7 +1801,7 @@ H5G_entry_t *
H5G_loc (hid_t loc_id)
{
H5F_t *f;
- H5G_entry_t *ret_value;
+ H5G_entry_t *ret_value=NULL;
H5G_t *group=NULL;
H5T_t *dt=NULL;
H5D_t *dset=NULL;
diff --git a/src/H5Gent.c b/src/H5Gent.c
index c973400..bcc40d8 100644
--- a/src/H5Gent.c
+++ b/src/H5Gent.c
@@ -80,6 +80,8 @@ done:
herr_t
H5G_ent_modified(H5G_entry_t *ent, H5G_type_t cache_type)
{
+ herr_t ret_value=SUCCEED; /* Return value */
+
FUNC_ENTER_NOAPI(H5G_ent_modified, FAIL);
assert(ent);
@@ -88,7 +90,8 @@ H5G_ent_modified(H5G_entry_t *ent, H5G_type_t cache_type)
ent->type = cache_type;
ent->dirty = TRUE;
- FUNC_LEAVE(SUCCEED);
+done:
+ FUNC_LEAVE(ret_value);
}
@@ -166,6 +169,7 @@ H5G_ent_decode(H5F_t *f, const uint8_t **pp, H5G_entry_t *ent)
{
const uint8_t *p_ret = *pp;
uint32_t tmp;
+ herr_t ret_value=SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(H5G_ent_decode, FAIL);
@@ -203,8 +207,11 @@ H5G_ent_decode(H5F_t *f, const uint8_t **pp, H5G_entry_t *ent)
}
*pp = p_ret + H5G_SIZEOF_ENTRY(f);
- FUNC_LEAVE(SUCCEED);
+
+done:
+ FUNC_LEAVE(ret_value);
}
+
/*-------------------------------------------------------------------------
* Function: H5G_ent_encode_vec
@@ -282,6 +289,7 @@ herr_t
H5G_ent_encode(H5F_t *f, uint8_t **pp, const H5G_entry_t *ent)
{
uint8_t *p_ret = *pp + H5G_SIZEOF_ENTRY(f);
+ herr_t ret_value=SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(H5G_ent_encode, FAIL);
@@ -325,8 +333,10 @@ H5G_ent_encode(H5F_t *f, uint8_t **pp, const H5G_entry_t *ent)
while (*pp < p_ret) *(*pp)++ = 0;
*pp = p_ret;
- FUNC_LEAVE(SUCCEED);
+done:
+ FUNC_LEAVE(ret_value);
}
+
/*-------------------------------------------------------------------------
* Function: H5G_ent_debug
@@ -351,6 +361,7 @@ H5G_ent_debug(H5F_t UNUSED *f, const H5G_entry_t *ent, FILE * stream,
int indent, int fwidth, haddr_t heap)
{
const char *lval = NULL;
+ herr_t ret_value=SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(H5G_ent_debug, FAIL);
@@ -399,5 +410,6 @@ H5G_ent_debug(H5F_t UNUSED *f, const H5G_entry_t *ent, FILE * stream,
break;
}
- FUNC_LEAVE(SUCCEED);
+done:
+ FUNC_LEAVE(ret_value);
}
diff --git a/src/H5Gnode.c b/src/H5Gnode.c
index 3c76e28..90623c3 100644
--- a/src/H5Gnode.c
+++ b/src/H5Gnode.c
@@ -152,6 +152,7 @@ static herr_t
H5G_node_decode_key(H5F_t *f, H5B_t UNUSED *bt, uint8_t *raw, void *_key)
{
H5G_node_key_t *key = (H5G_node_key_t *) _key;
+ herr_t ret_value=SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(H5G_node_decode_key, FAIL);
@@ -161,7 +162,8 @@ H5G_node_decode_key(H5F_t *f, H5B_t UNUSED *bt, uint8_t *raw, void *_key)
H5F_DECODE_LENGTH(f, raw, key->offset);
- FUNC_LEAVE(SUCCEED);
+done:
+ FUNC_LEAVE(ret_value);
}
@@ -184,6 +186,7 @@ static herr_t
H5G_node_encode_key(H5F_t *f, H5B_t UNUSED *bt, uint8_t *raw, void *_key)
{
H5G_node_key_t *key = (H5G_node_key_t *) _key;
+ herr_t ret_value=SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(H5G_node_encode_key, FAIL);
@@ -193,7 +196,8 @@ H5G_node_encode_key(H5F_t *f, H5B_t UNUSED *bt, uint8_t *raw, void *_key)
H5F_ENCODE_LENGTH(f, raw, key->offset);
- FUNC_LEAVE(SUCCEED);
+done:
+ FUNC_LEAVE(ret_value);
}
diff --git a/src/H5I.c b/src/H5I.c
index 9f4619d..01d2e20 100644
--- a/src/H5I.c
+++ b/src/H5I.c
@@ -81,8 +81,6 @@ static herr_t H5I_debug(H5I_type_t grp);
static herr_t
H5I_init_interface(void)
{
- herr_t ret_value = SUCCEED;
-
FUNC_ENTER_NOINIT(H5I_init_interface);
/*
@@ -91,7 +89,7 @@ H5I_init_interface(void)
*/
assert(H5I_NGROUPS<=(1<<GROUP_BITS));
- FUNC_LEAVE(ret_value);
+ FUNC_LEAVE(SUCCEED);
}
@@ -635,6 +633,7 @@ H5I_object(hid_t id)
ret_value = id_ptr->obj_ptr;
} /* end if */
+done:
FUNC_LEAVE(ret_value);
}
@@ -673,6 +672,7 @@ H5I_object_verify(hid_t id, H5I_type_t id_type)
ret_value = id_ptr->obj_ptr;
} /* end if */
+done:
FUNC_LEAVE(ret_value);
} /* H5I_object_verify() */
@@ -708,6 +708,7 @@ H5I_get_type(hid_t id)
assert(ret_value>=H5I_BADID && ret_value<H5I_NGROUPS);
+done:
FUNC_LEAVE(ret_value);
}
diff --git a/src/H5O.c b/src/H5O.c
index 8dbe243..324d28d 100644
--- a/src/H5O.c
+++ b/src/H5O.c
@@ -236,6 +236,8 @@ done:
herr_t
H5O_open(H5G_entry_t *obj_ent)
{
+ herr_t ret_value=SUCCEED; /* Return value */
+
FUNC_ENTER_NOAPI(H5O_open, FAIL);
/* Check args */
@@ -250,7 +252,8 @@ H5O_open(H5G_entry_t *obj_ent)
/* Increment open-lock counters */
obj_ent->file->nopen_objs++;
- FUNC_LEAVE(SUCCEED);
+done:
+ FUNC_LEAVE(ret_value);
}
@@ -271,6 +274,8 @@ H5O_open(H5G_entry_t *obj_ent)
herr_t
H5O_close(H5G_entry_t *obj_ent)
{
+ herr_t ret_value=SUCCEED; /* Return value */
+
FUNC_ENTER_NOAPI(H5O_close, FAIL);
/* Check args */
@@ -301,7 +306,8 @@ H5O_close(H5G_entry_t *obj_ent)
if (0==obj_ent->file->nopen_objs && obj_ent->file->closing)
H5I_dec_ref(obj_ent->file->closing);
- FUNC_LEAVE(SUCCEED);
+done:
+ FUNC_LEAVE(ret_value);
}
@@ -745,6 +751,8 @@ done:
void *
H5O_free (const H5O_class_t *type, void *mesg)
{
+ void * ret_value=NULL; /* Return value */
+
FUNC_ENTER_NOAPI(H5O_free, NULL);
if (mesg) {
@@ -755,7 +763,8 @@ H5O_free (const H5O_class_t *type, void *mesg)
H5MM_xfree (mesg);
}
- FUNC_LEAVE (NULL);
+done:
+ FUNC_LEAVE (ret_value);
}
diff --git a/src/H5Oattr.c b/src/H5Oattr.c
index 1ec7a3f..40da90a 100644
--- a/src/H5Oattr.c
+++ b/src/H5Oattr.c
@@ -342,6 +342,7 @@ H5O_attr_size(H5F_t UNUSED *f, const void *mesg)
H5O_ALIGN(attr->ds_size) + /*data space */
attr->data_size; /*the data itself */
+done:
FUNC_LEAVE(ret_value);
}
@@ -406,6 +407,7 @@ H5O_attr_debug(H5F_t *f, const void *_mesg, FILE * stream, int indent,
int fwidth)
{
const H5A_t *mesg = (const H5A_t *)_mesg;
+ herr_t ret_value=SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(H5O_attr_debug, FAIL);
@@ -440,5 +442,6 @@ H5O_attr_debug(H5F_t *f, const void *_mesg, FILE * stream, int indent,
fprintf(stream, "%*sData space...\n", indent, "");
H5S_debug(f, mesg->ds, stream, indent+3, MAX(0, fwidth-3));
- FUNC_LEAVE(SUCCEED);
+done:
+ FUNC_LEAVE(ret_value);
}
diff --git a/src/H5Ocomp.c b/src/H5Ocomp.c
index fdfb0c5..8899c34 100644
--- a/src/H5Ocomp.c
+++ b/src/H5Ocomp.c
@@ -166,6 +166,7 @@ H5O_pline_encode (H5F_t UNUSED *f, uint8_t *p/*out*/, const void *mesg)
size_t i, j, name_length;
const char *name=NULL;
H5Z_class_t *cls=NULL;
+ herr_t ret_value=SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(H5O_pline_encode, FAIL);
@@ -210,7 +211,8 @@ H5O_pline_encode (H5F_t UNUSED *f, uint8_t *p/*out*/, const void *mesg)
UINT32ENCODE(p, 0);
}
- FUNC_LEAVE (SUCCEED);
+done:
+ FUNC_LEAVE (ret_value);
}
@@ -313,6 +315,7 @@ H5O_pline_size (H5F_t UNUSED *f, const void *mesg)
size_t i, size, name_len;
const char *name = NULL;
H5Z_class_t *cls = NULL;
+ size_t ret_value; /* Return value */
FUNC_ENTER_NOAPI(H5O_pline_size, 0);
@@ -340,7 +343,11 @@ H5O_pline_size (H5F_t UNUSED *f, const void *mesg)
size += 4;
}
- FUNC_LEAVE (size);
+ /* Set return value */
+ ret_value=size;
+
+done:
+ FUNC_LEAVE (ret_value);
}
@@ -364,6 +371,7 @@ H5O_pline_reset (void *mesg)
{
H5O_pline_t *pline = (H5O_pline_t*)mesg;
size_t i;
+ herr_t ret_value=SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(H5O_pline_reset, FAIL);
@@ -376,7 +384,8 @@ H5O_pline_reset (void *mesg)
H5MM_xfree(pline->filter);
HDmemset(pline, 0, sizeof *pline);
- FUNC_LEAVE (SUCCEED);
+done:
+ FUNC_LEAVE (ret_value);
}
@@ -397,13 +406,16 @@ H5O_pline_reset (void *mesg)
static herr_t
H5O_pline_free (void *mesg)
{
+ herr_t ret_value=SUCCEED; /* Return value */
+
FUNC_ENTER_NOAPI(H5O_pline_free, FAIL);
assert (mesg);
H5FL_FREE(H5O_pline_t,mesg);
- FUNC_LEAVE (SUCCEED);
+done:
+ FUNC_LEAVE (ret_value);
}
@@ -429,6 +441,7 @@ H5O_pline_debug (H5F_t UNUSED *f, const void *mesg, FILE *stream,
{
const H5O_pline_t *pline = (const H5O_pline_t *)mesg;
size_t i, j;
+ herr_t ret_value=SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(H5O_pline_debug, FAIL);
@@ -474,5 +487,6 @@ H5O_pline_debug (H5F_t UNUSED *f, const void *mesg, FILE *stream,
}
}
- FUNC_LEAVE(SUCCEED);
+done:
+ FUNC_LEAVE(ret_value);
}
diff --git a/src/H5Ocont.c b/src/H5Ocont.c
index 95e9ff9..ba6ab5f 100644
--- a/src/H5Ocont.c
+++ b/src/H5Ocont.c
@@ -114,6 +114,7 @@ static herr_t
H5O_cont_encode(H5F_t *f, uint8_t *p, const void *_mesg)
{
const H5O_cont_t *cont = (const H5O_cont_t *) _mesg;
+ herr_t ret_value=SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(H5O_cont_encode, FAIL);
@@ -126,7 +127,8 @@ H5O_cont_encode(H5F_t *f, uint8_t *p, const void *_mesg)
H5F_addr_encode(f, &p, cont->addr);
H5F_ENCODE_LENGTH(f, p, cont->size);
- FUNC_LEAVE(SUCCEED);
+done:
+ FUNC_LEAVE(ret_value);
}
@@ -150,6 +152,7 @@ H5O_cont_debug(H5F_t UNUSED *f, const void *_mesg, FILE * stream,
int indent, int fwidth)
{
const H5O_cont_t *cont = (const H5O_cont_t *) _mesg;
+ herr_t ret_value=SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(H5O_cont_debug, FAIL);
@@ -170,5 +173,6 @@ H5O_cont_debug(H5F_t UNUSED *f, const void *_mesg, FILE * stream,
"Points to chunk number:",
(int) (cont->chunkno));
- FUNC_LEAVE(SUCCEED);
+done:
+ FUNC_LEAVE(ret_value);
}
diff --git a/src/H5Odtype.c b/src/H5Odtype.c
index abab4cf..772cac7 100644
--- a/src/H5Odtype.c
+++ b/src/H5Odtype.c
@@ -849,7 +849,7 @@ H5O_dtype_encode(H5F_t UNUSED *f, uint8_t *p, const void *mesg)
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTENCODE, FAIL, "can't encode type");
done:
- FUNC_LEAVE(SUCCEED);
+ FUNC_LEAVE(ret_value);
}
@@ -985,6 +985,7 @@ H5O_dtype_size(H5F_t *f, const void *mesg)
break;
}
+done:
FUNC_LEAVE(ret_value);
}
@@ -1043,13 +1044,16 @@ done:
static herr_t
H5O_dtype_free (void *mesg)
{
+ herr_t ret_value=SUCCEED; /* Return value */
+
FUNC_ENTER_NOAPI(H5O_dtype_free, FAIL);
assert (mesg);
H5FL_FREE(H5T_t,mesg);
- FUNC_LEAVE (SUCCEED);
+done:
+ FUNC_LEAVE (ret_value);
}
@@ -1111,6 +1115,7 @@ H5O_dtype_set_share (H5F_t UNUSED *f, void *_mesg/*in,out*/,
const H5O_shared_t *sh)
{
H5T_t *dt = (H5T_t *)_mesg;
+ herr_t ret_value=SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(H5O_dtype_set_share, FAIL);
@@ -1121,7 +1126,8 @@ H5O_dtype_set_share (H5F_t UNUSED *f, void *_mesg/*in,out*/,
dt->ent = sh->u.ent;
dt->state = H5T_STATE_NAMED;
- FUNC_LEAVE (SUCCEED);
+done:
+ FUNC_LEAVE (ret_value);
}
@@ -1153,6 +1159,7 @@ H5O_dtype_debug(H5F_t *f, const void *mesg, FILE *stream,
char buf[256];
int i;
size_t k;
+ herr_t ret_value=SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(H5O_dtype_debug, FAIL);
@@ -1411,5 +1418,6 @@ H5O_dtype_debug(H5F_t *f, const void *mesg, FILE *stream,
}
}
- FUNC_LEAVE(SUCCEED);
+done:
+ FUNC_LEAVE(ret_value);
}
diff --git a/src/H5Oefl.c b/src/H5Oefl.c
index 76ac990..eacdeb3 100644
--- a/src/H5Oefl.c
+++ b/src/H5Oefl.c
@@ -164,6 +164,7 @@ H5O_efl_encode(H5F_t *f, uint8_t *p, const void *_mesg)
{
const H5O_efl_t *mesg = (const H5O_efl_t *)_mesg;
int i;
+ herr_t ret_value=SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(H5O_efl_encode, FAIL);
@@ -202,7 +203,8 @@ H5O_efl_encode(H5F_t *f, uint8_t *p, const void *_mesg)
H5F_ENCODE_LENGTH (f, p, mesg->slot[i].size);
}
- FUNC_LEAVE(SUCCEED);
+done:
+ FUNC_LEAVE(ret_value);
}
@@ -302,6 +304,7 @@ H5O_efl_size(H5F_t *f, const void *_mesg)
H5F_SIZEOF_SIZE(f) + /*file offset */
H5F_SIZEOF_SIZE(f)); /*file size */
+done:
FUNC_LEAVE(ret_value);
}
@@ -326,6 +329,7 @@ H5O_efl_reset(void *_mesg)
{
H5O_efl_t *mesg = (H5O_efl_t *) _mesg;
int i;
+ herr_t ret_value=SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(H5O_efl_reset, FAIL);
@@ -339,7 +343,8 @@ H5O_efl_reset(void *_mesg)
mesg->nused = mesg->nalloc = 0;
mesg->slot = H5MM_xfree(mesg->slot);
- FUNC_LEAVE(SUCCEED);
+done:
+ FUNC_LEAVE(ret_value);
}
@@ -582,6 +587,7 @@ H5O_efl_debug(H5F_t UNUSED *f, const void *_mesg, FILE * stream,
const H5O_efl_t *mesg = (const H5O_efl_t *) _mesg;
char buf[64];
int i;
+ herr_t ret_value=SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(H5O_efl_debug, FAIL);
@@ -620,5 +626,6 @@ H5O_efl_debug(H5F_t UNUSED *f, const void *_mesg, FILE * stream,
(unsigned long)(mesg->slot[i].size));
}
- FUNC_LEAVE(SUCCEED);
+done:
+ FUNC_LEAVE(ret_value);
}
diff --git a/src/H5Ofill.c b/src/H5Ofill.c
index 697e920..ebf9753 100644
--- a/src/H5Ofill.c
+++ b/src/H5Ofill.c
@@ -216,6 +216,7 @@ static herr_t
H5O_fill_new_encode(H5F_t UNUSED *f, uint8_t *p, const void *_mesg)
{
const H5O_fill_new_t *mesg = (const H5O_fill_new_t *)_mesg;
+ herr_t ret_value=SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(H5O_fill_new_encode, FAIL);
@@ -240,7 +241,8 @@ H5O_fill_new_encode(H5F_t UNUSED *f, uint8_t *p, const void *_mesg)
HDmemcpy(p, mesg->buf, (size_t)mesg->size);
} /* end if */
- FUNC_LEAVE(SUCCEED);
+done:
+ FUNC_LEAVE(ret_value);
}
@@ -262,6 +264,7 @@ static herr_t
H5O_fill_encode(H5F_t UNUSED *f, uint8_t *p, const void *_mesg)
{
const H5O_fill_t *mesg = (const H5O_fill_t *)_mesg;
+ herr_t ret_value=SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(H5O_fill_encode, FAIL);
@@ -273,7 +276,8 @@ H5O_fill_encode(H5F_t UNUSED *f, uint8_t *p, const void *_mesg)
if(mesg->buf)
HDmemcpy(p, mesg->buf, mesg->size);
- FUNC_LEAVE(SUCCEED);
+done:
+ FUNC_LEAVE(ret_value);
}
@@ -441,6 +445,7 @@ H5O_fill_new_size(H5F_t UNUSED *f, const void *_mesg)
4 + /* Fill value size */
(mesg->size>0 ? mesg->size : 0); /* Size of fill value */
+done:
FUNC_LEAVE(ret_value);
}
@@ -467,13 +472,18 @@ static size_t
H5O_fill_size(H5F_t UNUSED *f, const void *_mesg)
{
const H5O_fill_t *mesg = (const H5O_fill_t *)_mesg;
+ size_t ret_value; /* Return value */
FUNC_ENTER_NOAPI(H5O_fill_size, 0);
assert(f);
assert(mesg);
- FUNC_LEAVE(4+mesg->size);
+ /* Set return value */
+ ret_value=4+mesg->size;
+
+done:
+ FUNC_LEAVE(ret_value);
}
@@ -497,6 +507,7 @@ static herr_t
H5O_fill_new_reset(void *_mesg)
{
H5O_fill_new_t *mesg = (H5O_fill_new_t *)_mesg;
+ herr_t ret_value=SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(H5O_fill_new_reset, FAIL);
@@ -513,7 +524,8 @@ H5O_fill_new_reset(void *_mesg)
mesg->fill_time = (H5D_fill_time_t)0;
mesg->fill_defined = (H5D_fill_value_t)0;
- FUNC_LEAVE(SUCCEED);
+done:
+ FUNC_LEAVE(ret_value);
}
@@ -535,6 +547,7 @@ static herr_t
H5O_fill_reset(void *_mesg)
{
H5O_fill_t *mesg = (H5O_fill_t *)_mesg;
+ herr_t ret_value=SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(H5O_fill_reset, FAIL);
@@ -548,7 +561,8 @@ H5O_fill_reset(void *_mesg)
mesg->type = NULL;
}
- FUNC_LEAVE(SUCCEED);
+done:
+ FUNC_LEAVE(ret_value);
}
@@ -571,6 +585,7 @@ H5O_fill_new_debug(H5F_t UNUSED *f, const void *_mesg, FILE *stream,
int indent, int fwidth)
{
const H5O_fill_new_t *mesg = (const H5O_fill_new_t *)_mesg;
+ herr_t ret_value=SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(H5O_fill_new_debug, FAIL);
@@ -590,7 +605,8 @@ H5O_fill_new_debug(H5F_t UNUSED *f, const void *_mesg, FILE *stream,
fprintf(stream, "<dataset type>\n");
}
- FUNC_LEAVE(SUCCEED);
+done:
+ FUNC_LEAVE(ret_value);
}
@@ -613,6 +629,7 @@ H5O_fill_debug(H5F_t UNUSED *f, const void *_mesg, FILE *stream,
int indent, int fwidth)
{
const H5O_fill_t *mesg = (const H5O_fill_t *)_mesg;
+ herr_t ret_value=SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(H5O_fill_debug, FAIL);
@@ -632,7 +649,8 @@ H5O_fill_debug(H5F_t UNUSED *f, const void *_mesg, FILE *stream,
fprintf(stream, "<dataset type>\n");
}
- FUNC_LEAVE(SUCCEED);
+done:
+ FUNC_LEAVE(ret_value);
}
diff --git a/src/H5Olayout.c b/src/H5Olayout.c
index a6dfdbc..7a65fb9 100644
--- a/src/H5Olayout.c
+++ b/src/H5Olayout.c
@@ -156,6 +156,7 @@ H5O_layout_encode(H5F_t *f, uint8_t *p, const void *_mesg)
{
const H5O_layout_t *mesg = (const H5O_layout_t *) _mesg;
unsigned u;
+ herr_t ret_value=SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(H5O_layout_encode, FAIL);
@@ -191,7 +192,8 @@ H5O_layout_encode(H5F_t *f, uint8_t *p, const void *_mesg)
for (u = 0; u < mesg->ndims; u++)
UINT32ENCODE(p, mesg->dim[u]);
- FUNC_LEAVE(SUCCEED);
+done:
+ FUNC_LEAVE(ret_value);
}
@@ -274,6 +276,7 @@ H5O_layout_size(H5F_t *f, const void *_mesg)
6 + /* reserved bytes */
mesg->ndims * 4; /* alignment */
+done:
FUNC_LEAVE(ret_value);
}
@@ -295,13 +298,16 @@ H5O_layout_size(H5F_t *f, const void *_mesg)
static herr_t
H5O_layout_free (void *mesg)
{
+ herr_t ret_value=SUCCEED; /* Return value */
+
FUNC_ENTER_NOAPI(H5O_layout_free, FAIL);
assert (mesg);
H5FL_FREE(H5O_layout_t,mesg);
- FUNC_LEAVE (SUCCEED);
+done:
+ FUNC_LEAVE (ret_value);
}
@@ -325,6 +331,7 @@ H5O_layout_debug(H5F_t UNUSED *f, const void *_mesg, FILE * stream,
{
const H5O_layout_t *mesg = (const H5O_layout_t *) _mesg;
unsigned u;
+ herr_t ret_value=SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(H5O_layout_debug, FAIL);
@@ -351,5 +358,6 @@ H5O_layout_debug(H5F_t UNUSED *f, const void *_mesg, FILE * stream,
}
HDfprintf(stream, "}\n");
- FUNC_LEAVE(SUCCEED);
+done:
+ FUNC_LEAVE(ret_value);
}
diff --git a/src/H5Omtime.c b/src/H5Omtime.c
index ff5020c..c8fcf5a 100644
--- a/src/H5Omtime.c
+++ b/src/H5Omtime.c
@@ -198,6 +198,7 @@ H5O_mtime_encode(H5F_t UNUSED *f, uint8_t *p, const void *_mesg)
{
const time_t *mesg = (const time_t *) _mesg;
struct tm *tm;
+ herr_t ret_value=SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(H5O_mtime_encode, FAIL);
@@ -212,7 +213,8 @@ H5O_mtime_encode(H5F_t UNUSED *f, uint8_t *p, const void *_mesg)
1900+tm->tm_year, 1+tm->tm_mon, tm->tm_mday,
tm->tm_hour, tm->tm_min, tm->tm_sec);
- FUNC_LEAVE(SUCCEED);
+done:
+ FUNC_LEAVE(ret_value);
}
@@ -282,13 +284,16 @@ done:
static size_t
H5O_mtime_size(H5F_t * UNUSED f, const void * UNUSED mesg)
{
+ size_t ret_value=16; /* Return value */
+
FUNC_ENTER_NOAPI(H5O_mtime_size, 0);
/* check args */
assert(f);
assert(mesg);
- FUNC_LEAVE(16);
+done:
+ FUNC_LEAVE(ret_value);
}
@@ -309,13 +314,16 @@ H5O_mtime_size(H5F_t * UNUSED f, const void * UNUSED mesg)
static herr_t
H5O_mtime_free (void *mesg)
{
+ herr_t ret_value=SUCCEED; /* Return value */
+
FUNC_ENTER_NOAPI(H5O_mtime_free, FAIL);
assert (mesg);
H5FL_FREE(time_t,mesg);
- FUNC_LEAVE (SUCCEED);
+done:
+ FUNC_LEAVE (ret_value);
}
@@ -341,6 +349,7 @@ H5O_mtime_debug(H5F_t UNUSED *f, const void *_mesg, FILE *stream,
const time_t *mesg = (const time_t *)_mesg;
struct tm *tm;
char buf[128];
+ herr_t ret_value=SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(H5O_mtime_debug, FAIL);
@@ -358,6 +367,7 @@ H5O_mtime_debug(H5F_t UNUSED *f, const void *_mesg, FILE *stream,
fprintf(stream, "%*s%-*s %s\n", indent, "", fwidth,
"Time:", buf);
- FUNC_LEAVE(SUCCEED);
+done:
+ FUNC_LEAVE(ret_value);
}
diff --git a/src/H5Oname.c b/src/H5Oname.c
index bbd4cb1..94514c9 100644
--- a/src/H5Oname.c
+++ b/src/H5Oname.c
@@ -121,6 +121,7 @@ static herr_t
H5O_name_encode(H5F_t UNUSED *f, uint8_t *p, const void *_mesg)
{
const H5O_name_t *mesg = (const H5O_name_t *) _mesg;
+ herr_t ret_value=SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(H5O_name_encode, FAIL);
@@ -132,7 +133,8 @@ H5O_name_encode(H5F_t UNUSED *f, uint8_t *p, const void *_mesg)
/* encode */
HDstrcpy((char*)p, mesg->s);
- FUNC_LEAVE(SUCCEED);
+done:
+ FUNC_LEAVE(ret_value);
}
@@ -205,7 +207,7 @@ static size_t
H5O_name_size(H5F_t UNUSED *f, const void *_mesg)
{
const H5O_name_t *mesg = (const H5O_name_t *) _mesg;
- size_t size;
+ size_t ret_value;
FUNC_ENTER_NOAPI(H5O_name_size, 0);
@@ -213,9 +215,10 @@ H5O_name_size(H5F_t UNUSED *f, const void *_mesg)
assert(f);
assert(mesg);
- size = mesg->s ? HDstrlen(mesg->s) + 1 : 0;
+ ret_value = mesg->s ? HDstrlen(mesg->s) + 1 : 0;
- FUNC_LEAVE(size);
+done:
+ FUNC_LEAVE(ret_value);
}
@@ -239,6 +242,7 @@ static herr_t
H5O_name_reset(void *_mesg)
{
H5O_name_t *mesg = (H5O_name_t *) _mesg;
+ herr_t ret_value=SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(H5O_name_reset, FAIL);
@@ -248,7 +252,8 @@ H5O_name_reset(void *_mesg)
/* reset */
mesg->s = H5MM_xfree(mesg->s);
- FUNC_LEAVE(SUCCEED);
+done:
+ FUNC_LEAVE(ret_value);
}
@@ -272,6 +277,7 @@ H5O_name_debug(H5F_t UNUSED *f, const void *_mesg, FILE *stream,
int indent, int fwidth)
{
const H5O_name_t *mesg = (const H5O_name_t *)_mesg;
+ herr_t ret_value=SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(H5O_name_debug, FAIL);
@@ -286,5 +292,6 @@ H5O_name_debug(H5F_t UNUSED *f, const void *_mesg, FILE *stream,
"Name:",
mesg->s);
- FUNC_LEAVE(SUCCEED);
+done:
+ FUNC_LEAVE(ret_value);
}
diff --git a/src/H5Osdspace.c b/src/H5Osdspace.c
index 9173615..1ff3a18 100644
--- a/src/H5Osdspace.c
+++ b/src/H5Osdspace.c
@@ -181,6 +181,7 @@ H5O_sdspace_encode(H5F_t *f, uint8_t *p, const void *mesg)
const H5S_simple_t *sdim = (const H5S_simple_t *) mesg;
unsigned u; /* Local counting variable */
unsigned flags = 0;
+ herr_t ret_value=SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(H5O_sdspace_encode, FAIL);
@@ -222,7 +223,8 @@ H5O_sdspace_encode(H5F_t *f, uint8_t *p, const void *mesg)
#endif
}
- FUNC_LEAVE(SUCCEED);
+done:
+ FUNC_LEAVE(ret_value);
}
@@ -328,6 +330,7 @@ H5O_sdspace_size(H5F_t *f, const void *mesg)
ret_value += space->perm ? space->rank * 4 : 0;
#endif
+done:
FUNC_LEAVE(ret_value);
}
@@ -351,12 +354,14 @@ static herr_t
H5O_sdspace_reset(void *_mesg)
{
H5S_simple_t *mesg = (H5S_simple_t*)_mesg;
+ herr_t ret_value=SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(H5O_sdspace_reset, FAIL);
H5S_release_simple(mesg);
- FUNC_LEAVE (SUCCEED);
+done:
+ FUNC_LEAVE (ret_value);
}
@@ -377,13 +382,16 @@ H5O_sdspace_reset(void *_mesg)
static herr_t
H5O_sdspace_free (void *mesg)
{
+ herr_t ret_value=SUCCEED; /* Return value */
+
FUNC_ENTER_NOAPI(H5O_sdspace_free, FAIL);
assert (mesg);
H5FL_FREE(H5S_simple_t,mesg);
- FUNC_LEAVE (SUCCEED);
+done:
+ FUNC_LEAVE (ret_value);
}
@@ -411,6 +419,7 @@ H5O_sdspace_debug(H5F_t UNUSED *f, const void *mesg,
{
const H5S_simple_t *sdim = (const H5S_simple_t *) mesg;
unsigned u; /* local counting variable */
+ herr_t ret_value=SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(H5O_sdspace_debug, FAIL);
@@ -455,5 +464,6 @@ H5O_sdspace_debug(H5F_t UNUSED *f, const void *mesg,
}
#endif
- FUNC_LEAVE(SUCCEED);
+done:
+ FUNC_LEAVE(ret_value);
}
diff --git a/src/H5Oshared.c b/src/H5Oshared.c
index 29e93bf..8a96e7b 100644
--- a/src/H5Oshared.c
+++ b/src/H5Oshared.c
@@ -137,6 +137,7 @@ H5O_shared_encode (H5F_t *f, uint8_t *buf/*out*/, const void *_mesg)
{
const H5O_shared_t *mesg = (const H5O_shared_t *)_mesg;
unsigned flags;
+ herr_t ret_value=SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(H5O_shared_encode, FAIL);
@@ -163,7 +164,8 @@ H5O_shared_encode (H5F_t *f, uint8_t *buf/*out*/, const void *_mesg)
H5G_ent_encode (f, &buf, &(mesg->u.ent));
}
- FUNC_LEAVE (SUCCEED);
+done:
+ FUNC_LEAVE (ret_value);
}
@@ -186,16 +188,17 @@ H5O_shared_encode (H5F_t *f, uint8_t *buf/*out*/, const void *_mesg)
static size_t
H5O_shared_size (H5F_t *f, const void UNUSED *_mesg)
{
- size_t size;
+ size_t ret_value;
FUNC_ENTER_NOAPI(H5O_shared_size, 0);
- size = 1 + /*the flags field */
+ ret_value = 1 + /*the flags field */
7 + /*reserved */
MAX (H5F_SIZEOF_ADDR(f)+4, /*sharing via global heap */
H5G_SIZEOF_ENTRY(f)); /*sharing by another obj hdr */
- FUNC_LEAVE (size);
+done:
+ FUNC_LEAVE (ret_value);
}
@@ -218,6 +221,7 @@ H5O_shared_debug (H5F_t UNUSED *f, const void *_mesg,
FILE *stream, int indent, int fwidth)
{
const H5O_shared_t *mesg = (const H5O_shared_t *)_mesg;
+ herr_t ret_value=SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(H5O_shared_debug, FAIL);
@@ -246,5 +250,6 @@ H5O_shared_debug (H5F_t UNUSED *f, const void *_mesg,
HADDR_UNDEF);
}
- FUNC_LEAVE (SUCCEED);
+done:
+ FUNC_LEAVE (ret_value);
}
diff --git a/src/H5Ostab.c b/src/H5Ostab.c
index 37f2d0e..1675c51 100644
--- a/src/H5Ostab.c
+++ b/src/H5Ostab.c
@@ -125,6 +125,7 @@ static herr_t
H5O_stab_encode(H5F_t *f, uint8_t *p, const void *_mesg)
{
const H5O_stab_t *stab = (const H5O_stab_t *) _mesg;
+ herr_t ret_value=SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(H5O_stab_encode, FAIL);
@@ -137,7 +138,8 @@ H5O_stab_encode(H5F_t *f, uint8_t *p, const void *_mesg)
H5F_addr_encode(f, &p, stab->btree_addr);
H5F_addr_encode(f, &p, stab->heap_addr);
- FUNC_LEAVE(SUCCEED);
+done:
+ FUNC_LEAVE(ret_value);
}
@@ -255,8 +257,15 @@ done:
static size_t
H5O_stab_size(H5F_t *f, const void UNUSED *_mesg)
{
+ size_t ret_value; /* Return value */
+
FUNC_ENTER_NOAPI(H5O_stab_size, 0);
- FUNC_LEAVE(2 * H5F_SIZEOF_ADDR(f));
+
+ /* Set return value */
+ ret_value=2 * H5F_SIZEOF_ADDR(f);
+
+done:
+ FUNC_LEAVE(ret_value);
}
@@ -277,13 +286,16 @@ H5O_stab_size(H5F_t *f, const void UNUSED *_mesg)
static herr_t
H5O_stab_free (void *mesg)
{
+ herr_t ret_value=SUCCEED; /* Return value */
+
FUNC_ENTER_NOAPI(H5O_stab_free, FAIL);
assert (mesg);
H5FL_FREE(H5O_stab_t,mesg);
- FUNC_LEAVE (SUCCEED);
+done:
+ FUNC_LEAVE (ret_value);
}
@@ -307,6 +319,7 @@ H5O_stab_debug(H5F_t UNUSED *f, const void *_mesg, FILE * stream,
int indent, int fwidth)
{
const H5O_stab_t *stab = (const H5O_stab_t *) _mesg;
+ herr_t ret_value=SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(H5O_stab_debug, FAIL);
@@ -323,5 +336,6 @@ H5O_stab_debug(H5F_t UNUSED *f, const void *_mesg, FILE * stream,
HDfprintf(stream, "%*s%-*s %a\n", indent, "", fwidth,
"Name heap address:", stab->heap_addr);
- FUNC_LEAVE(SUCCEED);
+done:
+ FUNC_LEAVE(ret_value);
}
diff --git a/src/H5P.c b/src/H5P.c
index d77ec18..8b30ef4 100644
--- a/src/H5P.c
+++ b/src/H5P.c
@@ -93,9 +93,13 @@ static herr_t H5P_free_prop(H5P_genprop_t *prop);
herr_t
H5P_init(void)
{
+ herr_t ret_value=SUCCEED; /* Return value */
+
FUNC_ENTER_NOAPI(H5P_init, FAIL);
/* FUNC_ENTER() does all the work */
- FUNC_LEAVE(SUCCEED);
+
+done:
+ FUNC_LEAVE(ret_value);
}
@@ -6551,6 +6555,8 @@ H5P_get_nprops_plist(H5P_genplist_t *plist, size_t *nprops)
--------------------------------------------------------------------------*/
herr_t H5P_get_nprops_pclass(H5P_genclass_t *pclass, size_t *nprops)
{
+ herr_t ret_value=SUCCEED; /* Return value */
+
FUNC_ENTER_NOAPI(H5P_get_nprops_pclass, FAIL);
assert(pclass);
@@ -6559,7 +6565,8 @@ herr_t H5P_get_nprops_pclass(H5P_genclass_t *pclass, size_t *nprops)
/* Get property size */
*nprops=pclass->nprops;
- FUNC_LEAVE (SUCCEED);
+done:
+ FUNC_LEAVE (ret_value);
} /* H5P_get_nprops_pclass() */
@@ -7462,6 +7469,7 @@ unsigned H5P_peek_unsigned(H5P_genplist_t *plist, const char *name)
/* Get the value to return, don't worry about the return value, we can't return it */
H5P_get(plist,name,&ret_value);
+done:
FUNC_LEAVE (ret_value);
} /* H5P_peek_unsigned() */
@@ -7505,6 +7513,7 @@ hid_t H5P_peek_hid_t(H5P_genplist_t *plist, const char *name)
/* Get the value to return, don't worry about the return value, we can't return it */
H5P_get(plist,name,&ret_value);
+done:
FUNC_LEAVE (ret_value);
} /* H5P_peek_hid_t() */
@@ -7548,6 +7557,7 @@ void *H5P_peek_voidp(H5P_genplist_t *plist, const char *name)
/* Get the value to return, don't worry about the return value, we can't return it */
H5P_get(plist,name,&ret_value);
+done:
FUNC_LEAVE (ret_value);
} /* H5P_peek_voidp() */
@@ -7591,6 +7601,7 @@ hsize_t H5P_peek_hsize_t(H5P_genplist_t *plist, const char *name)
/* Get the value to return, don't worry about the return value, we can't return it */
H5P_get(plist,name,&ret_value);
+done:
FUNC_LEAVE (ret_value);
} /* H5P_peek_hsize_t() */
@@ -7634,6 +7645,7 @@ size_t H5P_peek_size_t(H5P_genplist_t *plist, const char *name)
/* Get the value to return, don't worry about the return value, we can't return it */
H5P_get(plist,name,&ret_value);
+done:
FUNC_LEAVE (ret_value);
} /* H5P_peek_size_t() */
@@ -8409,6 +8421,7 @@ char *H5P_get_class_name(H5P_genclass_t *pclass)
/* Get property size */
ret_value=HDstrdup(pclass->name);
+done:
FUNC_LEAVE (ret_value);
} /* H5P_get_class_name() */
diff --git a/src/H5S.c b/src/H5S.c
index 70cf3f3..34eb4ea 100644
--- a/src/H5S.c
+++ b/src/H5S.c
@@ -408,6 +408,7 @@ H5S_extent_release(H5S_t *ds)
break;
}
+done:
FUNC_LEAVE(ret_value);
} /* end H5S_extent_release() */
@@ -429,6 +430,8 @@ H5S_extent_release(H5S_t *ds)
herr_t
H5S_close(H5S_t *ds)
{
+ herr_t ret_value=SUCCEED; /* Return value */
+
FUNC_ENTER_NOAPI(H5S_close, FAIL);
assert(ds);
@@ -446,7 +449,8 @@ H5S_close(H5S_t *ds)
/* Release the main structure */
H5FL_FREE(H5S_t,ds);
- FUNC_LEAVE(SUCCEED);
+done:
+ FUNC_LEAVE(ret_value);
}
@@ -505,6 +509,8 @@ done:
herr_t
H5S_release_simple(H5S_simple_t *simple)
{
+ herr_t ret_value=SUCCEED; /* Return value */
+
FUNC_ENTER_NOAPI(H5S_release_simple, FAIL);
assert(simple);
@@ -518,7 +524,8 @@ H5S_release_simple(H5S_simple_t *simple)
H5FL_ARR_FREE(hsize_t,simple->perm);
#endif /* LATER */
- FUNC_LEAVE(SUCCEED);
+done:
+ FUNC_LEAVE(ret_value);
}
/*-------------------------------------------------------------------------
@@ -626,6 +633,7 @@ herr_t
H5S_extent_copy(H5S_extent_t *dst, const H5S_extent_t *src)
{
unsigned u;
+ herr_t ret_value=SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(H5S_extent_copy, FAIL);
@@ -659,7 +667,8 @@ H5S_extent_copy(H5S_extent_t *dst, const H5S_extent_t *src)
break;
}
- FUNC_LEAVE(SUCCEED);
+done:
+ FUNC_LEAVE(ret_value);
}
@@ -1260,6 +1269,7 @@ H5S_is_simple(const H5S_t *sdim)
ret_value = (sdim->extent.type == H5S_SIMPLE ||
sdim->extent.type == H5S_SCALAR) ? TRUE : FALSE;
+done:
FUNC_LEAVE(ret_value);
}
@@ -1748,6 +1758,7 @@ H5S_get_simple_extent_type(const H5S_t *space)
ret_value=space->extent.type;
+done:
FUNC_LEAVE(ret_value);
}
@@ -1937,6 +1948,7 @@ herr_t
H5S_debug(H5F_t *f, const void *_mesg, FILE *stream, int indent, int fwidth)
{
const H5S_t *mesg = (const H5S_t*)_mesg;
+ herr_t ret_value=SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(H5S_debug, FAIL);
@@ -1959,6 +1971,7 @@ H5S_debug(H5F_t *f, const void *_mesg, FILE *stream, int indent, int fwidth)
break;
}
- FUNC_LEAVE(SUCCEED);
+done:
+ FUNC_LEAVE(ret_value);
}
diff --git a/src/H5Sall.c b/src/H5Sall.c
index 4f4371d..ab12d70 100644
--- a/src/H5Sall.c
+++ b/src/H5Sall.c
@@ -39,6 +39,8 @@ static int interface_initialize_g = 0;
herr_t
H5S_all_iter_init (const H5S_t *space, size_t UNUSED elmt_size, H5S_sel_iter_t *sel_iter)
{
+ herr_t ret_value=SUCCEED; /* Return value */
+
FUNC_ENTER_NOAPI(H5S_all_iter_init, FAIL);
/* Check args */
@@ -51,7 +53,8 @@ H5S_all_iter_init (const H5S_t *space, size_t UNUSED elmt_size, H5S_sel_iter_t *
/* Start at the upper left location */
sel_iter->all.offset=0;
- FUNC_LEAVE (SUCCEED);
+done:
+ FUNC_LEAVE (ret_value);
} /* H5S_all_iter_init() */
@@ -72,12 +75,18 @@ H5S_all_iter_init (const H5S_t *space, size_t UNUSED elmt_size, H5S_sel_iter_t *
hsize_t
H5S_all_iter_nelmts (const H5S_sel_iter_t *sel_iter)
{
+ hsize_t ret_value; /* Return value */
+
FUNC_ENTER_NOAPI(H5S_all_iter_nelmts, 0);
/* Check args */
assert (sel_iter);
- FUNC_LEAVE (sel_iter->all.elmt_left);
+ /* Set return value */
+ ret_value=sel_iter->all.elmt_left;
+
+done:
+ FUNC_LEAVE(ret_value);
} /* H5S_all_iter_nelmts() */
@@ -101,12 +110,15 @@ H5S_all_iter_nelmts (const H5S_sel_iter_t *sel_iter)
herr_t
H5S_all_iter_release (H5S_sel_iter_t * UNUSED sel_iter)
{
+ herr_t ret_value=SUCCEED; /* Return value */
+
FUNC_ENTER_NOAPI(H5S_all_iter_release, FAIL);
/* Check args */
assert (sel_iter);
- FUNC_LEAVE (SUCCEED);
+done:
+ FUNC_LEAVE (ret_value);
} /* H5S_all_iter_release() */
@@ -130,12 +142,15 @@ H5S_all_iter_release (H5S_sel_iter_t * UNUSED sel_iter)
herr_t
H5S_all_release (H5S_t * UNUSED space)
{
+ herr_t ret_value=SUCCEED; /* Return value */
+
FUNC_ENTER_NOAPI(H5S_all_release, FAIL);
/* Check args */
assert (space);
- FUNC_LEAVE (SUCCEED);
+done:
+ FUNC_LEAVE (ret_value);
} /* H5S_all_release() */
@@ -171,6 +186,7 @@ H5S_all_npoints (const H5S_t *space)
for(u=0, ret_value=1; u<space->extent.u.simple.rank; u++)
ret_value*=space->extent.u.simple.size[u];
+done:
FUNC_LEAVE (ret_value);
} /* H5S_all_npoints() */
@@ -198,11 +214,14 @@ H5S_all_npoints (const H5S_t *space)
htri_t
H5S_all_is_valid (const H5S_t UNUSED *space)
{
+ htri_t ret_value=TRUE; /* Return value */
+
FUNC_ENTER_NOAPI(H5S_all_is_valid, FAIL);
assert(space);
- FUNC_LEAVE (TRUE);
+done:
+ FUNC_LEAVE (ret_value);
} /* end H5S_all_is_valid() */
@@ -240,6 +259,7 @@ H5S_all_serial_size (const H5S_t UNUSED *space)
*/
ret_value=16;
+done:
FUNC_LEAVE (ret_value);
} /* end H5S_all_serial_size() */
@@ -281,6 +301,7 @@ H5S_all_serialize (const H5S_t *space, uint8_t *buf)
/* Set success */
ret_value=SUCCEED;
+done:
FUNC_LEAVE (ret_value);
} /* H5S_all_serialize() */
@@ -369,6 +390,7 @@ H5S_all_bounds(const H5S_t *space, hsize_t *start, hsize_t *end)
end[i]=space->extent.u.simple.size[i]-1;
} /* end for */
+done:
FUNC_LEAVE (ret_value);
} /* H5Sget_all_bounds() */
@@ -394,11 +416,14 @@ H5S_all_bounds(const H5S_t *space, hsize_t *start, hsize_t *end)
htri_t
H5S_all_is_contiguous(const H5S_t UNUSED *space)
{
+ htri_t ret_value=TRUE; /* Return value */
+
FUNC_ENTER_NOAPI(H5S_all_is_contiguous, FAIL);
assert(space);
- FUNC_LEAVE (TRUE);
+done:
+ FUNC_LEAVE (ret_value);
} /* H5S_all_is_contiguous() */
@@ -423,11 +448,14 @@ H5S_all_is_contiguous(const H5S_t UNUSED *space)
htri_t
H5S_all_is_single(const H5S_t UNUSED *space)
{
+ htri_t ret_value=TRUE; /* Return value */
+
FUNC_ENTER_NOAPI(H5S_all_is_single, FAIL);
assert(space);
- FUNC_LEAVE (TRUE);
+done:
+ FUNC_LEAVE (ret_value);
} /* H5S_all_is_single() */
@@ -453,12 +481,15 @@ H5S_all_is_single(const H5S_t UNUSED *space)
htri_t
H5S_all_is_regular(const H5S_t UNUSED *space)
{
+ htri_t ret_value=TRUE; /* Return value */
+
FUNC_ENTER_NOAPI(H5S_all_is_regular, FAIL);
/* Check args */
assert(space);
- FUNC_LEAVE (TRUE);
+done:
+ FUNC_LEAVE (ret_value);
} /* H5S_all_is_regular() */
@@ -630,9 +661,7 @@ H5S_all_get_seq_list(const H5S_t UNUSED *space, unsigned UNUSED flags, H5S_sel_i
iter->all.elmt_left-=elem_used;
iter->all.offset+=elem_used;
-#ifdef LATER
done:
-#endif /* LATER */
FUNC_LEAVE (ret_value);
} /* end H5S_all_get_seq_list() */
diff --git a/src/H5Shyper.c b/src/H5Shyper.c
index d69a073..79c8e3e 100644
--- a/src/H5Shyper.c
+++ b/src/H5Shyper.c
@@ -107,6 +107,7 @@ H5S_hyper_iter_init (const H5S_t *space, size_t elmt_size, H5S_sel_iter_t *sel_i
H5S_hyper_span_info_t *spans; /* Pointer to hyperslab span info node */
unsigned u; /* Index variable */
int i; /* Index variable */
+ herr_t ret_value=SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(H5S_hyper_iter_init, FAIL);
@@ -229,7 +230,8 @@ H5S_hyper_iter_init (const H5S_t *space, size_t elmt_size, H5S_sel_iter_t *sel_i
} /* end for */
} /* end else */
- FUNC_LEAVE (SUCCEED);
+done:
+ FUNC_LEAVE (ret_value);
} /* H5S_hyper_iter_init() */
@@ -250,12 +252,18 @@ H5S_hyper_iter_init (const H5S_t *space, size_t elmt_size, H5S_sel_iter_t *sel_i
hsize_t
H5S_hyper_iter_nelmts (const H5S_sel_iter_t *sel_iter)
{
+ hsize_t ret_value; /* Return value */
+
FUNC_ENTER_NOAPI(H5S_hyper_iter_nelmts, 0);
/* Check args */
assert (sel_iter);
- FUNC_LEAVE (sel_iter->hyp.elmt_left);
+ /* Set return value */
+ ret_value=sel_iter->hyp.elmt_left;
+
+done:
+ FUNC_LEAVE(ret_value);
} /* H5S_hyper_iter_nelmts() */
@@ -279,6 +287,8 @@ H5S_hyper_iter_nelmts (const H5S_sel_iter_t *sel_iter)
herr_t
H5S_hyper_iter_release (H5S_sel_iter_t *sel_iter)
{
+ herr_t ret_value=SUCCEED; /* Return value */
+
FUNC_ENTER_NOAPI(H5S_hyper_iter_release, FAIL);
/* Check args */
@@ -310,7 +320,8 @@ H5S_hyper_iter_release (H5S_sel_iter_t *sel_iter)
if(sel_iter->hyp.span!=NULL)
H5FL_ARR_FREE(H5S_hyper_span_t,sel_iter->hyp.span);
- FUNC_LEAVE (SUCCEED);
+done:
+ FUNC_LEAVE (ret_value);
} /* H5S_hyper_iter_release() */
@@ -442,12 +453,18 @@ H5S_hyper_iter_next (const H5S_t *space, H5S_sel_iter_t *iter)
hsize_t
H5S_hyper_npoints (const H5S_t *space)
{
+ hsize_t ret_value; /* Return value */
+
FUNC_ENTER_NOAPI(H5S_hyper_npoints, 0);
/* Check args */
assert (space);
- FUNC_LEAVE (space->select.num_elem);
+ /* Set return value */
+ ret_value=space->select.num_elem;
+
+done:
+ FUNC_LEAVE (ret_value);
} /* H5S_hyper_npoints() */
@@ -1184,6 +1201,7 @@ H5S_hyper_is_valid (const H5S_t *space)
ret_value=H5S_hyper_is_valid_helper(space->select.sel_info.hslab.span_lst,space->select.offset,space->extent.u.simple.size,(hsize_t)0);
} /* end else */
+done:
FUNC_LEAVE (ret_value);
} /* end H5S_hyper_is_valid() */
@@ -1364,6 +1382,7 @@ H5S_hyper_serial_size (const H5S_t *space)
ret_value+=8*space->extent.u.simple.rank*block_count;
} /* end else */
+done:
FUNC_LEAVE (ret_value);
} /* end H5S_hyper_serial_size() */
@@ -1482,6 +1501,7 @@ H5S_hyper_serialize (const H5S_t *space, uint8_t *buf)
int temp_dim; /* Temporary rank holder */
int ndims; /* Rank of the dataspace */
int done; /* Whether we are done with the iteration */
+ herr_t ret_value=SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(H5S_hyper_serialize, FAIL);
@@ -1600,7 +1620,8 @@ H5S_hyper_serialize (const H5S_t *space, uint8_t *buf)
/* Encode length */
UINT32ENCODE(lenp, (uint32_t)len); /* Store the length of the extra information */
- FUNC_LEAVE (SUCCEED);
+done:
+ FUNC_LEAVE (ret_value);
} /* H5S_hyper_serialize() */
@@ -2131,6 +2152,7 @@ H5S_hyper_bounds(const H5S_t *space, hsize_t *start, hsize_t *end)
ret_value=H5S_hyper_bounds_helper(space->select.sel_info.hslab.span_lst,space->select.offset,(hsize_t)0,start,end);
} /* end if */
+done:
FUNC_LEAVE (ret_value);
} /* H5Sget_hyper_bounds() */
@@ -2313,6 +2335,7 @@ H5S_hyper_is_contiguous(const H5S_t *space)
ret_value=TRUE;
} /* end else */
+done:
FUNC_LEAVE (ret_value);
} /* H5S_hyper_is_contiguous() */
@@ -2391,6 +2414,7 @@ H5S_hyper_is_single(const H5S_t *space)
} /* end while */
} /* end else */
+done:
FUNC_LEAVE (ret_value);
} /* H5S_hyper_is_single() */
@@ -2431,6 +2455,7 @@ H5S_hyper_is_regular(const H5S_t *space)
else
ret_value=FALSE;
+done:
FUNC_LEAVE (ret_value);
} /* H5S_hyper_is_regular() */
@@ -6001,9 +6026,7 @@ H5S_hyper_get_seq_list(const H5S_t *space, unsigned UNUSED flags, H5S_sel_iter_t
/* Call the general sequence generator routine */
ret_value=H5S_hyper_get_seq_list_gen(space,iter,elem_size,maxseq,maxbytes,nseq,nbytes,off,len);
-#ifdef LATER
done:
-#endif /* LATER */
FUNC_LEAVE (ret_value);
} /* end H5S_hyper_get_seq_list() */
diff --git a/src/H5Smpio.c b/src/H5Smpio.c
index 8285e18..da09cb7 100644
--- a/src/H5Smpio.c
+++ b/src/H5Smpio.c
@@ -890,6 +890,7 @@ H5S_mpio_spaces_read(H5F_t *f, const H5O_layout_t *layout,
file_space, mem_space, dxpl_id,
buf, 0/*read*/);
+done:
FUNC_LEAVE (ret_value);
}
@@ -929,6 +930,7 @@ H5S_mpio_spaces_write(H5F_t *f, const H5O_layout_t *layout,
file_space, mem_space, dxpl_id,
(void*)buf, 1/*write*/);
+done:
FUNC_LEAVE (ret_value);
}
diff --git a/src/H5Snone.c b/src/H5Snone.c
index 823225b..7105958 100644
--- a/src/H5Snone.c
+++ b/src/H5Snone.c
@@ -40,13 +40,16 @@ static int interface_initialize_g = 0;
herr_t
H5S_none_iter_init (const H5S_t UNUSED *space, size_t UNUSED elmt_size, H5S_sel_iter_t UNUSED *sel_iter)
{
+ herr_t ret_value=SUCCEED; /* Return value */
+
FUNC_ENTER_NOAPI(H5S_none_iter_init, FAIL);
/* Check args */
assert (space && H5S_SEL_NONE==space->select.type);
assert (sel_iter);
- FUNC_LEAVE (SUCCEED);
+done:
+ FUNC_LEAVE (ret_value);
} /* H5S_none_iter_init() */
@@ -67,12 +70,15 @@ H5S_none_iter_init (const H5S_t UNUSED *space, size_t UNUSED elmt_size, H5S_sel_
hsize_t
H5S_none_iter_nelmts (const H5S_sel_iter_t UNUSED *sel_iter)
{
+ hsize_t ret_value=0; /* Return value */
+
FUNC_ENTER_NOAPI(H5S_none_iter_nelmts, 0);
/* Check args */
assert (sel_iter);
- FUNC_LEAVE (0);
+done:
+ FUNC_LEAVE (ret_value);
} /* H5S_none_iter_nelmts() */
@@ -96,12 +102,15 @@ H5S_none_iter_nelmts (const H5S_sel_iter_t UNUSED *sel_iter)
herr_t
H5S_none_iter_release (H5S_sel_iter_t * UNUSED sel_iter)
{
+ herr_t ret_value=SUCCEED; /* Return value */
+
FUNC_ENTER_NOAPI(H5S_none_iter_release, FAIL);
/* Check args */
assert (sel_iter);
- FUNC_LEAVE (SUCCEED);
+done:
+ FUNC_LEAVE (ret_value);
} /* H5S_none_iter_release() */
@@ -125,12 +134,15 @@ H5S_none_iter_release (H5S_sel_iter_t * UNUSED sel_iter)
herr_t
H5S_none_release (H5S_t * UNUSED space)
{
+ herr_t ret_value=SUCCEED; /* Return value */
+
FUNC_ENTER_NOAPI(H5S_none_release, FAIL);
/* Check args */
assert (space);
- FUNC_LEAVE (SUCCEED);
+done:
+ FUNC_LEAVE (ret_value);
} /* H5S_none_release() */
@@ -155,12 +167,15 @@ H5S_none_release (H5S_t * UNUSED space)
hsize_t
H5S_none_npoints (const H5S_t UNUSED *space)
{
+ hsize_t ret_value=0; /* Return value */
+
FUNC_ENTER_NOAPI(H5S_none_npoints, 0);
/* Check args */
assert (space);
- FUNC_LEAVE (0);
+done:
+ FUNC_LEAVE (ret_value);
} /* H5S_none_npoints() */
@@ -187,11 +202,14 @@ H5S_none_npoints (const H5S_t UNUSED *space)
htri_t
H5S_none_is_valid (const H5S_t UNUSED *space)
{
+ htri_t ret_value=TRUE; /* Return value */
+
FUNC_ENTER_NOAPI(H5S_none_is_valid, FAIL);
assert(space);
- FUNC_LEAVE (TRUE);
+done:
+ FUNC_LEAVE (ret_value);
} /* end H5S_none_is_valid() */
@@ -217,7 +235,7 @@ H5S_none_is_valid (const H5S_t UNUSED *space)
hssize_t
H5S_none_serial_size (const H5S_t UNUSED *space)
{
- hssize_t ret_value=FAIL; /* return value */
+ hssize_t ret_value; /* return value */
FUNC_ENTER_NOAPI(H5S_none_serial_size, FAIL);
@@ -229,6 +247,7 @@ H5S_none_serial_size (const H5S_t UNUSED *space)
*/
ret_value=16;
+done:
FUNC_LEAVE (ret_value);
} /* end H5S_none_serial_size() */
@@ -255,6 +274,8 @@ H5S_none_serial_size (const H5S_t UNUSED *space)
herr_t
H5S_none_serialize (const H5S_t *space, uint8_t *buf)
{
+ herr_t ret_value=SUCCEED; /* Return value */
+
FUNC_ENTER_NOAPI(H5S_none_serialize, FAIL);
assert(space);
@@ -265,7 +286,8 @@ H5S_none_serialize (const H5S_t *space, uint8_t *buf)
UINT32ENCODE(buf, (uint32_t)0); /* Store the un-used padding */
UINT32ENCODE(buf, (uint32_t)0); /* Store the additional information length */
- FUNC_LEAVE (SUCCEED);
+done:
+ FUNC_LEAVE (ret_value);
} /* H5S_none_serialize() */
@@ -334,13 +356,16 @@ done:
herr_t
H5S_none_bounds(const H5S_t UNUSED *space, hsize_t UNUSED *start, hsize_t UNUSED *end)
{
+ herr_t ret_value=FAIL; /* Return value */
+
FUNC_ENTER_NOAPI(H5S_none_bounds, FAIL);
assert(space);
assert(start);
assert(end);
- FUNC_LEAVE (FAIL);
+done:
+ FUNC_LEAVE (ret_value);
} /* H5Sget_none_bounds() */
@@ -365,11 +390,14 @@ H5S_none_bounds(const H5S_t UNUSED *space, hsize_t UNUSED *start, hsize_t UNUSED
htri_t
H5S_none_is_contiguous(const H5S_t UNUSED *space)
{
+ htri_t ret_value=FALSE; /* Return value */
+
FUNC_ENTER_NOAPI(H5S_none_is_contiguous, FAIL);
assert(space);
- FUNC_LEAVE (FALSE);
+done:
+ FUNC_LEAVE (ret_value);
} /* H5S_none_is_contiguous() */
@@ -394,11 +422,14 @@ H5S_none_is_contiguous(const H5S_t UNUSED *space)
htri_t
H5S_none_is_single(const H5S_t UNUSED *space)
{
+ htri_t ret_value=FALSE; /* Return value */
+
FUNC_ENTER_NOAPI(H5S_none_is_single, FAIL);
assert(space);
- FUNC_LEAVE (FALSE);
+done:
+ FUNC_LEAVE (ret_value);
} /* H5S_none_is_single() */
@@ -424,12 +455,15 @@ H5S_none_is_single(const H5S_t UNUSED *space)
htri_t
H5S_none_is_regular(const H5S_t UNUSED *space)
{
+ htri_t ret_value=TRUE; /* Return value */
+
FUNC_ENTER_NOAPI(H5S_none_is_regular, FAIL);
/* Check args */
assert(space);
- FUNC_LEAVE (TRUE);
+done:
+ FUNC_LEAVE (ret_value);
} /* H5S_none_is_regular() */
@@ -560,6 +594,8 @@ H5S_none_get_seq_list(const H5S_t UNUSED *space, unsigned UNUSED flags, H5S_sel_
size_t UNUSED elem_size, size_t UNUSED maxseq, size_t UNUSED maxbytes, size_t *nseq, size_t *nbytes,
hsize_t UNUSED *off, size_t UNUSED *len)
{
+ herr_t ret_value=SUCCEED; /* Return value */
+
FUNC_ENTER_NOAPI (H5S_none_get_seq_list, FAIL);
/* Check args */
@@ -579,5 +615,6 @@ H5S_none_get_seq_list(const H5S_t UNUSED *space, unsigned UNUSED flags, H5S_sel_
/* The don't use any bytes, either */
*nbytes=0;
- FUNC_LEAVE (SUCCEED);
+done:
+ FUNC_LEAVE (ret_value);
} /* end H5S_all_get_seq_list() */
diff --git a/src/H5Spoint.c b/src/H5Spoint.c
index 786eae3..75b5868 100644
--- a/src/H5Spoint.c
+++ b/src/H5Spoint.c
@@ -47,6 +47,8 @@ H5FL_DEFINE_STATIC(H5S_pnt_list_t);
herr_t
H5S_point_iter_init(const H5S_t *space, size_t UNUSED elmt_size, H5S_sel_iter_t *sel_iter)
{
+ herr_t ret_value=SUCCEED; /* Return value */
+
FUNC_ENTER_NOAPI(H5S_point_iter_init, FAIL);
/* Check args */
@@ -59,7 +61,8 @@ H5S_point_iter_init(const H5S_t *space, size_t UNUSED elmt_size, H5S_sel_iter_t
/* Start at the head of the list of points */
sel_iter->pnt.curr=space->select.sel_info.pnt_lst->head;
- FUNC_LEAVE (SUCCEED);
+done:
+ FUNC_LEAVE (ret_value);
} /* H5S_point_iter_init() */
@@ -80,12 +83,18 @@ H5S_point_iter_init(const H5S_t *space, size_t UNUSED elmt_size, H5S_sel_iter_t
hsize_t
H5S_point_iter_nelmts (const H5S_sel_iter_t *sel_iter)
{
+ hsize_t ret_value; /* Return value */
+
FUNC_ENTER_NOAPI(H5S_point_iter_nelmts, 0);
/* Check args */
assert (sel_iter);
- FUNC_LEAVE (sel_iter->pnt.elmt_left);
+ /* Set return value */
+ ret_value=sel_iter->pnt.elmt_left;
+
+done:
+ FUNC_LEAVE (ret_value);
} /* H5S_point_iter_nelmts() */
@@ -109,12 +118,15 @@ H5S_point_iter_nelmts (const H5S_sel_iter_t *sel_iter)
herr_t
H5S_point_iter_release (H5S_sel_iter_t * UNUSED sel_iter)
{
+ herr_t ret_value=SUCCEED; /* Return value */
+
FUNC_ENTER_NOAPI(H5S_point_iter_release, FAIL);
/* Check args */
assert (sel_iter);
- FUNC_LEAVE (SUCCEED);
+done:
+ FUNC_LEAVE (ret_value);
} /* H5S_point_iter_release() */
@@ -224,6 +236,7 @@ herr_t
H5S_point_release (H5S_t *space)
{
H5S_pnt_node_t *curr, *next; /* Point selection nodes */
+ herr_t ret_value=SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(H5S_point_release, FAIL);
@@ -246,7 +259,8 @@ H5S_point_release (H5S_t *space)
/* Reset the number of elements in the selection */
space->select.num_elem=0;
- FUNC_LEAVE (SUCCEED);
+done:
+ FUNC_LEAVE (ret_value);
} /* H5S_point_release() */
@@ -270,12 +284,17 @@ H5S_point_release (H5S_t *space)
hsize_t
H5S_point_npoints (const H5S_t *space)
{
+ hsize_t ret_value; /* Return value */
FUNC_ENTER_NOAPI(H5S_point_npoints, 0);
/* Check args */
assert (space);
- FUNC_LEAVE (space->select.num_elem);
+ /* Set return value */
+ ret_value=space->select.num_elem;
+
+done:
+ FUNC_LEAVE (ret_value);
} /* H5S_point_npoints() */
@@ -471,6 +490,7 @@ H5S_point_is_valid (const H5S_t *space)
curr=curr->next;
} /* end while */
+done:
FUNC_LEAVE (ret_value);
} /* end H5S_point_is_valid() */
@@ -589,6 +609,7 @@ H5S_point_serial_size (const H5S_t *space)
curr=curr->next;
} /* end while */
+done:
FUNC_LEAVE (ret_value);
} /* end H5S_point_serial_size() */
@@ -619,6 +640,7 @@ H5S_point_serialize (const H5S_t *space, uint8_t *buf)
uint8_t *lenp; /* pointer to length location for later storage */
uint32_t len=0; /* number of bytes used */
unsigned u; /* local counting variable */
+ herr_t ret_value=SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(H5S_point_serialize, FAIL);
@@ -655,7 +677,8 @@ H5S_point_serialize (const H5S_t *space, uint8_t *buf)
/* Encode length */
UINT32ENCODE(lenp, (uint32_t)len); /* Store the length of the extra information */
- FUNC_LEAVE (SUCCEED);
+done:
+ FUNC_LEAVE (ret_value);
} /* H5S_point_serialize() */
@@ -872,6 +895,7 @@ H5S_point_bounds(const H5S_t *space, hsize_t *start, hsize_t *end)
H5S_pnt_node_t *node; /* Point node */
int rank; /* Dataspace rank */
int i; /* index variable */
+ herr_t ret_value=SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(H5S_point_bounds, FAIL);
@@ -900,7 +924,8 @@ H5S_point_bounds(const H5S_t *space, hsize_t *start, hsize_t *end)
node=node->next;
} /* end while */
- FUNC_LEAVE (SUCCEED);
+done:
+ FUNC_LEAVE (ret_value);
} /* H5Sget_point_bounds() */
@@ -940,6 +965,7 @@ H5S_point_is_contiguous(const H5S_t *space)
else /* More than one point might be contiguous, but it's complex to check and we don't need it right now */
ret_value=FALSE;
+done:
FUNC_LEAVE (ret_value);
} /* H5S_point_is_contiguous() */
@@ -977,6 +1003,7 @@ H5S_point_is_single(const H5S_t *space)
else
ret_value=FALSE;
+done:
FUNC_LEAVE (ret_value);
} /* H5S_point_is_single() */
@@ -1018,6 +1045,7 @@ H5S_point_is_regular(const H5S_t *space)
else
ret_value=FALSE;
+done:
FUNC_LEAVE (ret_value);
} /* H5S_point_is_regular() */
diff --git a/src/H5Sselect.c b/src/H5Sselect.c
index 4314d44..8f9ebc1 100644
--- a/src/H5Sselect.c
+++ b/src/H5Sselect.c
@@ -255,6 +255,7 @@ H5S_select_deserialize (H5S_t *space, const uint8_t *buf)
break;
}
+done:
FUNC_LEAVE (ret_value);
} /* H5S_select_deserialize() */
diff --git a/src/H5T.c b/src/H5T.c
index 77ed665..bc54b58 100644
--- a/src/H5T.c
+++ b/src/H5T.c
@@ -231,11 +231,16 @@ static H5T_t * H5T_vlen_create(H5T_t *base);
herr_t
H5T_init(void)
{
+ herr_t ret_value=SUCCEED; /* Return value */
+
FUNC_ENTER_NOAPI(H5T_init, FAIL);
/* FUNC_ENTER() does all the work */
- FUNC_LEAVE(SUCCEED);
+
+done:
+ FUNC_LEAVE(ret_value);
}
+
/*--------------------------------------------------------------------------
NAME
H5T_init_interface -- Initialize interface-specific information
@@ -2442,6 +2447,7 @@ H5T_get_class(const H5T_t *dt)
else
ret_value=dt->type;
+done:
FUNC_LEAVE(ret_value);
} /* end H5T_get_class() */
@@ -2637,7 +2643,7 @@ H5Tset_size(hid_t type_id, size_t size)
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "unable to set size for data type");
done:
- FUNC_LEAVE(SUCCEED);
+ FUNC_LEAVE(ret_value);
}
@@ -4860,6 +4866,7 @@ H5T_unregister(H5T_pers_t pers, const char *name, H5T_t *src, H5T_t *dst,
H5T_soft_t *soft = NULL; /*soft conversion information */
int nprint=0; /*number of paths shut down */
int i; /*counter */
+ herr_t ret_value=SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(H5T_unregister, FAIL);
@@ -4914,7 +4921,8 @@ H5T_unregister(H5T_pers_t pers, const char *name, H5T_t *src, H5T_t *dst,
H5E_clear(); /*ignore all shutdown errors*/
}
- FUNC_LEAVE(SUCCEED);
+done:
+ FUNC_LEAVE(ret_value);
} /* end H5T_unregister() */
@@ -5128,12 +5136,15 @@ done:
herr_t
H5Tset_overflow(H5T_overflow_t func)
{
+ herr_t ret_value=SUCCEED; /* Return value */
+
FUNC_ENTER_API(H5Tset_overflow, FAIL);
H5TRACE1("e","x",func);
H5T_overflow_g = func;
- FUNC_LEAVE(SUCCEED);
+done:
+ FUNC_LEAVE(ret_value);
}
@@ -5665,6 +5676,8 @@ done:
herr_t
H5T_lock (H5T_t *dt, hbool_t immutable)
{
+ herr_t ret_value=SUCCEED; /* Return value */
+
FUNC_ENTER_NOAPI(H5T_lock, FAIL);
assert (dt);
@@ -5682,7 +5695,8 @@ H5T_lock (H5T_t *dt, hbool_t immutable)
break;
}
- FUNC_LEAVE (SUCCEED);
+done:
+ FUNC_LEAVE (ret_value);
}
@@ -5799,6 +5813,7 @@ H5T_is_atomic(const H5T_t *dt)
else
ret_value = FALSE;
+done:
FUNC_LEAVE(ret_value);
}
@@ -6329,6 +6344,7 @@ H5T_sort_value(H5T_t *dt, int *map)
size_t size;
hbool_t swapped;
uint8_t tbuf[32];
+ herr_t ret_value=SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(H5T_sort_value, FAIL);
@@ -6409,7 +6425,8 @@ H5T_sort_value(H5T_t *dt, int *map)
}
}
- FUNC_LEAVE(SUCCEED);
+done:
+ FUNC_LEAVE(ret_value);
}
@@ -6438,6 +6455,7 @@ H5T_sort_name(H5T_t *dt, int *map)
size_t size;
hbool_t swapped;
uint8_t tbuf[32];
+ herr_t ret_value=SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(H5T_sort_name, FAIL);
@@ -6514,7 +6532,8 @@ H5T_sort_name(H5T_t *dt, int *map)
}
}
- FUNC_LEAVE(SUCCEED);
+done:
+ FUNC_LEAVE(ret_value);
}
@@ -7510,6 +7529,7 @@ H5T_is_immutable(H5T_t *dt)
if(dt->state == H5T_STATE_IMMUTABLE)
ret_value = TRUE;
+done:
FUNC_LEAVE(ret_value);
}
@@ -7546,6 +7566,7 @@ H5T_get_ref_type(const H5T_t *dt)
if(dt->type==H5T_REFERENCE)
ret_value=dt->u.atomic.u.r.rtype;
+done:
FUNC_LEAVE(ret_value);
} /* end H5T_get_ref_type() */
@@ -7815,6 +7836,7 @@ H5T_is_sensible(const H5T_t *dt)
break;
} /* end switch */
+done:
FUNC_LEAVE(ret_value);
}
@@ -7905,6 +7927,7 @@ H5T_debug(const H5T_t *dt, FILE *stream)
int i;
size_t k, base_size;
uint64_t tmp;
+ herr_t ret_value=SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(H5T_debug, FAIL);
@@ -8090,6 +8113,7 @@ H5T_debug(const H5T_t *dt, FILE *stream)
}
fprintf(stream, "}");
- FUNC_LEAVE(SUCCEED);
+done:
+ FUNC_LEAVE(ret_value);
}
diff --git a/src/H5TB.c b/src/H5TB.c
index d59da33..6a9afcb 100644
--- a/src/H5TB.c
+++ b/src/H5TB.c
@@ -230,6 +230,7 @@ H5TB_dfind(H5TB_TREE * tree, void * key, H5TB_NODE ** pp)
else
ret_value=H5TB_find(tree->root, key, tree->compar, tree->cmparg, pp);
+done:
FUNC_LEAVE (ret_value);
} /* end H5TB_dfind() */
@@ -269,6 +270,7 @@ H5TB_find(H5TB_NODE * root, void * key,
H5TB_NODE *parent = NULL;
int cmp = 1;
int side;
+ H5TB_NODE *ret_value; /* Return value */
FUNC_ENTER_NOAPI(H5TB_find, NULL);
@@ -285,7 +287,12 @@ H5TB_find(H5TB_NODE * root, void * key,
if (NULL != pp)
*pp = parent;
- FUNC_LEAVE ((0 == cmp) ? ptr : NULL);
+
+ /* Set return value */
+ ret_value= (0 == cmp) ? ptr : NULL;
+
+done:
+ FUNC_LEAVE(ret_value);
} /* end H5TB_find() */
@@ -318,11 +325,17 @@ H5TB_find(H5TB_NODE * root, void * key,
H5TB_NODE *
H5TB_dless(H5TB_TREE * tree, void * key, H5TB_NODE ** pp)
{
+ H5TB_NODE *ret_value; /* Return value */
+
FUNC_ENTER_NOAPI(H5TB_dless,NULL);
assert(tree);
- FUNC_LEAVE(H5TB_less(tree->root, key, tree->compar, tree->cmparg, pp));
+ /* Set return value */
+ ret_value= H5TB_less(tree->root, key, tree->compar, tree->cmparg, pp);
+
+done:
+ FUNC_LEAVE(ret_value);
} /* end H5TB_dless() */
@@ -359,6 +372,7 @@ H5TB_less(H5TB_NODE * root, void * key, H5TB_cmp_t compar, int arg, H5TB_NODE **
H5TB_NODE *parent = NULL;
int cmp = 1;
int side;
+ H5TB_NODE *ret_value; /* Return value */
FUNC_ENTER_NOAPI(H5TB_less,NULL);
@@ -390,7 +404,11 @@ H5TB_less(H5TB_NODE * root, void * key, H5TB_cmp_t compar, int arg, H5TB_NODE **
if (NULL != pp)
*pp = parent;
- FUNC_LEAVE((0 == cmp) ? ptr : NULL);
+ /* Set return value */
+ ret_value= (0 == cmp) ? ptr : NULL;
+
+done:
+ FUNC_LEAVE(ret_value);
} /* end H5TB_less */
@@ -419,6 +437,7 @@ H5TB_NODE *
H5TB_index(H5TB_NODE * root, unsigned indx)
{
H5TB_NODE *ptr = root;
+ H5TB_NODE *ret_value; /* Return value */
FUNC_ENTER_NOAPI(H5TB_index,NULL);
@@ -443,7 +462,11 @@ H5TB_index(H5TB_NODE * root, unsigned indx)
} /* end while */
} /* end if */
- FUNC_LEAVE(ptr);
+ /* Set return value */
+ ret_value=ptr;
+
+done:
+ FUNC_LEAVE(ret_value);
} /* end H5TB_index() */
@@ -471,20 +494,21 @@ H5TB_index(H5TB_NODE * root, unsigned indx)
H5TB_NODE *
H5TB_dins(H5TB_TREE * tree, void * item, void * key)
{
- H5TB_NODE *ret_node; /* the node to return */
+ H5TB_NODE *ret_value; /* the node to return */
FUNC_ENTER_NOAPI(H5TB_dins,NULL);
assert(tree);
/* Try to insert the node */
- ret_node = H5TB_ins(&(tree->root), item, key, tree->compar, tree->cmparg);
+ ret_value = H5TB_ins(&(tree->root), item, key, tree->compar, tree->cmparg);
/* If we successfully inserted the node, increment the node count in the tree */
- if (ret_node != NULL)
+ if (ret_value != NULL)
tree->count++;
- FUNC_LEAVE(ret_node);
+done:
+ FUNC_LEAVE(ret_value);
} /* end H5TB_dins() */
@@ -752,9 +776,15 @@ done:
H5TB_NODE *
H5TB_first(H5TB_NODE * root)
{
+ H5TB_NODE *ret_value; /* Return value */
+
FUNC_ENTER_NOAPI(H5TB_first,NULL);
- FUNC_LEAVE(H5TB_end(root, LEFT));
+ /* Set return value */
+ ret_value=H5TB_end(root, LEFT);
+
+done:
+ FUNC_LEAVE(ret_value);
} /* end H5TB_first() */
@@ -781,9 +811,15 @@ H5TB_first(H5TB_NODE * root)
H5TB_NODE *
H5TB_last(H5TB_NODE * root)
{
+ H5TB_NODE *ret_value; /* Return value */
+
FUNC_ENTER_NOAPI(H5TB_last,NULL);
- FUNC_LEAVE(H5TB_end(root, RIGHT));
+ /* Set return value */
+ ret_value=H5TB_end(root, RIGHT);
+
+done:
+ FUNC_LEAVE(ret_value);
} /* end H5TB_last() */
@@ -809,9 +845,15 @@ H5TB_last(H5TB_NODE * root)
H5TB_NODE *
H5TB_next(H5TB_NODE * node)
{
+ H5TB_NODE *ret_value; /* Return value */
+
FUNC_ENTER_NOAPI(H5TB_next,NULL);
- FUNC_LEAVE(H5TB_nbr(node, RIGHT));
+ /* Set return value */
+ ret_value=H5TB_nbr(node, RIGHT);
+
+done:
+ FUNC_LEAVE(ret_value);
} /* end H5TB_next() */
@@ -837,9 +879,15 @@ H5TB_next(H5TB_NODE * node)
H5TB_NODE *
H5TB_prev(H5TB_NODE * node)
{
+ H5TB_NODE *ret_value; /* Return value */
+
FUNC_ENTER_NOAPI(H5TB_prev,NULL);
- FUNC_LEAVE (H5TB_nbr(node, LEFT));
+ /* Set return value */
+ ret_value=H5TB_nbr(node, LEFT);
+
+done:
+ FUNC_LEAVE(ret_value);
} /* end H5TB_prev() */
@@ -871,6 +919,8 @@ H5TB_prev(H5TB_NODE * node)
H5TB_TREE *
H5TB_dfree(H5TB_TREE * tree, void(*fd) (void * /* item */), void(*fk) (void * /* key */))
{
+ H5TB_TREE *ret_value=NULL; /* Return value */
+
FUNC_ENTER_NOAPI(H5TB_dfree,NULL);
if (tree != NULL) {
@@ -881,7 +931,8 @@ H5TB_dfree(H5TB_TREE * tree, void(*fd) (void * /* item */), void(*fk) (void * /*
H5MM_xfree(tree);
} /* end if */
- FUNC_LEAVE(NULL);
+done:
+ FUNC_LEAVE(ret_value);
} /* end H5TB_dfree() */
@@ -914,6 +965,7 @@ void *
H5TB_free(H5TB_NODE ** root, void(*fd) (void * /* item */), void(*fk) (void * /* key */))
{
H5TB_NODE *par, *node = *root;
+ void *ret_value=NULL; /* Return value */
FUNC_ENTER_NOAPI(H5TB_free,NULL);
@@ -950,7 +1002,9 @@ H5TB_free(H5TB_NODE ** root, void(*fd) (void * /* item */), void(*fk) (void * /*
} /* end else */
} while (NULL != par); /* While moving back up tree */
} /* end while */
- FUNC_LEAVE(NULL);
+
+done:
+ FUNC_LEAVE(ret_value);
} /* end H5TB_free() */
@@ -974,9 +1028,15 @@ H5TB_free(H5TB_NODE ** root, void(*fd) (void * /* item */), void(*fk) (void * /*
long
H5TB_count(H5TB_TREE * tree)
{
+ long ret_value; /* Return value */
+
FUNC_ENTER_NOAPI(H5TB_count,FAIL);
- FUNC_LEAVE((tree==NULL) ? FAIL : (long)tree->count );
+ /* Set return value */
+ ret_value= (tree==NULL) ? FAIL : (long)tree->count;
+
+done:
+ FUNC_LEAVE(ret_value);
} /* end H5TB_count() */
#ifdef H5TB_DEBUG
diff --git a/src/H5Tbit.c b/src/H5Tbit.c
index abc39b0..6f235e7 100644
--- a/src/H5Tbit.c
+++ b/src/H5Tbit.c
@@ -170,6 +170,7 @@ H5T_bit_get_d (uint8_t *buf, size_t offset, size_t size)
{
hsize_t val=0;
size_t i, hs;
+ hsize_t ret_value; /* Return value */
FUNC_ENTER_NOAPI(H5T_bit_get_d, 0);
@@ -177,22 +178,26 @@ H5T_bit_get_d (uint8_t *buf, size_t offset, size_t size)
H5T_bit_copy ((uint8_t*)&val, 0, buf, offset, size);
switch (((H5T_t*)(H5I_object(H5T_NATIVE_INT_g)))->u.atomic.order) {
- case H5T_ORDER_LE:
- break;
+ case H5T_ORDER_LE:
+ break;
- case H5T_ORDER_BE:
- for (i=0, hs=sizeof(val)/2; i<hs; i++) {
- uint8_t tmp = ((uint8_t*)&val)[i];
- ((uint8_t*)&val)[i] = ((uint8_t*)&val)[sizeof(val)-(i+1)];
- ((uint8_t*)&val)[sizeof(val)-(i+1)] = tmp;
- }
- break;
+ case H5T_ORDER_BE:
+ for (i=0, hs=sizeof(val)/2; i<hs; i++) {
+ uint8_t tmp = ((uint8_t*)&val)[i];
+ ((uint8_t*)&val)[i] = ((uint8_t*)&val)[sizeof(val)-(i+1)];
+ ((uint8_t*)&val)[sizeof(val)-(i+1)] = tmp;
+ }
+ break;
- default:
- HDabort ();
+ default:
+ HDabort ();
}
- FUNC_LEAVE (val);
+ /* Set return value */
+ ret_value=val;
+
+done:
+ FUNC_LEAVE (ret_value);
}
diff --git a/src/H5Tvlen.c b/src/H5Tvlen.c
index a777631..8efa915 100644
--- a/src/H5Tvlen.c
+++ b/src/H5Tvlen.c
@@ -149,13 +149,18 @@ hssize_t
H5T_vlen_seq_mem_getlen(H5F_t UNUSED *f, void *vl_addr)
{
hvl_t *vl=(hvl_t *)vl_addr; /* Pointer to the user's hvl_t information */
+ hssize_t ret_value; /* Return value */
FUNC_ENTER_NOAPI(H5T_vlen_seq_mem_getlen, FAIL);
/* check parameters */
assert(vl);
- FUNC_LEAVE ((hssize_t)vl->len);
+ /* Set return value */
+ ret_value=(hssize_t)vl->len;
+
+done:
+ FUNC_LEAVE(ret_value);
} /* end H5T_vlen_seq_mem_getlen() */
@@ -177,6 +182,7 @@ herr_t
H5T_vlen_seq_mem_read(H5F_t UNUSED *f, void *vl_addr, void *buf, size_t len)
{
hvl_t *vl=(hvl_t *)vl_addr; /* Pointer to the user's hvl_t information */
+ herr_t ret_value=SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(H5T_vlen_seq_mem_read, FAIL);
@@ -186,7 +192,8 @@ H5T_vlen_seq_mem_read(H5F_t UNUSED *f, void *vl_addr, void *buf, size_t len)
HDmemcpy(buf,vl->p,len);
- FUNC_LEAVE (SUCCEED);
+done:
+ FUNC_LEAVE (ret_value);
} /* end H5T_vlen_seq_mem_read() */
@@ -279,13 +286,18 @@ hssize_t
H5T_vlen_str_mem_getlen(H5F_t UNUSED *f, void *vl_addr)
{
char *s=*(char **)vl_addr; /* Pointer to the user's hvl_t information */
+ hssize_t ret_value; /* Return value */
FUNC_ENTER_NOAPI(H5T_vlen_str_mem_getlen, FAIL);
/* check parameters */
assert(s);
- FUNC_LEAVE ( (hssize_t)HDstrlen(s));
+ /* Set return value */
+ ret_value=(hssize_t)HDstrlen(s);
+
+done:
+ FUNC_LEAVE(ret_value);
} /* end H5T_vlen_str_mem_getlen() */
@@ -307,6 +319,7 @@ herr_t
H5T_vlen_str_mem_read(H5F_t UNUSED *f, void *vl_addr, void *buf, size_t len)
{
char *s=*(char **)vl_addr; /* Pointer to the user's hvl_t information */
+ herr_t ret_value=SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(H5T_vlen_str_mem_read, FAIL);
@@ -316,7 +329,8 @@ H5T_vlen_str_mem_read(H5F_t UNUSED *f, void *vl_addr, void *buf, size_t len)
HDmemcpy(buf,s,len);
- FUNC_LEAVE (SUCCEED);
+done:
+ FUNC_LEAVE (ret_value);
} /* end H5T_vlen_str_mem_read() */
@@ -409,6 +423,7 @@ H5T_vlen_disk_getlen(H5F_t UNUSED *f, void *vl_addr)
UINT32DECODE(vl, ret_value);
+done:
FUNC_LEAVE (ret_value);
} /* end H5T_vlen_disk_getlen() */
diff --git a/src/H5V.c b/src/H5V.c
index 96bde6b..0f90860 100644
--- a/src/H5V.c
+++ b/src/H5V.c
@@ -41,6 +41,8 @@ herr_t
H5V_stride_optimize1(unsigned *np/*in,out*/, hsize_t *elmt_size/*in,out*/,
hsize_t *size, hssize_t *stride1)
{
+ herr_t ret_value=SUCCEED; /* Return value */
+
FUNC_ENTER_NOAPI(H5V_stride_optimize1, FAIL);
/*
@@ -60,8 +62,10 @@ H5V_stride_optimize1(unsigned *np/*in,out*/, hsize_t *elmt_size/*in,out*/,
}
}
- FUNC_LEAVE(SUCCEED);
+done:
+ FUNC_LEAVE(ret_value);
}
+
/*-------------------------------------------------------------------------
* Function: H5V_stride_optimize2
@@ -90,6 +94,8 @@ herr_t
H5V_stride_optimize2(unsigned *np/*in,out*/, hsize_t *elmt_size/*in,out*/,
hsize_t *size, hssize_t *stride1, hssize_t *stride2)
{
+ herr_t ret_value=SUCCEED; /* Return value */
+
FUNC_ENTER_NOAPI(H5V_stride_optimize2, FAIL);
/*
@@ -198,8 +204,10 @@ H5V_stride_optimize2(unsigned *np/*in,out*/, hsize_t *elmt_size/*in,out*/,
break;
} /* end switch */
- FUNC_LEAVE(SUCCEED);
+done:
+ FUNC_LEAVE(ret_value);
}
+
/*-------------------------------------------------------------------------
* Function: H5V_hyper_stride
@@ -242,6 +250,7 @@ H5V_hyper_stride(unsigned n, const hsize_t *size,
hsize_t acc; /*accumulator */
hsize_t tmp;
int i; /*counter */
+ hsize_t ret_value; /* Return value */
FUNC_ENTER_NOAPI(H5V_hyper_stride, (HDabort(), 0));
@@ -309,7 +318,11 @@ H5V_hyper_stride(unsigned n, const hsize_t *size,
break;
} /* end switch */
- FUNC_LEAVE(skip);
+ /* Set return value */
+ ret_value=skip;
+
+done:
+ FUNC_LEAVE(ret_value);
}
@@ -449,7 +462,7 @@ H5V_hyper_fill(unsigned n, const hsize_t *_size,
hssize_t dst_stride[H5V_HYPER_NDIMS]; /*destination stride info */
hsize_t dst_start; /*byte offset to start of stride*/
hsize_t elmt_size = 1; /*bytes per element */
- herr_t status; /*function return status */
+ herr_t ret_value; /*function return status */
#ifndef NDEBUG
unsigned u;
#endif
@@ -476,10 +489,11 @@ H5V_hyper_fill(unsigned n, const hsize_t *_size,
H5V_stride_optimize1(&n, &elmt_size, size, dst_stride);
/* Copy */
- status = H5V_stride_fill(n, elmt_size, size, dst_stride, dst+dst_start,
+ ret_value = H5V_stride_fill(n, elmt_size, size, dst_stride, dst+dst_start,
fill_value);
- FUNC_LEAVE(status);
+done:
+ FUNC_LEAVE(ret_value);
}
@@ -537,7 +551,7 @@ H5V_hyper_copy(unsigned n, const hsize_t *_size,
hsize_t elmt_size = 1; /*element size in bytes */
hsize_t tmp1;
hsize_t tmp2;
- herr_t status; /*return status */
+ herr_t ret_value; /*return status */
#ifndef NDEBUG
unsigned u;
#endif
@@ -676,11 +690,13 @@ H5V_hyper_copy(unsigned n, const hsize_t *_size,
H5V_stride_optimize2(&n, &elmt_size, size, dst_stride, src_stride);
/* Perform the copy in terms of stride */
- status = H5V_stride_copy(n, elmt_size, size,
+ ret_value = H5V_stride_copy(n, elmt_size, size,
dst_stride, dst+dst_start, src_stride, src+src_start);
- FUNC_LEAVE(status);
+done:
+ FUNC_LEAVE(ret_value);
}
+
/*-------------------------------------------------------------------------
* Function: H5V_stride_fill
@@ -707,6 +723,7 @@ H5V_stride_fill(unsigned n, hsize_t elmt_size, const hsize_t *size,
hsize_t i; /*counter */
int j; /*counter */
hbool_t carry; /*subtraction carray value */
+ herr_t ret_value=SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(H5V_stride_fill, FAIL);
assert (elmt_size < SIZET_MAX);
@@ -728,8 +745,10 @@ H5V_stride_fill(unsigned n, hsize_t elmt_size, const hsize_t *size,
}
}
- FUNC_LEAVE(SUCCEED);
+done:
+ FUNC_LEAVE(ret_value);
}
+
/*-------------------------------------------------------------------------
* Function: H5V_stride_copy
@@ -764,6 +783,7 @@ H5V_stride_copy(unsigned n, hsize_t elmt_size, const hsize_t *size,
hsize_t i; /*counter */
int j; /*counters */
hbool_t carry; /*carray for subtraction*/
+ herr_t ret_value=SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(H5V_stride_copy, FAIL);
assert (elmt_size<SIZET_MAX);
@@ -793,7 +813,8 @@ H5V_stride_copy(unsigned n, hsize_t elmt_size, const hsize_t *size,
HDmemcpy (dst, src, (size_t)elmt_size);
}
- FUNC_LEAVE(SUCCEED);
+done:
+ FUNC_LEAVE(ret_value);
}
/*-------------------------------------------------------------------------
@@ -833,6 +854,7 @@ H5V_stride_copy2(hsize_t nelmts, hsize_t elmt_size,
hsize_t i;
int j;
hbool_t carry;
+ herr_t ret_value=SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(H5V_stride_copy2, FAIL);
@@ -849,17 +871,22 @@ H5V_stride_copy2(hsize_t nelmts, hsize_t elmt_size,
/* Decrement indices and advance pointers */
for (j=dst_n-1, carry=TRUE; j>=0 && carry; --j) {
dst += dst_stride[j];
- if (--dst_idx[j]) carry = FALSE;
- else dst_idx[j] = dst_size[j];
+ if (--dst_idx[j])
+ carry = FALSE;
+ else
+ dst_idx[j] = dst_size[j];
}
for (j=src_n-1, carry=TRUE; j>=0 && carry; --j) {
src += src_stride[j];
- if (--src_idx[j]) carry = FALSE;
- else src_idx[j] = src_size[j];
+ if (--src_idx[j])
+ carry = FALSE;
+ else
+ src_idx[j] = src_size[j];
}
}
- FUNC_LEAVE(SUCCEED);
+done:
+ FUNC_LEAVE(ret_value);
}
/*-------------------------------------------------------------------------
@@ -885,6 +912,7 @@ H5V_array_fill(void *_dst, const void *src, size_t size, size_t count)
size_t copy_items; /* number of items currently copying*/
size_t items_left; /* number of items left to copy */
uint8_t *dst=(uint8_t*)_dst;/* alias for pointer arithmetic */
+ herr_t ret_value=SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(H5V_array_fill, FAIL);
@@ -914,7 +942,8 @@ H5V_array_fill(void *_dst, const void *src, size_t size, size_t count)
if (items_left > 0) /* if there are any items left to copy */
HDmemcpy(dst, _dst, items_left * size);
- FUNC_LEAVE(SUCCEED);
+done:
+ FUNC_LEAVE(ret_value);
} /* H5V_array_fill() */
@@ -944,6 +973,7 @@ H5V_array_offset(unsigned n, const hsize_t *total_size, const hssize_t *offset)
hsize_t skip; /*starting point byte offset */
hsize_t acc; /*accumulator */
int i; /*counter */
+ hsize_t ret_value; /* Return value */
FUNC_ENTER_NOAPI(H5V_array_offset, (HDabort(), 0));
@@ -957,6 +987,10 @@ H5V_array_offset(unsigned n, const hsize_t *total_size, const hssize_t *offset)
acc *= total_size[i];
} /* end for */
- FUNC_LEAVE(skip);
+ /* Set return value */
+ ret_value=skip;
+
+done:
+ FUNC_LEAVE(ret_value);
} /* end H5V_array_offset() */
diff --git a/src/H5private.h b/src/H5private.h
index f689b48..4f7e654 100644
--- a/src/H5private.h
+++ b/src/H5private.h
@@ -1109,7 +1109,7 @@ extern hbool_t H5_libinit_g; /* Has the library been initialized? */
if (!(H5_INIT_GLOBAL)) { \
H5_INIT_GLOBAL = TRUE; \
if (H5_init_library()<0) { \
- HRETURN_ERROR (H5E_FUNC, H5E_CANTINIT, err, \
+ HGOTO_ERROR (H5E_FUNC, H5E_CANTINIT, err, \
"library initialization failed"); \
} \
} \
@@ -1120,7 +1120,7 @@ extern hbool_t H5_libinit_g; /* Has the library been initialized? */
if (interface_init_func && \
((herr_t(*)(void))interface_init_func)()<0) { \
interface_initialize_g = 0; \
- HRETURN_ERROR (H5E_FUNC, H5E_CANTINIT, err, \
+ HGOTO_ERROR (H5E_FUNC, H5E_CANTINIT, err, \
"interface initialization failed"); \
} \
}
@@ -1132,7 +1132,7 @@ extern hbool_t H5_libinit_g; /* Has the library been initialized? */
if (interface_init_func && \
((herr_t(*)(void))interface_init_func)()<0) { \
interface_initialize_g = 0; \
- HRETURN_ERROR (H5E_FUNC, H5E_CANTINIT, err, \
+ HGOTO_ERROR (H5E_FUNC, H5E_CANTINIT, err, \
"interface initialization failed"); \
} \
}