From 0b846cee58af147e92a3ba7db45497fd9eaa09b4 Mon Sep 17 00:00:00 2001 From: Dana Robinson Date: Thu, 9 Nov 2017 20:04:12 -0800 Subject: Cleaned up misc warnings in src and test. --- src/H5Dchunk.c | 2 +- src/H5Dcompact.c | 2 +- src/H5Dcontig.c | 2 +- src/H5FSint.c | 3 +-- src/H5Gnode.c | 6 +++--- test/filenotclosed.c | 6 +++--- 6 files changed, 10 insertions(+), 11 deletions(-) diff --git a/src/H5Dchunk.c b/src/H5Dchunk.c index af6599a..0d7fcc9 100644 --- a/src/H5Dchunk.c +++ b/src/H5Dchunk.c @@ -5720,7 +5720,7 @@ H5D__chunk_copy_cb(const H5D_chunk_rec_t *chunk_rec, void *_udata) H5D_rdcc_ent_t *ent = NULL; /* Cache entry */ unsigned idx; /* Index of chunk in cache, if present */ unsigned u; /* Counter */ - H5D_shared_t *shared_fo = udata->cpy_info->shared_fo; + H5D_shared_t *shared_fo = (H5D_shared_t *)udata->cpy_info->shared_fo; /* See if the written chunk is in the chunk cache */ if(shared_fo && shared_fo->cache.chunk.nslots > 0) { diff --git a/src/H5Dcompact.c b/src/H5Dcompact.c index 041d28f..43e7754 100644 --- a/src/H5Dcompact.c +++ b/src/H5Dcompact.c @@ -431,7 +431,7 @@ H5D__compact_copy(H5F_t *f_src, H5O_storage_compact_t *_storage_src, H5F_t *f_ds void *bkg = NULL; /* Temporary buffer for copying data */ void *reclaim_buf = NULL; /* Buffer for reclaiming data */ hid_t buf_sid = -1; /* ID for buffer dataspace */ - H5D_shared_t *shared_fo = cpy_info->shared_fo; /* Pointer to the shared struct for dataset object */ + H5D_shared_t *shared_fo = (H5D_shared_t *)cpy_info->shared_fo; /* Pointer to the shared struct for dataset object */ H5O_storage_compact_t *storage_src = _storage_src; /* Pointer to storage_src */ herr_t ret_value = SUCCEED; /* Return value */ diff --git a/src/H5Dcontig.c b/src/H5Dcontig.c index 86de017..aab4901 100644 --- a/src/H5Dcontig.c +++ b/src/H5Dcontig.c @@ -1363,7 +1363,7 @@ H5D__contig_copy(H5F_t *f_src, const H5O_storage_contig_t *storage_src, hsize_t buf_dim[1] = {0}; /* Dimension for buffer */ hbool_t is_vlen = FALSE; /* Flag to indicate that VL type conversion should occur */ hbool_t fix_ref = FALSE; /* Flag to indicate that ref values should be fixed */ - H5D_shared_t *shared_fo = cpy_info->shared_fo; /* Pointer to the shared struct for dataset object */ + H5D_shared_t *shared_fo = (H5D_shared_t *)cpy_info->shared_fo; /* Pointer to the shared struct for dataset object */ hbool_t try_sieve = FALSE; /* Try to get data from the sieve buffer */ haddr_t sieve_start = HADDR_UNDEF; /* Start location of sieve buffer */ haddr_t sieve_end = HADDR_UNDEF; /* End locations of sieve buffer */ diff --git a/src/H5FSint.c b/src/H5FSint.c index 4297291..264950d 100644 --- a/src/H5FSint.c +++ b/src/H5FSint.c @@ -96,10 +96,9 @@ H5FS_init(void) { herr_t ret_value = SUCCEED; /* Return value */ - FUNC_ENTER_NOAPI(FAIL) + FUNC_ENTER_NOAPI_NOERR /* FUNC_ENTER() does all the work */ -done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5FS_init() */ diff --git a/src/H5Gnode.c b/src/H5Gnode.c index 76e2c4b..b335624 100644 --- a/src/H5Gnode.c +++ b/src/H5Gnode.c @@ -640,7 +640,7 @@ H5G_node_insert(H5F_t *f, hid_t dxpl_id, haddr_t addr, while(lt < rt) { idx = (int)((lt + rt) / 2); if((s = (const char *)H5HL_offset_into(udata->common.heap, sn->entry[idx].name_off)) == NULL) - HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "unable to get symbol table name") + HGOTO_ERROR(H5E_SYM, H5E_CANTGET, H5B_INS_ERROR, "unable to get symbol table name") /* Check if symbol is already present */ if(0 == (cmp = HDstrcmp(udata->common.name, s))) @@ -802,8 +802,8 @@ H5G_node_remove(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *_lt_key/*in,out*/, const char *s; /* Pointer to string in local heap */ idx = (lt + rt) / 2; - if((s = H5HL_offset_into(udata->common.heap, sn->entry[idx].name_off)) == NULL) - HGOTO_ERROR(H5E_SYM, H5E_CANTGET, FAIL, "unable to get symbol table name") + if((s = (const char *)H5HL_offset_into(udata->common.heap, sn->entry[idx].name_off)) == NULL) + HGOTO_ERROR(H5E_SYM, H5E_CANTGET, H5B_INS_ERROR, "unable to get symbol table name") cmp = HDstrcmp(udata->common.name, s); if(cmp < 0) rt = idx; diff --git a/test/filenotclosed.c b/test/filenotclosed.c index d1f468a..2c5c8dc 100644 --- a/test/filenotclosed.c +++ b/test/filenotclosed.c @@ -19,8 +19,8 @@ #include "h5test.h" -#define FILENAME "filenotclosed" -#define DATASET "dset" +#define FILENAME "filenotclosed" +#define DATASET_NAME "dset" /*------------------------------------------------------------------------- * Function: catch_signal @@ -114,7 +114,7 @@ main(void) TEST_ERROR /* Create the dataset */ - if((did = H5Dcreate2(fid, "dset", H5T_NATIVE_INT, sid, H5P_DEFAULT, dcpl, H5P_DEFAULT)) < 0) + if((did = H5Dcreate2(fid, DATASET_NAME, H5T_NATIVE_INT, sid, H5P_DEFAULT, dcpl, H5P_DEFAULT)) < 0) TEST_ERROR /* Write to the dataset */ -- cgit v0.12