[svn-r5219] Purpose:

Code cleanup

Description:
    Clean up warnings from gcc 3.1

Platforms tested:
    FreeBSD 4.5 (sleipnir)
This commit is contained in:
Quincey Koziol 2002-04-22 12:48:24 -05:00
parent 7527ed7d6f
commit e5fc40662c
20 changed files with 43 additions and 36 deletions

View File

@ -83,8 +83,8 @@ static hid_t fapl_g = -1;
*/
static size_t
counter (unsigned UNUSED flags, size_t UNUSED cd_nelmts,
const unsigned * UNUSED cd_values, size_t nbytes,
size_t * UNUSED buf_size, void ** UNUSED buf)
const unsigned UNUSED *cd_values, size_t nbytes,
size_t UNUSED *buf_size, void UNUSED **buf)
{
nio_g += nbytes;
return nbytes;

View File

@ -43,8 +43,12 @@
#endif
#define FILE_NAME_1 "overhead.h5"
#ifndef FALSE
#define FALSE 0
#endif /* FALSE */
#ifndef TRUE
#define TRUE 1
#endif /* TRUE */
typedef enum fill_t {
FILL_ALL,

View File

@ -2308,7 +2308,7 @@ printf("%s: check 1.0, nelmts=%d, H5S_get_select_npoints(file_space)=%d\n",FUNC,
if(H5P_get(dc_plist, H5D_CRT_DATA_PIPELINE_NAME, &pline) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't retrieve data pipeline");
if(H5P_fill_value_defined(dc_plist, &fill_status)<0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, NULL, "can't tell if fill value defined");
HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't tell if fill value defined");
if((fill_status==H5D_FILL_VALUE_DEFAULT || fill_status==H5D_FILL_VALUE_USER_DEFINED) && H5P_get(dc_plist, H5D_CRT_FILL_VALUE_NAME, &fill) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL,"can't retrieve fill value");
if(H5P_get(dc_plist, H5D_CRT_FILL_TIME_NAME, &fill_time) < 0)
@ -3387,6 +3387,7 @@ H5D_init_storage(H5D_t *dset, const H5S_t *space)
if ((buf=H5FL_BLK_ALLOC(fill_conv,bufsize,0))==NULL)
HGOTO_ERROR (H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed for fill buffer");
/* Fill the buffer with the fill value */
H5V_array_fill(buf, fill.buf, fill.size, ptsperbuf);
/* Start at the beginning of the dataset */

View File

@ -665,7 +665,7 @@ H5F_istore_new_node(H5F_t *f, H5B_ins_t op,
*/
static herr_t
H5F_istore_found(H5F_t UNUSED *f, haddr_t addr, const void *_lt_key,
void *_udata, const void * UNUSED _rt_key)
void *_udata, const void UNUSED *_rt_key)
{
H5F_istore_ud1_t *udata = (H5F_istore_ud1_t *) _udata;
const H5F_istore_key_t *lt_key = (const H5F_istore_key_t *) _lt_key;

View File

@ -670,7 +670,7 @@ H5FD_family_cmp(const H5FD_t *_f1, const H5FD_t *_f2)
*-------------------------------------------------------------------------
*/
static herr_t
H5FD_family_query(const H5FD_t * UNUSED _f, unsigned long *flags /* out */)
H5FD_family_query(const H5FD_t UNUSED * _f, unsigned long *flags /* out */)
{
herr_t ret_value=SUCCEED;

View File

@ -755,7 +755,7 @@ H5FD_log_cmp(const H5FD_t *_f1, const H5FD_t *_f2)
*-------------------------------------------------------------------------
*/
static herr_t
H5FD_log_query(const H5FD_t * UNUSED _f, unsigned long *flags /* out */)
H5FD_log_query(const H5FD_t UNUSED * _f, unsigned long *flags /* out */)
{
herr_t ret_value=SUCCEED;

View File

@ -431,7 +431,7 @@ H5FD_sec2_cmp(const H5FD_t *_f1, const H5FD_t *_f2)
*-------------------------------------------------------------------------
*/
static herr_t
H5FD_sec2_query(const H5FD_t * UNUSED _f, unsigned long *flags /* out */)
H5FD_sec2_query(const H5FD_t UNUSED * _f, unsigned long *flags /* out */)
{
herr_t ret_value=SUCCEED;

View File

@ -665,7 +665,7 @@ H5F_istore_new_node(H5F_t *f, H5B_ins_t op,
*/
static herr_t
H5F_istore_found(H5F_t UNUSED *f, haddr_t addr, const void *_lt_key,
void *_udata, const void * UNUSED _rt_key)
void *_udata, const void UNUSED *_rt_key)
{
H5F_istore_ud1_t *udata = (H5F_istore_ud1_t *) _udata;
const H5F_istore_key_t *lt_key = (const H5F_istore_key_t *) _lt_key;

View File

@ -130,7 +130,7 @@ H5FL_BLK_DEFINE_STATIC(symbol_node);
*-------------------------------------------------------------------------
*/
static size_t
H5G_node_sizeof_rkey(H5F_t *f, const void * UNUSED udata)
H5G_node_sizeof_rkey(H5F_t *f, const void UNUSED * udata)
{
return H5F_SIZEOF_SIZE(f); /*the name offset */
}
@ -627,8 +627,8 @@ H5G_node_cmp3(H5F_t *f, void *_lt_key, void *_udata, void *_rt_key)
*-------------------------------------------------------------------------
*/
static herr_t
H5G_node_found(H5F_t *f, haddr_t addr, const void * UNUSED _lt_key,
void *_udata, const void * UNUSED _rt_key)
H5G_node_found(H5F_t *f, haddr_t addr, const void UNUSED *_lt_key,
void *_udata, const void UNUSED *_rt_key)
{
H5G_bt_ud1_t *bt_udata = (H5G_bt_ud1_t *) _udata;
H5G_node_t *sn = NULL;

View File

@ -178,7 +178,7 @@ 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)
H5O_shared_size (H5F_t *f, const void UNUSED *_mesg)
{
size_t size;

View File

@ -233,7 +233,7 @@ H5O_stab_copy(const void *_mesg, void *_dest)
*-------------------------------------------------------------------------
*/
static size_t
H5O_stab_size(H5F_t *f, const void * UNUSED _mesg)
H5O_stab_size(H5F_t *f, const void UNUSED *_mesg)
{
FUNC_ENTER(H5O_stab_size, 0);
FUNC_LEAVE(2 * H5F_SIZEOF_ADDR(f));

View File

@ -817,7 +817,7 @@ H5S_all_select_serialize (const H5S_t *space, uint8_t *buf)
REVISION LOG
--------------------------------------------------------------------------*/
herr_t
H5S_all_select_deserialize (H5S_t *space, const uint8_t * UNUSED buf)
H5S_all_select_deserialize (H5S_t *space, const uint8_t UNUSED *buf)
{
herr_t ret_value=FAIL; /* return value */

View File

@ -6278,7 +6278,7 @@ done:
REVISION LOG
--------------------------------------------------------------------------*/
static herr_t
H5S_hyper_select_iterate_mem_opt(H5S_sel_iter_t * UNUSED iter, void *buf, hid_t type_id, H5S_t *space, H5D_operator_t op,
H5S_hyper_select_iterate_mem_opt(H5S_sel_iter_t UNUSED *iter, void *buf, hid_t type_id, H5S_t *space, H5D_operator_t op,
void *op_data)
{
H5S_hyper_dim_t *diminfo; /* Alias for dataspace's diminfo information */

View File

@ -83,7 +83,7 @@ H5S_none_select_serialize (const H5S_t *space, uint8_t *buf)
REVISION LOG
--------------------------------------------------------------------------*/
herr_t
H5S_none_select_deserialize (H5S_t *space, const uint8_t * UNUSED buf)
H5S_none_select_deserialize (H5S_t *space, const uint8_t UNUSED *buf)
{
herr_t ret_value=FAIL; /* return value */
@ -207,7 +207,7 @@ done:
--------------------------------------------------------------------------*/
herr_t
H5S_none_select_iterate(void * UNUSED buf, hid_t UNUSED type_id, H5S_t * UNUSED space, H5D_operator_t UNUSED op,
void * UNUSED operator_data)
void UNUSED *operator_data)
{
herr_t ret_value=SUCCEED; /* return value */

View File

@ -1926,7 +1926,7 @@ done:
*-------------------------------------------------------------------------
*/
static int
H5T_unlock_cb (void *_dt, hid_t UNUSED id, const void * UNUSED key)
H5T_unlock_cb (void *_dt, hid_t UNUSED id, const void UNUSED *key)
{
H5T_t *dt = (H5T_t *)_dt;
@ -4099,7 +4099,7 @@ H5Tget_member_index(hid_t type_id, const char *name)
int ret_value = FAIL;
int nmembs, i;
FUNC_ENTER(H5Tget_member_index, NULL);
FUNC_ENTER(H5Tget_member_index, FAIL);
H5TRACE2("Is","is",type_id,name);
/* Check arguments */

View File

@ -25,7 +25,7 @@ const char *FILENAME[] = {
#endif
/* Protocols */
void usage(void);
static void usage(void);
/*-------------------------------------------------------------------------
@ -403,6 +403,7 @@ main (int ac, char **av)
hid_t fapl=-1;
hsize_t family_size;
hsize_t family_size_def; /* default family file size */
double family_size_def_dbl; /* default family file size */
int cflag=1; /* check file system before test */
/* parameters setup */
@ -414,7 +415,8 @@ main (int ac, char **av)
/* specify a different family file size */
ac--; av++;
if (ac > 0){
family_size_def = (hsize_t) atof(*av);
family_size_def_dbl = atof(*av);
H5_ASSIGN_OVERFLOW(family_size_def,family_size_def_dbl,double,hsize_t);
if (family_size_def <= 0)
family_size_def = (hsize_t)FAMILY_SIZE;
}

View File

@ -332,8 +332,8 @@ test_tconv(hid_t file)
*/
static size_t
bogus(unsigned int UNUSED flags, size_t UNUSED cd_nelmts,
const unsigned int * UNUSED cd_values, size_t nbytes,
size_t * UNUSED buf_size, void ** UNUSED buf)
const unsigned int UNUSED *cd_values, size_t nbytes,
size_t UNUSED *buf_size, void UNUSED **buf)
{
return nbytes;
}

View File

@ -92,7 +92,7 @@ static const char *multi_letters = "msbrglo";
*-------------------------------------------------------------------------
*/
herr_t
h5_errors(void * UNUSED client_data)
h5_errors(void UNUSED *client_data)
{
H5_FAILED();
H5Eprint (stdout);

View File

@ -1093,7 +1093,7 @@ dump_dataspace(hid_t space)
*-------------------------------------------------------------------------
*/
static herr_t
dump_attr(hid_t attr, const char *attr_name, void * UNUSED op_data)
dump_attr(hid_t attr, const char *attr_name, void UNUSED *op_data)
{
hid_t attr_id, type, space;
herr_t ret = SUCCEED;
@ -1973,7 +1973,7 @@ set_output_file(const char *fname)
*-------------------------------------------------------------------------
*/
static void
handle_attributes(hid_t fid, char *attr, void * UNUSED data)
handle_attributes(hid_t fid, char *attr, void UNUSED *data)
{
dump_selected_attr(fid, attr);
}
@ -2233,7 +2233,7 @@ handle_datasets(hid_t fid, char *dset, void *data)
*-------------------------------------------------------------------------
*/
static void
handle_groups(hid_t fid, char *group, void * UNUSED data)
handle_groups(hid_t fid, char *group, void UNUSED *data)
{
H5G_stat_t statbuf;
hid_t gid;
@ -2278,7 +2278,7 @@ handle_groups(hid_t fid, char *group, void * UNUSED data)
*-------------------------------------------------------------------------
*/
static void
handle_links(hid_t fid, char *links, void * UNUSED data)
handle_links(hid_t fid, char *links, void UNUSED *data)
{
H5G_stat_t statbuf;
@ -2334,7 +2334,7 @@ handle_links(hid_t fid, char *links, void * UNUSED data)
*-------------------------------------------------------------------------
*/
static void
handle_datatypes(hid_t fid, char *type, void * UNUSED data)
handle_datatypes(hid_t fid, char *type, void UNUSED *data)
{
hid_t type_id;
@ -3162,7 +3162,7 @@ lookup_ref_path(hobj_ref_t * ref)
*-------------------------------------------------------------------------
*/
static herr_t
fill_ref_path_table(hid_t group, const char *name, void * UNUSED op_data)
fill_ref_path_table(hid_t group, const char *name, void UNUSED *op_data)
{
hid_t obj;
char *tmp;
@ -3937,7 +3937,7 @@ xml_dump_dataspace(hid_t space)
*-------------------------------------------------------------------------
*/
static void
xml_dump_data(hid_t obj_id, int obj_data, struct subset_t * UNUSED sset)
xml_dump_data(hid_t obj_id, int obj_data, struct subset_t UNUSED *sset)
{
h5dump_t *outputformat = &xml_dataformat;
int status = -1;
@ -4041,7 +4041,7 @@ xml_dump_data(hid_t obj_id, int obj_data, struct subset_t * UNUSED sset)
*-------------------------------------------------------------------------
*/
static herr_t
xml_dump_attr(hid_t attr, const char *attr_name, void * UNUSED op_data)
xml_dump_attr(hid_t attr, const char *attr_name, void UNUSED *op_data)
{
hid_t attr_id, type, space;
char *t_aname = xml_escape_the_name(attr_name);
@ -4688,7 +4688,7 @@ check_compression(hid_t dcpl)
*-------------------------------------------------------------------------
*/
static void
xml_dump_dataset(hid_t did, const char *name, struct subset_t * UNUSED sset)
xml_dump_dataset(hid_t did, const char *name, struct subset_t UNUSED *sset)
{
hid_t type, space;
hid_t dcpl;

View File

@ -1274,7 +1274,7 @@ dump_dataset_values(hid_t dset)
*-------------------------------------------------------------------------
*/
static herr_t
list_attr (hid_t obj, const char *attr_name, void * UNUSED op_data)
list_attr (hid_t obj, const char *attr_name, void UNUSED *op_data)
{
hid_t attr, space, type, p_type;
hsize_t size[64], nelmts=1;
@ -1435,7 +1435,7 @@ dataset_list1(hid_t dset)
*-------------------------------------------------------------------------
*/
static herr_t
dataset_list2(hid_t dset, const char * UNUSED name)
dataset_list2(hid_t dset, const char UNUSED *name)
{
hid_t dcpl; /*dataset creation property list*/
hid_t type; /*data type of dataset */
@ -1622,7 +1622,7 @@ group_list2(hid_t grp, const char *name)
*-------------------------------------------------------------------------
*/
static herr_t
datatype_list2(hid_t type, const char * UNUSED name)
datatype_list2(hid_t type, const char UNUSED *name)
{
if (verbose_g>0) {
printf(" %-10s ", "Type:");