diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2009-04-23 22:55:18 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2009-04-23 22:55:18 (GMT) |
commit | d7d8cf1159fb819a544ac7aa46ee9b30b4a2c50b (patch) | |
tree | 4471fb2f71c7b86e9f11fc42a4f843dc9029f123 /src | |
parent | b2df2fa6771f46c910fb2b248c9d8b885afc2592 (diff) | |
download | hdf5-d7d8cf1159fb819a544ac7aa46ee9b30b4a2c50b.zip hdf5-d7d8cf1159fb819a544ac7aa46ee9b30b4a2c50b.tar.gz hdf5-d7d8cf1159fb819a544ac7aa46ee9b30b4a2c50b.tar.bz2 |
[svn-r16851] Description:
Clean up compiler warnings
Tested on:
Mac OS X/32 10.5.6 (amazon)
(too minor to require h5committest)
Diffstat (limited to 'src')
-rw-r--r-- | src/H5Apkg.h | 16 | ||||
-rw-r--r-- | src/H5Aprivate.h | 1 | ||||
-rw-r--r-- | src/H5Dchunk.c | 14 | ||||
-rw-r--r-- | src/H5Dcompact.c | 12 | ||||
-rw-r--r-- | src/H5Dcontig.c | 12 | ||||
-rw-r--r-- | src/H5Defl.c | 12 | ||||
-rw-r--r-- | src/H5Dint.c | 2 | ||||
-rw-r--r-- | src/H5Dpkg.h | 16 | ||||
-rw-r--r-- | src/H5EAdbg.c | 2 | ||||
-rw-r--r-- | src/H5FScache.c | 2 | ||||
-rw-r--r-- | src/H5FSsection.c | 20 | ||||
-rw-r--r-- | src/H5Gpkg.h | 12 | ||||
-rw-r--r-- | src/H5Oprivate.h | 10 |
13 files changed, 69 insertions, 62 deletions
diff --git a/src/H5Apkg.h b/src/H5Apkg.h index b166b06..3c62635 100644 --- a/src/H5Apkg.h +++ b/src/H5Apkg.h @@ -163,14 +163,16 @@ typedef struct { typedef herr_t (*H5A_lib_iterate_t)(const H5A_t *attr, void *op_data); /* Describe kind of callback to make for each attribute */ -struct H5A_attr_iter_op_t { - enum { +typedef enum H5A_attr_iter_op_type_t { #ifndef H5_NO_DEPRECATED_SYMBOLS - H5A_ATTR_OP_APP, /* Application callback */ + H5A_ATTR_OP_APP, /* Application callback */ #endif /* H5_NO_DEPRECATED_SYMBOLS */ - H5A_ATTR_OP_APP2, /* Revised application callback */ - H5A_ATTR_OP_LIB /* Library internal callback */ - } op_type; + H5A_ATTR_OP_APP2, /* Revised application callback */ + H5A_ATTR_OP_LIB /* Library internal callback */ +} H5A_attr_iter_op_type_t; + +typedef struct H5A_attr_iter_op_t { + H5A_attr_iter_op_type_t op_type; union { #ifndef H5_NO_DEPRECATED_SYMBOLS H5A_operator1_t app_op; /* Application callback for each attribute */ @@ -178,7 +180,7 @@ struct H5A_attr_iter_op_t { H5A_operator2_t app_op2; /* Revised application callback for each attribute */ H5A_lib_iterate_t lib_op; /* Library internal callback for each attribute */ } u; -}; +} H5A_attr_iter_op_t; /*****************************/ diff --git a/src/H5Aprivate.h b/src/H5Aprivate.h index d46e46b..0c0e519 100644 --- a/src/H5Aprivate.h +++ b/src/H5Aprivate.h @@ -37,7 +37,6 @@ /* Forward references of package typedefs */ typedef struct H5A_t H5A_t; -typedef struct H5A_attr_iter_op_t H5A_attr_iter_op_t; /*****************************/ diff --git a/src/H5Dchunk.c b/src/H5Dchunk.c index 0cdb9b9..d972043 100644 --- a/src/H5Dchunk.c +++ b/src/H5Dchunk.c @@ -146,7 +146,7 @@ typedef struct H5D_chunk_it_ud4_t { /********************/ /* Chunked layout operation callbacks */ -static herr_t H5D_chunk_new(H5F_t *f, hid_t dapl_id, hid_t dxpl_id, H5D_t *dset, +static herr_t H5D_chunk_construct(H5F_t *f, hid_t dapl_id, hid_t dxpl_id, H5D_t *dset, const H5P_genplist_t *dc_plist); static herr_t H5D_chunk_io_init(const H5D_io_info_t *io_info, const H5D_type_info_t *type_info, hsize_t nelmts, const H5S_t *file_space, @@ -189,7 +189,7 @@ static herr_t H5D_chunk_mem_cb(void *elem, hid_t type_id, unsigned ndims, /* Chunked storage layout I/O ops */ const H5D_layout_ops_t H5D_LOPS_CHUNK[1] = {{ - H5D_chunk_new, + H5D_chunk_construct, H5D_chunk_is_space_alloc, H5D_chunk_io_init, H5D_chunk_read, @@ -242,7 +242,7 @@ H5FL_DEFINE_STATIC(H5D_chunk_prune_stack_t); /*------------------------------------------------------------------------- - * Function: H5D_chunk_new + * Function: H5D_chunk_construct * * Purpose: Constructs new chunked layout information for dataset * @@ -254,7 +254,7 @@ H5FL_DEFINE_STATIC(H5D_chunk_prune_stack_t); *------------------------------------------------------------------------- */ static herr_t -H5D_chunk_new(H5F_t *f, hid_t dapl_id, hid_t dxpl_id, H5D_t *dset, +H5D_chunk_construct(H5F_t *f, hid_t dapl_id, hid_t dxpl_id, H5D_t *dset, const H5P_genplist_t *dc_plist) { const H5T_t *type = dset->shared->type; /* Convenience pointer to dataset's datatype */ @@ -264,7 +264,7 @@ H5D_chunk_new(H5F_t *f, hid_t dapl_id, hid_t dxpl_id, H5D_t *dset, unsigned u; /* Local index variable */ herr_t ret_value = SUCCEED; /* Return value */ - FUNC_ENTER_NOAPI_NOINIT(H5D_chunk_new) + FUNC_ENTER_NOAPI_NOINIT(H5D_chunk_construct) /* Sanity checks */ HDassert(f); @@ -320,7 +320,7 @@ H5D_chunk_new(H5F_t *f, hid_t dapl_id, hid_t dxpl_id, H5D_t *dset, done: FUNC_LEAVE_NOAPI(ret_value) -} /* end H5D_chunk_new() */ +} /* end H5D_chunk_construct() */ /*------------------------------------------------------------------------- @@ -3842,7 +3842,7 @@ H5D_chunk_delete(H5F_t *f, hid_t dxpl_id, H5O_layout_t *layout) idx_info.layout = layout; /* Delete the chunked storage information in the file */ - if((layout->u.chunk.ops->delete)(&idx_info) < 0) + if((layout->u.chunk.ops->idx_delete)(&idx_info) < 0) HGOTO_ERROR(H5E_DATASET, H5E_CANTDELETE, FAIL, "unable to delete chunk index") done: diff --git a/src/H5Dcompact.c b/src/H5Dcompact.c index ad95e18..f773f5f 100644 --- a/src/H5Dcompact.c +++ b/src/H5Dcompact.c @@ -57,7 +57,7 @@ /********************/ /* Layout operation callbacks */ -static herr_t H5D_compact_new(H5F_t *f, hid_t dapl_id, hid_t dxpl_id, H5D_t *dset, +static herr_t H5D_compact_construct(H5F_t *f, hid_t dapl_id, hid_t dxpl_id, H5D_t *dset, const H5P_genplist_t *dc_plist); static hbool_t H5D_compact_is_space_alloc(const H5O_layout_t *layout); static herr_t H5D_compact_io_init(const H5D_io_info_t *io_info, const H5D_type_info_t *type_info, @@ -77,7 +77,7 @@ static ssize_t H5D_compact_writevv(const H5D_io_info_t *io_info, /* Compact storage layout I/O ops */ const H5D_layout_ops_t H5D_LOPS_COMPACT[1] = {{ - H5D_compact_new, + H5D_compact_construct, H5D_compact_is_space_alloc, H5D_compact_io_init, H5D_contig_read, @@ -154,7 +154,7 @@ done: /*------------------------------------------------------------------------- - * Function: H5D_compact_new + * Function: H5D_compact_construct * * Purpose: Constructs new compact layout information for dataset * @@ -167,14 +167,14 @@ done: */ /* ARGSUSED */ static herr_t -H5D_compact_new(H5F_t *f, hid_t UNUSED dapl_id, hid_t UNUSED dxpl_id, H5D_t *dset, +H5D_compact_construct(H5F_t *f, hid_t UNUSED dapl_id, hid_t UNUSED dxpl_id, H5D_t *dset, const H5P_genplist_t UNUSED *dc_plist) { hssize_t tmp_size; /* Temporary holder for raw data size */ hsize_t comp_data_size; /* Size of compact data */ herr_t ret_value = SUCCEED; /* Return value */ - FUNC_ENTER_NOAPI_NOINIT(H5D_compact_new) + FUNC_ENTER_NOAPI_NOINIT(H5D_compact_construct) /* Sanity checks */ HDassert(f); @@ -197,7 +197,7 @@ H5D_compact_new(H5F_t *f, hid_t UNUSED dapl_id, hid_t UNUSED dxpl_id, H5D_t *dse done: FUNC_LEAVE_NOAPI(ret_value) -} /* end H5D_compact_new() */ +} /* end H5D_compact_construct() */ /*------------------------------------------------------------------------- diff --git a/src/H5Dcontig.c b/src/H5Dcontig.c index 6ba6cbb..1275ee1 100644 --- a/src/H5Dcontig.c +++ b/src/H5Dcontig.c @@ -61,7 +61,7 @@ /********************/ /* Layout operation callbacks */ -static herr_t H5D_contig_new(H5F_t *f, hid_t dapl_id, hid_t dxpl_id, H5D_t *dset, +static herr_t H5D_contig_construct(H5F_t *f, hid_t dapl_id, hid_t dxpl_id, H5D_t *dset, const H5P_genplist_t *dc_plist); static hbool_t H5D_contig_is_space_alloc(const H5O_layout_t *layout); static herr_t H5D_contig_io_init(const H5D_io_info_t *io_info, const H5D_type_info_t *type_info, @@ -79,7 +79,7 @@ static herr_t H5D_contig_write_one(H5D_io_info_t *io_info, hsize_t offset, /* Contiguous storage layout I/O ops */ const H5D_layout_ops_t H5D_LOPS_CONTIG[1] = {{ - H5D_contig_new, + H5D_contig_construct, H5D_contig_is_space_alloc, H5D_contig_io_init, H5D_contig_read, @@ -360,7 +360,7 @@ H5D_contig_get_addr(const H5D_t *dset) /*------------------------------------------------------------------------- - * Function: H5D_contig_new + * Function: H5D_contig_construct * * Purpose: Constructs new contiguous layout information for dataset * @@ -373,7 +373,7 @@ H5D_contig_get_addr(const H5D_t *dset) */ /* ARGSUSED */ static herr_t -H5D_contig_new(H5F_t *f, hid_t UNUSED dapl_id, hid_t UNUSED dxpl_id, H5D_t *dset, +H5D_contig_construct(H5F_t *f, hid_t UNUSED dapl_id, hid_t UNUSED dxpl_id, H5D_t *dset, const H5P_genplist_t UNUSED *dc_plist) { hssize_t snelmts; /* Temporary holder for number of elements in dataspace */ @@ -386,7 +386,7 @@ H5D_contig_new(H5F_t *f, hid_t UNUSED dapl_id, hid_t UNUSED dxpl_id, H5D_t *dset int i; /* Local index variable */ herr_t ret_value = SUCCEED; /* Return value */ - FUNC_ENTER_NOAPI_NOINIT(H5D_contig_new) + FUNC_ENTER_NOAPI_NOINIT(H5D_contig_construct) /* Sanity checks */ HDassert(f); @@ -429,7 +429,7 @@ H5D_contig_new(H5F_t *f, hid_t UNUSED dapl_id, hid_t UNUSED dxpl_id, H5D_t *dset done: FUNC_LEAVE_NOAPI(ret_value) -} /* end H5D_contig_new() */ +} /* end H5D_contig_construct() */ /*------------------------------------------------------------------------- diff --git a/src/H5Defl.c b/src/H5Defl.c index f3b346e..a22ca2d 100644 --- a/src/H5Defl.c +++ b/src/H5Defl.c @@ -49,7 +49,7 @@ /********************/ /* Layout operation callbacks */ -static herr_t H5D_efl_new(H5F_t *f, hid_t dapl_id, hid_t dxpl_id, H5D_t *dset, +static herr_t H5D_efl_construct(H5F_t *f, hid_t dapl_id, hid_t dxpl_id, H5D_t *dset, const H5P_genplist_t *dc_plist); static hbool_t H5D_efl_is_space_alloc(const H5O_layout_t *layout); static herr_t H5D_efl_io_init(const H5D_io_info_t *io_info, const H5D_type_info_t *type_info, @@ -75,7 +75,7 @@ static herr_t H5D_efl_write(const H5O_efl_t *efl, haddr_t addr, size_t size, /* External File List (EFL) storage layout I/O ops */ const H5D_layout_ops_t H5D_LOPS_EFL[1] = {{ - H5D_efl_new, + H5D_efl_construct, H5D_efl_is_space_alloc, H5D_efl_io_init, H5D_contig_read, @@ -97,7 +97,7 @@ const H5D_layout_ops_t H5D_LOPS_EFL[1] = {{ /*------------------------------------------------------------------------- - * Function: H5D_efl_new + * Function: H5D_efl_construct * * Purpose: Constructs new EFL layout information for dataset * @@ -109,7 +109,7 @@ const H5D_layout_ops_t H5D_LOPS_EFL[1] = {{ *------------------------------------------------------------------------- */ static herr_t -H5D_efl_new(H5F_t *f, hid_t UNUSED dapl_id, hid_t UNUSED dxpl_id, H5D_t *dset, +H5D_efl_construct(H5F_t *f, hid_t UNUSED dapl_id, hid_t UNUSED dxpl_id, H5D_t *dset, const H5P_genplist_t *dc_plist) { size_t dt_size; /* Size of datatype */ @@ -122,7 +122,7 @@ H5D_efl_new(H5F_t *f, hid_t UNUSED dapl_id, hid_t UNUSED dxpl_id, H5D_t *dset, int i; /* Local index variable */ herr_t ret_value = SUCCEED; /* Return value */ - FUNC_ENTER_NOAPI_NOINIT(H5D_efl_new) + FUNC_ENTER_NOAPI_NOINIT(H5D_efl_construct) /* Sanity checks */ HDassert(f); @@ -167,7 +167,7 @@ H5D_efl_new(H5F_t *f, hid_t UNUSED dapl_id, hid_t UNUSED dxpl_id, H5D_t *dset, done: FUNC_LEAVE_NOAPI(ret_value) -} /* end H5D_efl_new() */ +} /* end H5D_efl_construct() */ /*------------------------------------------------------------------------- diff --git a/src/H5Dint.c b/src/H5Dint.c index 95be734..00bc347 100644 --- a/src/H5Dint.c +++ b/src/H5Dint.c @@ -1137,7 +1137,7 @@ H5D_create(H5F_t *file, hid_t type_id, const H5S_t *space, hid_t dcpl_id, HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, NULL, "unable to initialize I/O operations") /* Create the layout information for the new dataset */ - if((new_dset->shared->layout.ops->new)(file, dapl_id, dxpl_id, new_dset, dc_plist) < 0) + if((new_dset->shared->layout.ops->construct)(file, dapl_id, dxpl_id, new_dset, dc_plist) < 0) HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, NULL, "unable to initialize layout information") /* Indicate that the layout information was initialized */ diff --git a/src/H5Dpkg.h b/src/H5Dpkg.h index 791e223..69126ee 100644 --- a/src/H5Dpkg.h +++ b/src/H5Dpkg.h @@ -100,7 +100,7 @@ struct H5D_io_info_t; struct H5D_chunk_map_t; /* Function pointers for I/O on particular types of dataset layouts */ -typedef herr_t (*H5D_layout_new_func_t)(H5F_t *f, hid_t dapl_id, hid_t dxpl_id, +typedef herr_t (*H5D_layout_construct_func_t)(H5F_t *f, hid_t dapl_id, hid_t dxpl_id, H5D_t *dset, const H5P_genplist_t *dc_plist); typedef hbool_t (*H5D_layout_is_space_alloc_func_t)(const H5O_layout_t *layout); typedef herr_t (*H5D_layout_io_init_func_t)(const struct H5D_io_info_t *io_info, @@ -123,7 +123,7 @@ typedef herr_t (*H5D_layout_io_term_func_t)(const struct H5D_chunk_map_t *cm); /* Typedef for grouping layout I/O routines */ typedef struct H5D_layout_ops_t { - H5D_layout_new_func_t new; /* Layout constructor for new datasets */ + H5D_layout_construct_func_t construct; /* Layout constructor for new datasets */ H5D_layout_is_space_alloc_func_t is_space_alloc; /* Query routine to determine if storage is allocated */ H5D_layout_io_init_func_t io_init; /* I/O initialization routine */ H5D_layout_read_func_t ser_read; /* High-level I/O routine for reading data in serial */ @@ -177,6 +177,11 @@ typedef union H5D_storage_t { } H5D_storage_t; /* Typedef for raw data I/O operation info */ +typedef enum H5D_io_op_type_t { + H5D_IO_OP_READ, /* Read operation */ + H5D_IO_OP_WRITE /* Write operation */ +} H5D_io_op_type_t; + typedef struct H5D_io_info_t { H5D_t *dset; /* Pointer to dataset being operated on */ #ifndef H5_HAVE_PARALLEL @@ -196,10 +201,7 @@ typedef struct H5D_io_info_t { H5D_storage_t *store; /* Dataset storage info */ H5D_layout_ops_t layout_ops; /* Dataset layout I/O operation function pointers */ H5D_io_ops_t io_ops; /* I/O operation function pointers */ - enum { - H5D_IO_OP_READ, /* Read operation */ - H5D_IO_OP_WRITE /* Write operation */ - } op_type; + H5D_io_op_type_t op_type; union { void *rbuf; /* Pointer to buffer for read */ const void *wbuf; /* Pointer to buffer to write */ @@ -294,7 +296,7 @@ typedef struct H5D_chunk_ops_t { H5D_chunk_get_addr_func_t get_addr; /* Routine to retrieve address of chunk in file */ H5D_chunk_iterate_func_t iterate; /* Routine to iterate over chunks */ H5D_chunk_remove_func_t remove; /* Routine to remove a chunk from an index */ - H5D_chunk_delete_func_t delete; /* Routine to delete index & all chunks from file*/ + H5D_chunk_delete_func_t idx_delete; /* Routine to delete index & all chunks from file*/ H5D_chunk_copy_setup_func_t copy_setup; /* Routine to perform any necessary setup for copying chunks */ H5D_chunk_copy_shutdown_func_t copy_shutdown; /* Routine to perform any necessary shutdown for copying chunks */ H5D_chunk_size_func_t size; /* Routine to get size of indexing information */ diff --git a/src/H5EAdbg.c b/src/H5EAdbg.c index 8e4c634..d9d0a4c 100644 --- a/src/H5EAdbg.c +++ b/src/H5EAdbg.c @@ -321,7 +321,7 @@ H5EA__sblock_debug(H5F_t *f, hid_t dxpl_id, haddr_t addr, FILE *stream, int inde /* Protect super block */ /* (Note: setting parent of super block to 'hdr' for this operation should be OK -QAK) */ - if(NULL == (sblock = H5EA__sblock_protect(hdr, dxpl_id, hdr, addr, sblk_idx, H5AC_READ))) + if(NULL == (sblock = H5EA__sblock_protect(hdr, dxpl_id, (H5EA_iblock_t *)hdr, addr, sblk_idx, H5AC_READ))) H5E_THROW(H5E_CANTPROTECT, "unable to protect extensible array super block, address = %llu", (unsigned long long)addr) /* Print opening message */ diff --git a/src/H5FScache.c b/src/H5FScache.c index b896197..5d901e9 100644 --- a/src/H5FScache.c +++ b/src/H5FScache.c @@ -203,7 +203,7 @@ HDfprintf(stderr, "%s: Load free space header, addr = %a\n", FUNC, addr); HGOTO_ERROR(H5E_FSPACE, H5E_CANTLOAD, NULL, "wrong free space header version") /* Client ID */ - fspace->client = *p++; + fspace->client = (H5FS_client_t)*p++; if(fspace->client >= H5FS_NUM_CLIENT_ID) HGOTO_ERROR(H5E_FSPACE, H5E_CANTLOAD, NULL, "unknown client ID in free space header") diff --git a/src/H5FSsection.c b/src/H5FSsection.c index 77e6d1a..9ad6c70 100644 --- a/src/H5FSsection.c +++ b/src/H5FSsection.c @@ -232,7 +232,7 @@ HDfprintf(stderr, "%s: fspace->alloc_sect_size = %Hu, fspace->sect_size = %Hu\n" HGOTO_ERROR(H5E_FSPACE, H5E_CANTUNPROTECT, FAIL, "unable to release free space section info") /* Re-protect the section info with read-write access */ - if(NULL == (fspace->sinfo = H5AC_protect(f, dxpl_id, H5AC_FSPACE_SINFO, fspace->sect_addr, NULL, fspace, H5AC_WRITE))) + if(NULL == (fspace->sinfo = (H5FS_sinfo_t *)H5AC_protect(f, dxpl_id, H5AC_FSPACE_SINFO, fspace->sect_addr, NULL, fspace, H5AC_WRITE))) HGOTO_ERROR(H5E_FSPACE, H5E_CANTPROTECT, FAIL, "unable to load free space sections") /* Switch the access mode we have */ @@ -251,7 +251,7 @@ HDfprintf(stderr, "%s: fspace->alloc_sect_size = %Hu, fspace->sect_size = %Hu\n" HDfprintf(stderr, "%s: Reading in existing sections, fspace->sect_addr = %a\n", FUNC, fspace->sect_addr); #endif /* H5FS_SINFO_DEBUG */ /* Protect the free space sections */ - if(NULL == (fspace->sinfo = H5AC_protect(f, dxpl_id, H5AC_FSPACE_SINFO, fspace->sect_addr, NULL, fspace, accmode))) + if(NULL == (fspace->sinfo = (H5FS_sinfo_t *)H5AC_protect(f, dxpl_id, H5AC_FSPACE_SINFO, fspace->sect_addr, NULL, fspace, accmode))) HGOTO_ERROR(H5E_FSPACE, H5E_CANTPROTECT, FAIL, "unable to load free space sections") /* Remember that we protected the section info & the access mode */ @@ -1186,7 +1186,7 @@ H5FS_sect_merge(H5FS_t *fspace, H5FS_section_info_t **sect, void *op_data) greater_sect_node_valid = TRUE; /* Get section for 'less than' skip list node */ - tmp_sect = H5SL_item(less_sect_node); + tmp_sect = (H5FS_section_info_t *)H5SL_item(less_sect_node); /* Get classes for right & left sections */ tmp_sect_cls = &fspace->sect_cls[tmp_sect->type]; @@ -1229,7 +1229,7 @@ H5FS_sect_merge(H5FS_t *fspace, H5FS_section_info_t **sect, void *op_data) /* Check for node after new node able to merge with new node */ if(greater_sect_node) { /* Get section for 'greater than' skip list node */ - tmp_sect = H5SL_item(greater_sect_node); + tmp_sect = (H5FS_section_info_t *)H5SL_item(greater_sect_node); /* Get classes for right & left sections */ sect_cls = &fspace->sect_cls[(*sect)->type]; @@ -1307,7 +1307,7 @@ HDfprintf(stderr, "%s: Can shrink!\n", FUNC); /* Check for last node in the merge list */ if(NULL != (last_node = H5SL_last(fspace->sinfo->merge_list))) { /* Get the pointer to the last section, from the last node */ - *sect = H5SL_item(last_node); + *sect = (H5FS_section_info_t *)H5SL_item(last_node); HDassert(*sect); /* Indicate that this section needs to be removed if it causes a shrink */ @@ -1500,7 +1500,7 @@ if(_section_) */ /* Look for a section after block to extend */ - if((sect = H5SL_greater(fspace->sinfo->merge_list, &addr))) { + if((sect = (H5FS_section_info_t *)H5SL_greater(fspace->sinfo->merge_list, &addr))) { /* Check if this section adjoins the block and is large enough to * fulfill extension request. * @@ -1640,10 +1640,10 @@ HDfprintf(stderr, "%s: bin = %u\n", FUNC, bin); H5SL_node_t *curr_sect_node=NULL; /* Get the free space node for free space sections of the same size */ - curr_fspace_node = H5SL_item(curr_size_node); + curr_fspace_node = (H5FS_node_t *)H5SL_item(curr_size_node); /* Get the Skip list which holds pointers to actual free list sections */ - curr_sect_node = H5SL_first(curr_fspace_node->sect_list); + curr_sect_node = (H5SL_node_t *)H5SL_first(curr_fspace_node->sect_list); while(curr_sect_node != NULL) { H5FS_section_info_t *curr_sect=NULL; @@ -1651,7 +1651,7 @@ HDfprintf(stderr, "%s: bin = %u\n", FUNC, bin); H5FS_section_info_t *split_sect=NULL; /* Get section node */ - curr_sect = H5SL_item(curr_sect_node); + curr_sect = (H5FS_section_info_t *)H5SL_item(curr_sect_node); HDassert(H5F_addr_defined(curr_sect->addr)); HDassert(curr_fspace_node->sect_size == curr_sect->size); @@ -1666,7 +1666,7 @@ HDfprintf(stderr, "%s: bin = %u\n", FUNC, bin); if ((curr_sect->size >= (request + frag_size)) && (cls->split)) { /* remove the section with aligned address */ - if(NULL == (*node = H5SL_remove(curr_fspace_node->sect_list, &curr_sect->addr))) + if(NULL == (*node = (H5FS_section_info_t *)H5SL_remove(curr_fspace_node->sect_list, &curr_sect->addr))) HGOTO_ERROR(H5E_FSPACE, H5E_CANTREMOVE, FAIL, "can't remove free space node from skip list") /* Decrement # of sections in section size node */ if(H5FS_size_node_decr(fspace->sinfo, bin, curr_fspace_node, cls) < 0) diff --git a/src/H5Gpkg.h b/src/H5Gpkg.h index 0840ee7..3d25109 100644 --- a/src/H5Gpkg.h +++ b/src/H5Gpkg.h @@ -144,13 +144,15 @@ struct H5G_t { typedef herr_t (*H5G_lib_iterate_t)(const H5O_link_t *lnk, void *op_data); /* Describe kind of callback to make for each link */ -typedef struct { - enum { +typedef enum H5G_link_iterate_op_type_t { #ifndef H5_NO_DEPRECATED_SYMBOLS - H5G_LINK_OP_OLD, /* "Old" application callback */ + H5G_LINK_OP_OLD, /* "Old" application callback */ #endif /* H5_NO_DEPRECATED_SYMBOLS */ - H5G_LINK_OP_NEW /* "New" application callback */ - } op_type; + H5G_LINK_OP_NEW /* "New" application callback */ +} H5G_link_iterate_op_type_t; + +typedef struct { + H5G_link_iterate_op_type_t op_type; union { #ifndef H5_NO_DEPRECATED_SYMBOLS H5G_iterate_t op_old; /* "Old" application callback for each link */ diff --git a/src/H5Oprivate.h b/src/H5Oprivate.h index d3e3313..018bc77 100644 --- a/src/H5Oprivate.h +++ b/src/H5Oprivate.h @@ -546,11 +546,13 @@ typedef herr_t (*H5O_lib_operator_t)(H5O_t *oh, H5O_mesg_t *mesg/*in,out*/, unsigned sequence, hbool_t *oh_modified/*out*/, void *operator_data/*in,out*/); /* Some syntactic sugar to make the compiler happy with two different kinds of iterator callbacks */ +typedef enum H5O_mesg_operator_type_t { + H5O_MESG_OP_APP, /* Application callback */ + H5O_MESG_OP_LIB /* Library internal callback */ +} H5O_mesg_operator_type_t; + typedef struct { - enum { - H5O_MESG_OP_APP, /* Application callback */ - H5O_MESG_OP_LIB /* Library internal callback */ - } op_type; + H5O_mesg_operator_type_t op_type; union { H5O_operator_t app_op; /* Application callback for each message */ H5O_lib_operator_t lib_op; /* Library internal callback for each message */ |