summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2004-03-30 20:45:20 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2004-03-30 20:45:20 (GMT)
commit0180863320994d8a7efba446f81bd73819315cd2 (patch)
tree20f05c3c8792ba079ca636a8264800891cfb4f25 /src
parentb3e1ba581622ed413b7da5ddc7c7e99d37a00c73 (diff)
downloadhdf5-0180863320994d8a7efba446f81bd73819315cd2.zip
hdf5-0180863320994d8a7efba446f81bd73819315cd2.tar.gz
hdf5-0180863320994d8a7efba446f81bd73819315cd2.tar.bz2
[svn-r8288] Purpose:
Bug fix/code cleanup Description: Copy Robb's feature in SSlib that checks that the name of the function used in the FUNC_ENTER macro is actually the name of function. Fixed a bunch of typos & copy-n-pasto's for functions with incorrect names. Platforms tested: FreeBSD 4.9 (sleipnir) w/parallel too minor to require h5committest
Diffstat (limited to 'src')
-rw-r--r--src/H5A.c2
-rw-r--r--src/H5Dcontig.c4
-rw-r--r--src/H5Distore.c2
-rw-r--r--src/H5F.c2
-rw-r--r--src/H5FDlog.c2
-rw-r--r--src/H5FDmpiposix.c2
-rw-r--r--src/H5FDsec2.c2
-rw-r--r--src/H5Fcontig.c4
-rw-r--r--src/H5Fistore.c2
-rw-r--r--src/H5Gnode.c2
-rw-r--r--src/H5O.c2
-rw-r--r--src/H5P.c2
-rw-r--r--src/H5Tbit.c2
-rw-r--r--src/H5Tconv.c4
-rw-r--r--src/H5Tfields.c2
-rw-r--r--src/H5Tnative.c2
-rw-r--r--src/H5Tvlen.c2
-rw-r--r--src/H5private.h12
18 files changed, 32 insertions, 20 deletions
diff --git a/src/H5A.c b/src/H5A.c
index a893849..e7f0cf2 100644
--- a/src/H5A.c
+++ b/src/H5A.c
@@ -1383,7 +1383,7 @@ H5Adelete(hid_t loc_id, const char *name)
int idx=0, found=-1;
herr_t ret_value;
- FUNC_ENTER_API(H5Aopen_name, FAIL);
+ FUNC_ENTER_API(H5Adelete, FAIL);
H5TRACE2("e","is",loc_id,name);
/* check arguments */
diff --git a/src/H5Dcontig.c b/src/H5Dcontig.c
index bb64916..525d557 100644
--- a/src/H5Dcontig.c
+++ b/src/H5Dcontig.c
@@ -85,7 +85,7 @@ H5F_contig_create(H5F_t *f, hid_t dxpl_id, struct H5O_layout_t *layout)
unsigned u; /* Local index variable */
herr_t ret_value=SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5O_contig_create, FAIL);
+ FUNC_ENTER_NOAPI(H5F_contig_create, FAIL);
/* check args */
assert(f);
@@ -334,7 +334,7 @@ H5F_contig_delete(H5F_t *f, hid_t dxpl_id, const struct H5O_layout_t *layout)
unsigned u; /* Local index variable */
herr_t ret_value=SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5O_contig_delete, FAIL);
+ FUNC_ENTER_NOAPI(H5F_contig_delete, FAIL);
/* check args */
assert(f);
diff --git a/src/H5Distore.c b/src/H5Distore.c
index eaf0671..f38b397 100644
--- a/src/H5Distore.c
+++ b/src/H5Distore.c
@@ -2033,7 +2033,7 @@ H5F_istore_allocated(H5F_t *f, hid_t dxpl_id, unsigned ndims, haddr_t addr)
H5F_istore_ud1_t udata;
hsize_t ret_value; /* Return value */
- FUNC_ENTER_NOAPI(H5F_istore_nchunks, 0);
+ FUNC_ENTER_NOAPI(H5F_istore_allocated, 0);
HDmemset(&udata, 0, sizeof udata);
udata.mesg.ndims = ndims;
diff --git a/src/H5F.c b/src/H5F.c
index 042c5e8..5748d8b 100644
--- a/src/H5F.c
+++ b/src/H5F.c
@@ -1074,7 +1074,7 @@ H5F_get_objects(H5F_t *f, unsigned types, int max_index, hid_t *obj_id_list)
H5F_olist_t olist; /* Structure to hold search results */
int ret_value; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5F_get_object);
+ FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5F_get_objects);
/* Set up search information */
olist.obj_id_list = (max_index==0 ? NULL : obj_id_list);
diff --git a/src/H5FDlog.c b/src/H5FDlog.c
index 1073ab6..85bf006 100644
--- a/src/H5FDlog.c
+++ b/src/H5FDlog.c
@@ -966,7 +966,7 @@ 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_ENTER_NOAPI(H5FD_log_get_eof, HADDR_UNDEF);
/* Set return value */
ret_value=MAX(file->eof, file->eoa);
diff --git a/src/H5FDmpiposix.c b/src/H5FDmpiposix.c
index a51945d..3accc36 100644
--- a/src/H5FDmpiposix.c
+++ b/src/H5FDmpiposix.c
@@ -598,7 +598,7 @@ 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);
+ FUNC_ENTER_NOAPI(H5FD_mpiposix_mpi_size, FAIL);
assert(file);
assert(H5FD_MPIPOSIX==file->pub.driver_id);
diff --git a/src/H5FDsec2.c b/src/H5FDsec2.c
index 94eabfb..2dbc9b2 100644
--- a/src/H5FDsec2.c
+++ b/src/H5FDsec2.c
@@ -574,7 +574,7 @@ 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_ENTER_NOAPI(H5FD_sec2_get_eof, HADDR_UNDEF);
/* Set return value */
ret_value=MAX(file->eof, file->eoa);
diff --git a/src/H5Fcontig.c b/src/H5Fcontig.c
index bb64916..525d557 100644
--- a/src/H5Fcontig.c
+++ b/src/H5Fcontig.c
@@ -85,7 +85,7 @@ H5F_contig_create(H5F_t *f, hid_t dxpl_id, struct H5O_layout_t *layout)
unsigned u; /* Local index variable */
herr_t ret_value=SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5O_contig_create, FAIL);
+ FUNC_ENTER_NOAPI(H5F_contig_create, FAIL);
/* check args */
assert(f);
@@ -334,7 +334,7 @@ H5F_contig_delete(H5F_t *f, hid_t dxpl_id, const struct H5O_layout_t *layout)
unsigned u; /* Local index variable */
herr_t ret_value=SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5O_contig_delete, FAIL);
+ FUNC_ENTER_NOAPI(H5F_contig_delete, FAIL);
/* check args */
assert(f);
diff --git a/src/H5Fistore.c b/src/H5Fistore.c
index eaf0671..f38b397 100644
--- a/src/H5Fistore.c
+++ b/src/H5Fistore.c
@@ -2033,7 +2033,7 @@ H5F_istore_allocated(H5F_t *f, hid_t dxpl_id, unsigned ndims, haddr_t addr)
H5F_istore_ud1_t udata;
hsize_t ret_value; /* Return value */
- FUNC_ENTER_NOAPI(H5F_istore_nchunks, 0);
+ FUNC_ENTER_NOAPI(H5F_istore_allocated, 0);
HDmemset(&udata, 0, sizeof udata);
udata.mesg.ndims = ndims;
diff --git a/src/H5Gnode.c b/src/H5Gnode.c
index a7a23b3..379d06f 100644
--- a/src/H5Gnode.c
+++ b/src/H5Gnode.c
@@ -1435,7 +1435,7 @@ H5G_node_type(H5F_t *f, hid_t dxpl_id, void UNUSED *_lt_key, haddr_t addr,
H5G_node_t *sn = NULL;
int ret_value = H5B_ITER_CONT;
- FUNC_ENTER_NOAPI(H5G_node_name, H5B_ITER_ERROR);
+ FUNC_ENTER_NOAPI(H5G_node_type, H5B_ITER_ERROR);
/* Check arguments. */
assert(f);
diff --git a/src/H5O.c b/src/H5O.c
index bb4ae4c..35c93f4 100644
--- a/src/H5O.c
+++ b/src/H5O.c
@@ -1245,7 +1245,7 @@ H5O_count (H5G_entry_t *ent, hid_t type_id, hid_t dxpl_id)
const H5O_class_t *type; /* Actual H5O class type for the ID */
int ret_value; /* Return value */
- FUNC_ENTER_NOAPI(H5O_count_real, FAIL);
+ FUNC_ENTER_NOAPI(H5O_count, FAIL);
/* Check args */
assert (ent);
diff --git a/src/H5P.c b/src/H5P.c
index 2bcf514..f98cb50 100644
--- a/src/H5P.c
+++ b/src/H5P.c
@@ -4291,7 +4291,7 @@ H5P_peek_voidp(H5P_genplist_t *plist, const char *name)
{
void * ret_value; /* return value */
- FUNC_ENTER_NOAPI(H5P_peek_voidp_t, NULL);
+ FUNC_ENTER_NOAPI(H5P_peek_voidp, NULL);
assert(plist);
assert(name);
diff --git a/src/H5Tbit.c b/src/H5Tbit.c
index f6e36c7..5650999 100644
--- a/src/H5Tbit.c
+++ b/src/H5Tbit.c
@@ -439,7 +439,7 @@ H5T_bit_inc(uint8_t *buf, size_t start, size_t size)
unsigned acc, mask;
/* Use FUNC_ENTER_NOAPI_NOINIT_NOFUNC here to avoid performance issues */
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5T_bit_find);
+ FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5T_bit_inc);
assert(buf);
start %= 8;
diff --git a/src/H5Tconv.c b/src/H5Tconv.c
index 65863ef..15f0701 100644
--- a/src/H5Tconv.c
+++ b/src/H5Tconv.c
@@ -5945,7 +5945,7 @@ H5T_conv_ulong_llong(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
{
herr_t ret_value=SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5T_conv_long_llong, FAIL);
+ FUNC_ENTER_NOAPI(H5T_conv_ulong_llong, FAIL);
H5T_CONV_uS(ULONG, LLONG, unsigned long, long_long, -, LLONG_MAX);
@@ -6643,7 +6643,7 @@ H5T_conv_double_float (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
{
herr_t ret_value=SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5T_conv_float_double, FAIL);
+ FUNC_ENTER_NOAPI(H5T_conv_double_float, FAIL);
H5T_CONV_Ff(DOUBLE, FLOAT, double, float, -FLT_MAX, FLT_MAX);
diff --git a/src/H5Tfields.c b/src/H5Tfields.c
index 0df9647..97a91be 100644
--- a/src/H5Tfields.c
+++ b/src/H5Tfields.c
@@ -81,7 +81,7 @@ H5Tget_nmembers(hid_t type_id)
H5T_t *dt = NULL;
int ret_value;
- FUNC_ENTER_API(H5Tget_num_members, FAIL);
+ FUNC_ENTER_API(H5Tget_nmembers, FAIL);
H5TRACE1("Is","i",type_id);
/* Check args */
diff --git a/src/H5Tnative.c b/src/H5Tnative.c
index d7abd7c..97e5587 100644
--- a/src/H5Tnative.c
+++ b/src/H5Tnative.c
@@ -688,7 +688,7 @@ H5T_get_native_float(size_t size, H5T_direction_t direction, size_t *struct_alig
} match=H5T_NATIVE_FLOAT_MATCH_UNKNOWN;
H5T_t *ret_value; /* Return value */
- FUNC_ENTER_NOAPI(H5T_get_native_integer, NULL);
+ FUNC_ENTER_NOAPI(H5T_get_native_float, NULL);
assert(size>0);
diff --git a/src/H5Tvlen.c b/src/H5Tvlen.c
index 2027257..ee3ec01 100644
--- a/src/H5Tvlen.c
+++ b/src/H5Tvlen.c
@@ -642,7 +642,7 @@ H5T_vlen_str_mem_setnull(H5F_t UNUSED *f, hid_t UNUSED dxpl_id, void *_vl, void
{
char *t=NULL; /* Pointer to temporary buffer allocated */
- FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5T_vlen_str_mem_write)
+ FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5T_vlen_str_mem_setnull)
/* Set pointer in user's buffer with memcpy, to avoid alignment issues */
HDmemcpy(_vl,&t,sizeof(char *));
diff --git a/src/H5private.h b/src/H5private.h
index 1d3e0db..be2c668 100644
--- a/src/H5private.h
+++ b/src/H5private.h
@@ -1135,12 +1135,24 @@ extern hbool_t H5_libinit_g; /* Has the library been initialized? */
extern hbool_t H5_MPEinit_g; /* Has the MPE Library been initialized? */
#endif
+/* Check if the function name is correct (if the compiler supports __FUNCTION__) */
+#ifdef H5_HAVE_FUNCTION
+#define H5_CHECK_FUNCNAME(func_name) \
+ assert(func_name && !HDstrcmp(#func_name, __FUNCTION__))
+#else /* H5_HAVE_FUNCTION */
+#define H5_CHECK_FUNCNAME(func_name) \
+ assert(func_name)
+#endif /* H5_HAVE_FUNCTION */
+
#define FUNC_ENTER_COMMON_NOFUNC(func_name,asrt) \
PABLO_SAVE (ID_ ## func_name) \
\
/* Check API status */ \
assert(asrt); \
\
+ /* Check function name */ \
+ H5_CHECK_FUNCNAME(func_name); \
+ \
/* Start tracing */ \
PABLO_TRACE_ON (PABLO_MASK, pablo_func_id)