summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2000-09-19 21:08:15 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2000-09-19 21:08:15 (GMT)
commit22867dca0e1123aef450b3feae34661cefb64a91 (patch)
tree879369bd3df77b6e8c7834f7a3d9980236116e8d /src
parent073ef8f453445bbe0cfa2569abdaed2a50721a95 (diff)
downloadhdf5-22867dca0e1123aef450b3feae34661cefb64a91.zip
hdf5-22867dca0e1123aef450b3feae34661cefb64a91.tar.gz
hdf5-22867dca0e1123aef450b3feae34661cefb64a91.tar.bz2
[svn-r2579] Purpose:
Clean up small compiler warnings and add missing function prototypes. Platforms tested: FreeBSD 4.1
Diffstat (limited to 'src')
-rw-r--r--src/H5FDfamily.c3
-rw-r--r--src/H5FDlog.c3
-rw-r--r--src/H5FDprivate.h1
-rw-r--r--src/H5FDpublic.h1
-rw-r--r--src/H5FDsec2.c3
-rw-r--r--src/H5FDstdio.c4
-rw-r--r--src/H5P.c23
-rw-r--r--src/H5Shyper.c4
-rw-r--r--src/H5Sprivate.h1
9 files changed, 22 insertions, 21 deletions
diff --git a/src/H5FDfamily.c b/src/H5FDfamily.c
index fdb0ac5..1c456a4 100644
--- a/src/H5FDfamily.c
+++ b/src/H5FDfamily.c
@@ -627,9 +627,8 @@ H5FD_family_cmp(const H5FD_t *_f1, const H5FD_t *_f2)
*-------------------------------------------------------------------------
*/
static herr_t
-H5FD_family_query(const H5FD_t *_f, unsigned long *flags /* out */)
+H5FD_family_query(const UNUSED H5FD_t *_f, unsigned long *flags /* out */)
{
- const H5FD_family_t *f = (const H5FD_family_t*)_f;
herr_t ret_value=SUCCEED;
FUNC_ENTER(H5FD_family_query, FAIL);
diff --git a/src/H5FDlog.c b/src/H5FDlog.c
index c441793..148f3ef 100644
--- a/src/H5FDlog.c
+++ b/src/H5FDlog.c
@@ -636,9 +636,8 @@ H5FD_log_cmp(const H5FD_t *_f1, const H5FD_t *_f2)
*-------------------------------------------------------------------------
*/
static herr_t
-H5FD_log_query(const H5FD_t *_f, unsigned long *flags /* out */)
+H5FD_log_query(const UNUSED H5FD_t *_f, unsigned long *flags /* out */)
{
- const H5FD_log_t *f = (const H5FD_log_t*)_f;
herr_t ret_value=SUCCEED;
FUNC_ENTER(H5FD_log_query, FAIL);
diff --git a/src/H5FDprivate.h b/src/H5FDprivate.h
index d1baa99..9f7a6de 100644
--- a/src/H5FDprivate.h
+++ b/src/H5FDprivate.h
@@ -26,6 +26,7 @@ __DLL__ H5FD_t *H5FD_open(const char *name, unsigned flags, hid_t fapl_id,
haddr_t maxaddr);
__DLL__ herr_t H5FD_close(H5FD_t *file);
__DLL__ int H5FD_cmp(const H5FD_t *f1, const H5FD_t *f2);
+__DLL__ int H5FD_query(const H5FD_t *f, unsigned long *flags);
__DLL__ haddr_t H5FD_alloc(H5FD_t *file, H5FD_mem_t type, hsize_t size);
__DLL__ herr_t H5FD_free(H5FD_t *file, H5FD_mem_t type, haddr_t addr, hsize_t size);
__DLL__ haddr_t H5FD_realloc(H5FD_t *file, H5FD_mem_t type, haddr_t old_addr,
diff --git a/src/H5FDpublic.h b/src/H5FDpublic.h
index c97f76b..8971590 100644
--- a/src/H5FDpublic.h
+++ b/src/H5FDpublic.h
@@ -172,6 +172,7 @@ __DLL__ H5FD_t *H5FDopen(const char *name, unsigned flags, hid_t fapl_id,
haddr_t maxaddr);
__DLL__ herr_t H5FDclose(H5FD_t *file);
__DLL__ int H5FDcmp(const H5FD_t *f1, const H5FD_t *f2);
+__DLL__ int H5FDquery(const H5FD_t *f, unsigned long *flags);
__DLL__ haddr_t H5FDalloc(H5FD_t *file, H5FD_mem_t type, hsize_t size);
__DLL__ herr_t H5FDfree(H5FD_t *file, H5FD_mem_t type, haddr_t addr, hsize_t size);
__DLL__ haddr_t H5FDrealloc(H5FD_t *file, H5FD_mem_t type, haddr_t addr,
diff --git a/src/H5FDsec2.c b/src/H5FDsec2.c
index 7e66f39..6222964 100644
--- a/src/H5FDsec2.c
+++ b/src/H5FDsec2.c
@@ -406,9 +406,8 @@ H5FD_sec2_cmp(const H5FD_t *_f1, const H5FD_t *_f2)
*-------------------------------------------------------------------------
*/
static herr_t
-H5FD_sec2_query(const H5FD_t *_f, unsigned long *flags /* out */)
+H5FD_sec2_query(const UNUSED H5FD_t *_f, unsigned long *flags /* out */)
{
- const H5FD_sec2_t *f = (const H5FD_sec2_t*)_f;
herr_t ret_value=SUCCEED;
FUNC_ENTER(H5FD_sec2_query, FAIL);
diff --git a/src/H5FDstdio.c b/src/H5FDstdio.c
index 62dc93c..5461996 100644
--- a/src/H5FDstdio.c
+++ b/src/H5FDstdio.c
@@ -430,7 +430,8 @@ H5FD_stdio_cmp(const H5FD_t *_f1, const H5FD_t *_f2)
static herr_t
H5FD_stdio_query(const H5FD_t *_f, unsigned long *flags /* out */)
{
- const H5FD_stdio_t *f = (const H5FD_stdio_t*)_f;
+ /* Shut compiler up */
+ _f=_f;
/* Set the VFL feature flags that this driver supports */
if(flags) {
@@ -670,6 +671,7 @@ H5FD_stdio_write(H5FD_t *_file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr,
/* Shut compiler up */
dxpl_id=dxpl_id;
+ type=type;
/* Clear the error stack */
H5Eclear();
diff --git a/src/H5P.c b/src/H5P.c
index 468cca2..2bdf003 100644
--- a/src/H5P.c
+++ b/src/H5P.c
@@ -3212,9 +3212,10 @@ done:
PURPOSE
Internal routine to remove all properties from a property hash table
USAGE
- herr_t H5P_free_all_prop(hash, hashsize)
+ herr_t H5P_free_all_prop(hash, hashsize, make_cb)
H5P_gen_prop_t *hash[]; IN/OUT: Pointer to array of properties for hash table
uintn hashsize; IN: Size of hash table
+ uintn make_cb; IN: Whether to make property callbacks or not
RETURNS
Returns non-negative on success, negative on failure.
DESCRIPTION
@@ -3226,7 +3227,7 @@ done:
REVISION LOG
--------------------------------------------------------------------------*/
static herr_t
-H5P_free_all_prop(H5P_genprop_t *hash[], uintn hashsize)
+H5P_free_all_prop(H5P_genprop_t *hash[], uintn hashsize, uintn make_cb)
{
H5P_genprop_t *tprop, *next;/* Temporary pointer to properties */
uintn u; /* Local index variable */
@@ -3245,7 +3246,7 @@ H5P_free_all_prop(H5P_genprop_t *hash[], uintn hashsize)
next=tprop->next;
/* Call the close callback and ignore the return value, there's nothing we can do about it */
- if(tprop->close!=NULL)
+ if(make_cb && tprop->close!=NULL)
(tprop->close)(tprop->name,&(tprop->value));
/* Free the property, ignoring return value, nothing we can do */
@@ -3324,10 +3325,10 @@ H5P_access_class(H5P_genclass_t *pclass, H5P_class_mod_t mod)
assert(pclass->name);
H5MM_xfree(pclass->name);
-/*!! Need to not make callbacks for these... */
+ /* Free the class properties without making callbacks */
+ H5P_free_all_prop(pclass->props,pclass->hashsize,0);
- /* Make calls to any property close callbacks which exist */
-/* H5P_free_all_prop(plist->props,plist->pclass->hashsize); */
+ H5MM_xfree(pclass);
} /* end if */
#ifdef LATER
@@ -3616,7 +3617,7 @@ done:
if(ret_value==NULL) {
if(plist!=NULL) {
/* Close & free all the properties */
- H5P_free_all_prop(plist->props,class->hashsize);
+ H5P_free_all_prop(plist->props,class->hashsize,1);
/* Decrement the number of property lists derived from the class */
class->plists--;
@@ -4779,13 +4780,13 @@ herr_t H5P_close_list(H5P_genplist_t *plist)
assert(plist);
- /* Decrement parent class's dependant property list value! */
+ /* Make calls to any property close callbacks which exist */
+ H5P_free_all_prop(plist->props,plist->pclass->hashsize,1);
+
+ /* Decrement class's dependant property list value! */
if(H5P_access_class(plist->pclass,H5P_MOD_DEC_LST)<0)
HGOTO_ERROR (H5E_PLIST, H5E_CANTINIT, FAIL, "Can't decrement class ref count");
- /* Make calls to any property close callbacks which exist */
- H5P_free_all_prop(plist->props,plist->pclass->hashsize);
-
/* Destroy property list object */
H5MM_xfree(plist);
diff --git a/src/H5Shyper.c b/src/H5Shyper.c
index c140e70..4b8c502 100644
--- a/src/H5Shyper.c
+++ b/src/H5Shyper.c
@@ -1762,7 +1762,6 @@ H5S_hyper_add (H5S_t *space, H5S_hyper_node_t *piece_lst)
H5S_hyper_node_t *slab; /* New hyperslab node to insert */
H5S_hyper_node_t *tmp_slab; /* Temporary hyperslab node */
H5S_hyper_bound_t *tmp; /* Temporary pointer to an hyperslab bound array */
- intn bound_loc; /* Boundary location to insert hyperslab */
size_t elem_count; /* Number of elements in hyperslab selection */
uintn piece_count; /* Number of hyperslab pieces being added */
intn i; /* Counters */
@@ -3025,8 +3024,7 @@ H5S_select_hyperslab (H5S_t *space, H5S_seloper_t op,
hssize_t slab[H5O_LAYOUT_NDIMS]; /* Location of the block to add for strided selections */
size_t slice[H5O_LAYOUT_NDIMS]; /* Size of preceding dimension's slice */
H5S_hyper_node_t *add=NULL, /* List of hyperslab nodes to add */
- *uniq=NULL, /* List of unique hyperslab nodes */
- *tmp; /* Temporary hyperslab node */
+ *uniq=NULL; /* List of unique hyperslab nodes */
uintn acc; /* Accumulator for building slices */
uintn contig; /* whether selection is contiguous or not */
int i,j; /* Counters */
diff --git a/src/H5Sprivate.h b/src/H5Sprivate.h
index 0f3bcb0..4de6e34 100644
--- a/src/H5Sprivate.h
+++ b/src/H5Sprivate.h
@@ -386,6 +386,7 @@ __DLL__ int H5S_hyper_compare_regions(const void *r1, const void *r2);
__DLL__ int H5S_hyper_compare_bounds(const void *r1, const void *r2);
__DLL__ herr_t H5S_hyper_copy(H5S_t *dst, const H5S_t *src);
__DLL__ htri_t H5S_hyper_select_valid(const H5S_t *space);
+__DLL__ intn H5S_hyper_bound_comp(const void *_b1, const void *_b2);
__DLL__ herr_t H5S_hyper_node_add(H5S_hyper_node_t **head, intn endflag,
intn rank, const hssize_t *start,
const hsize_t *size);