mirror of
https://github.com/HDFGroup/hdf5.git
synced 2025-03-31 17:10:47 +08:00
[svn-r2579] Purpose:
Clean up small compiler warnings and add missing function prototypes. Platforms tested: FreeBSD 4.1
This commit is contained in:
parent
073ef8f453
commit
22867dca0e
@ -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);
|
||||
|
@ -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);
|
||||
|
@ -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,
|
||||
|
@ -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,
|
||||
|
@ -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);
|
||||
|
@ -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();
|
||||
|
23
src/H5P.c
23
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);
|
||||
|
||||
|
@ -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 */
|
||||
|
@ -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);
|
||||
|
@ -1235,7 +1235,6 @@ dump_data(hid_t obj_id, int obj_data)
|
||||
h5dump_t *outputformat = &dataformat;
|
||||
int d_status = -1;
|
||||
void *buf;
|
||||
char *attr_name = malloc(sizeof(char)*80);
|
||||
hid_t space, type, p_type;
|
||||
int ndims, i;
|
||||
hsize_t size[64], nelmts = 1;
|
||||
|
@ -1598,18 +1598,6 @@ void test_nestcomp(void){
|
||||
s1_t s1[10];
|
||||
hid_t s1_tid; /* File datatype identifier */
|
||||
|
||||
/* Second structure (subset of s1_t) and dataset*/
|
||||
typedef struct s2_t {
|
||||
double c;
|
||||
int a;
|
||||
} s2_t;
|
||||
s2_t s2[10];
|
||||
hid_t s2_tid; /* Memory datatype handle */
|
||||
|
||||
/* Third "structure" ( will be used to read float field of s1) */
|
||||
hid_t s3_tid; /* Memory datatype handle */
|
||||
float s3[10];
|
||||
|
||||
int i;
|
||||
hid_t file, dataset, space; /* Handles */
|
||||
herr_t status;
|
||||
|
Loading…
x
Reference in New Issue
Block a user