From f22e258586009b59cebdde931620c9d7379db6cd Mon Sep 17 00:00:00 2001 From: kmu Date: Fri, 6 Dec 2019 12:03:19 -0600 Subject: remove unsed var,function,macro, etc --- src/H5Dchunk.c | 17 ++----------- src/H5FDhdfs.c | 1 - test/cache_image.c | 2 +- test/objcopy_ref.c | 46 ----------------------------------- test/page_buffer.c | 20 ++++++++++++--- test/tmisc.c | 7 ++---- testpar/t_bigio.c | 1 - testpar/t_cache.c | 3 ++- testpar/t_coll_chunk.c | 1 - testpar/t_coll_md_read.c | 1 - testpar/t_dset.c | 8 +++--- testpar/t_filter_read.c | 1 - testpar/t_span_tree.c | 4 ++- tools/lib/h5tools_utils.c | 6 ++--- tools/src/h5diff/ph5diff_main.c | 2 +- tools/src/h5repack/h5repack_main.c | 2 +- tools/test/h5repack/h5repackgentest.c | 1 - tools/test/perform/perf.c | 6 +---- tools/test/perform/pio_engine.c | 9 ------- 19 files changed, 37 insertions(+), 101 deletions(-) diff --git a/src/H5Dchunk.c b/src/H5Dchunk.c index 381ca4a..14e43d7 100644 --- a/src/H5Dchunk.c +++ b/src/H5Dchunk.c @@ -1100,14 +1100,10 @@ H5D__chunk_io_init(const H5D_io_info_t *io_info, const H5D_type_info_t *type_inf H5D_chunk_map_t *fm) { const H5D_t *dataset = io_info->dset; /* Local pointer to dataset info */ - H5S_t *tmp_mspace = NULL; /* Temporary memory dataspace */ hssize_t old_offset[H5O_LAYOUT_NDIMS]; /* Old selection offset */ htri_t file_space_normalized = FALSE; /* File dataspace was normalized */ - H5T_t *file_type = NULL; /* Temporary copy of file datatype for iteration */ - hbool_t iter_init = FALSE; /* Selection iteration info has been initialized */ unsigned f_ndims; /* The number of dimensions of the file's dataspace */ int sm_ndims; /* The number of dimensions of the memory buffer's dataspace (signed) */ - char bogus; /* "bogus" buffer to pass to selection iterator */ unsigned u; /* Local index variable */ herr_t ret_value = SUCCEED; /* Return value */ @@ -2139,13 +2135,7 @@ H5D__create_chunk_mem_map_1d(const H5D_chunk_map_t *fm) { H5D_chunk_info_t *chunk_info; /* Pointer to chunk information */ H5SL_node_t *curr_node; /* Current node in skip list */ - hsize_t file_sel_start[H5S_MAX_RANK]; /* Offset of low bound of file selection */ - hsize_t file_sel_end[H5S_MAX_RANK]; /* Offset of high bound of file selection */ - hsize_t mem_sel_start[H5S_MAX_RANK]; /* Offset of low bound of file selection */ - hsize_t mem_sel_end[H5S_MAX_RANK]; /* Offset of high bound of file selection */ - hssize_t adjust[H5S_MAX_RANK]; /* Adjustment to make to all file chunks */ - unsigned u; /* Local index variable */ - herr_t ret_value = SUCCEED; /* Return value */ + herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_STATIC @@ -5667,7 +5657,7 @@ H5D__chunk_addrmap_cb(const H5D_chunk_rec_t *chunk_rec, void *_udata) hsize_t chunk_index; int ret_value = H5_ITER_CONT; /* Return value */ - FUNC_ENTER_STATIC + FUNC_ENTER_STATIC_NOERR /* Compute the index for this chunk */ chunk_index = H5VM_array_offset_pre(rank, udata->common.layout->down_chunks, chunk_rec->scaled); @@ -5675,7 +5665,6 @@ H5D__chunk_addrmap_cb(const H5D_chunk_rec_t *chunk_rec, void *_udata) /* Set it in the userdata to return */ udata->chunk_addr[chunk_index] = chunk_rec->chunk_addr; -done: FUNC_LEAVE_NOAPI(ret_value) } /* H5D__chunk_addrmap_cb() */ @@ -7152,7 +7141,6 @@ H5D__get_num_chunks(const H5D_t *dset, const H5S_t H5_ATTR_UNUSED *space, hsize_ hsize_t num_chunks = 0; /* Number of written chunks */ H5D_rdcc_ent_t *ent; /* Cache entry */ const H5D_rdcc_t *rdcc = NULL; /* Raw data chunk cache */ - const H5O_layout_t *layout; /* Dataset layout */ herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_PACKAGE_TAG(dset->oloc.addr) @@ -7162,7 +7150,6 @@ H5D__get_num_chunks(const H5D_t *dset, const H5S_t H5_ATTR_UNUSED *space, hsize_ HDassert(space); HDassert(nchunks); - layout = &(dset->shared->layout); /* Dataset layout */ rdcc = &(dset->shared->cache.chunk); /* raw data chunk cache */ HDassert(rdcc); diff --git a/src/H5FDhdfs.c b/src/H5FDhdfs.c index 819d200..0b954cf 100644 --- a/src/H5FDhdfs.c +++ b/src/H5FDhdfs.c @@ -581,7 +581,6 @@ hid_t H5FD_hdfs_init(void) { hid_t ret_value = H5I_INVALID_HID; /* Return value */ - unsigned int bin_i; FUNC_ENTER_NOAPI(FAIL) diff --git a/test/cache_image.c b/test/cache_image.c index 59689a9..bada814 100644 --- a/test/cache_image.c +++ b/test/cache_image.c @@ -7825,7 +7825,7 @@ get_free_sections_test(hbool_t single_file_vfd) *------------------------------------------------------------------------- */ static unsigned -evict_on_close_test(hbool_t single_file_vfd) +evict_on_close_test(hbool_t H5_ATTR_UNUSED single_file_vfd) { #ifndef H5_HAVE_PARALLEL const char * fcn_name = "evict_on_close_test()"; diff --git a/test/objcopy_ref.c b/test/objcopy_ref.c index b539b8a..33d1f64 100644 --- a/test/objcopy_ref.c +++ b/test/objcopy_ref.c @@ -44,53 +44,15 @@ const char *FILENAME[] = { #define CONFIG_DENSE 16 #define MAX_CONFIGURATION 31 -#define NAME_DATATYPE_SIMPLE "H5T_NATIVE_INT" -#define NAME_DATATYPE_SIMPLE2 "H5T_NATIVE_INT-2" -#define NAME_DATATYPE_VL "vlen of int" -#define NAME_DATATYPE_VL_VL "vlen of vlen of int" #define NAME_DATASET_SIMPLE "dataset_simple" -#define NAME_DATASET_SIMPLE2 "dataset_simple_copy" -#define NAME_DATASET_SIMPLE3 "dataset_simple_another_copy" -#define NAME_DATASET_COMPOUND "dataset_compound" -#define NAME_DATASET_CHUNKED "dataset_chunked" -#define NAME_DATASET_CHUNKED_SINGLE "dataset_chunked_single" -#define NAME_DATASET_CHUNKED2 "dataset_chunked2" -#define NAME_DATASET_CHUNKED2_SINGLE "dataset_chunked2_single" -#define NAME_DATASET_CHUNKED3 "dataset_chunked3" -#define NAME_DATASET_CHUNKED3_SINGLE "dataset_chunked3_single" -#define NAME_DATASET_CHUNKED4 "dataset_chunked4" -#define NAME_DATASET_CHUNKED4_SINGLE "dataset_chunked4_single" -#define NAME_DATASET_COMPACT "dataset_compact" -#define NAME_DATASET_EXTERNAL "dataset_ext" -#define NAME_DATASET_NAMED_DTYPE "dataset_named_dtype" -#define NAME_DATASET_NAMED_DTYPE2 "dataset_named_dtype2" -#define NAME_DATASET_MULTI_OHDR "dataset_multi_ohdr" -#define NAME_DATASET_MULTI_OHDR2 "dataset_multi_ohdr2" -#define NAME_DATASET_VL "dataset_vl" -#define NAME_DATASET_VL2 "dataset_vl2" -#define NAME_DATASET_VL_VL "dataset_vl_vl" -#define NAME_DATASET_VL_VL2 "dataset_vl_vl2" -#define NAME_DATASET_CMPD_VL "dataset_cmpd_vl" #define NAME_DATASET_SUB_SUB "/g0/g00/g000/dataset_simple" #define NAME_GROUP_UNCOPIED "/uncopied" -#define NAME_GROUP_EMPTY "/empty" #define NAME_GROUP_TOP "/g0" -#define NAME_GROUP_TOP2 "/g1" -#define NAME_GROUP_TOP3 "/g2" -#define NAME_GROUP_TOP4 "/g3" #define NAME_GROUP_SUB "/g0/g00" -#define NAME_GROUP_SUB_2 "/g0/g01" -#define NAME_GROUP_SUB_SUB "/g0/g00/g000" #define NAME_GROUP_SUB_SUB2 "g000" -#define NAME_GROUP_DATASET "/g0/dataset_simple" #define NAME_GROUP_LINK "/g_links" #define NAME_GROUP_LINK2 "/g_links2" -#define NAME_GROUP_LOOP "g_loop" -#define NAME_GROUP_LOOP2 "g_loop2" -#define NAME_GROUP_LOOP3 "g_loop3" #define NAME_GROUP_REF "ref_grp" -#define NAME_LINK_DATASET "/g_links/dataset_simple" -#define NAME_LINK_HARD "/g_links/hard_link_to_dataset_simple" #define NAME_LINK_SOFT "/g_links/soft_link_to_dataset_simple" #define NAME_LINK_SOFT2 "/g_links2/soft_link_to_dataset_simple" #define NAME_LINK_EXTERN "/g_links/external_link_to_dataset_simple" @@ -99,19 +61,11 @@ const char *FILENAME[] = { #define NAME_LINK_SOFT_DANGLE2 "/g_links2/soft_link_to_nowhere" #define NAME_LINK_EXTERN_DANGLE "/g_links/external_link_to_nowhere" #define NAME_LINK_EXTERN_DANGLE2 "/g_links2/external_link_to_nowhere" -#define NAME_OLD_FORMAT "/dset1" #define NAME_BUF_SIZE 1024 #define ATTR_NAME_LEN 80 #define DIM_SIZE_1 12 #define DIM_SIZE_2 6 -#define MAX_DIM_SIZE_1 100 -#define MAX_DIM_SIZE_2 80 -#define CHUNK_SIZE_1 5 /* Not an even fraction of dimension sizes, so we test copying partial chunks */ -#define CHUNK_SIZE_2 5 -#define NUM_SUB_GROUPS 20 -#define NUM_WIDE_LOOP_GROUPS 10 -#define NUM_DATASETS 10 unsigned num_attributes_g; /* Number of attributes created */ diff --git a/test/page_buffer.c b/test/page_buffer.c index 5313c9b..f6ce4a7 100644 --- a/test/page_buffer.c +++ b/test/page_buffer.c @@ -43,18 +43,21 @@ #define NY 50 /* helper routines */ +#ifndef H5_HAVE_PARALLEL static unsigned create_file(char *filename, hid_t fcpl, hid_t fapl); static unsigned open_file(char *filename, hid_t fapl, hsize_t page_size, size_t page_buffer_size); +#endif /* H5_HAVE_PARALLEL */ /* test routines */ +#ifdef H5_HAVE_PARALLEL +static unsigned verify_page_buffering_disabled(hid_t orig_fapl, + const char *env_h5_drvr); +#else static unsigned test_args(hid_t fapl, const char *env_h5_drvr); static unsigned test_raw_data_handling(hid_t orig_fapl, const char *env_h5_drvr); static unsigned test_lru_processing(hid_t orig_fapl, const char *env_h5_drvr); static unsigned test_min_threshold(hid_t orig_fapl, const char *env_h5_drvr); static unsigned test_stats_collection(hid_t orig_fapl, const char *env_h5_drvr); -#ifdef H5_HAVE_PARALLEL -static unsigned verify_page_buffering_disabled(hid_t orig_fapl, - const char *env_h5_drvr); #endif /* H5_HAVE_PARALLEL */ const char *FILENAME[] = { @@ -379,6 +382,8 @@ error: * *------------------------------------------------------------------------- */ + +#ifndef H5_HAVE_PARALLEL static unsigned test_args(hid_t orig_fapl, const char *env_h5_drvr) { @@ -533,6 +538,7 @@ error: } H5E_END_TRY; return 1; } /* test_args */ +#endif /*------------------------------------------------------------------------- @@ -565,6 +571,7 @@ error: */ /* Changes due to file space page size has a minimum size of 512 */ +#ifndef H5_HAVE_PARALLEL static unsigned test_raw_data_handling(hid_t orig_fapl, const char *env_h5_drvr) { @@ -810,6 +817,7 @@ error: } H5E_END_TRY; return 1; } /* test_raw_data_handling */ +#endif /*------------------------------------------------------------------------- @@ -842,6 +850,7 @@ error: *------------------------------------------------------------------------- */ +#ifndef H5_HAVE_PARALLEL static unsigned test_lru_processing(hid_t orig_fapl, const char *env_h5_drvr) { @@ -1063,6 +1072,7 @@ error: } H5E_END_TRY; return 1; } /* test_lru_processing */ +#endif /*------------------------------------------------------------------------- @@ -1096,6 +1106,7 @@ error: *------------------------------------------------------------------------- */ +#ifndef H5_HAVE_PARALLEL static unsigned test_min_threshold(hid_t orig_fapl, const char *env_h5_drvr) { @@ -1699,6 +1710,7 @@ error: return 1; } /* test_min_threshold */ +#endif /*------------------------------------------------------------------------- @@ -1731,6 +1743,7 @@ error: * *------------------------------------------------------------------------- */ +#ifndef H5_HAVE_PARALLEL static unsigned test_stats_collection(hid_t orig_fapl, const char *env_h5_drvr) { @@ -2002,6 +2015,7 @@ error: return 1; } /* test_stats_collection */ +#endif /*------------------------------------------------------------------------- diff --git a/test/tmisc.c b/test/tmisc.c index d637802..b1a3ef1 100644 --- a/test/tmisc.c +++ b/test/tmisc.c @@ -128,15 +128,12 @@ typedef struct /* Definitions for misc. test #8 */ #define MISC8_FILE "tmisc8.h5" #define MISC8_DSETNAME1 "Dataset1" -#define MISC8_DSETNAME2 "Dataset2" -#define MISC8_DSETNAME3 "Dataset3" #define MISC8_DSETNAME4 "Dataset4" #define MISC8_DSETNAME5 "Dataset5" -#define MISC8_DSETNAME6 "Dataset6" +#ifndef H5_HAVE_PARALLEL #define MISC8_DSETNAME7 "Dataset7" +#endif #define MISC8_DSETNAME8 "Dataset8" -#define MISC8_DSETNAME9 "Dataset9" -#define MISC8_DSETNAME10 "Dataset10" #define MISC8_RANK 2 #define MISC8_DIM0 50 #define MISC8_DIM1 50 diff --git a/testpar/t_bigio.c b/testpar/t_bigio.c index 12c1023..b681a2a 100644 --- a/testpar/t_bigio.c +++ b/testpar/t_bigio.c @@ -27,7 +27,6 @@ const char *FILENAME[3]={ "bigio_test.h5", #define DATASET2 "DSET2" #define DATASET3 "DSET3" #define DATASET4 "DSET4" -#define DATASET5 "DSET5" #define DXFER_COLLECTIVE_IO 0x1 /* Collective IO*/ #define DXFER_INDEPENDENT_IO 0x2 /* Independent IO collectively */ #define DXFER_BIGCOUNT (1 < 29) diff --git a/testpar/t_cache.c b/testpar/t_cache.c index cde19fe..eddc3d0 100644 --- a/testpar/t_cache.c +++ b/testpar/t_cache.c @@ -38,7 +38,6 @@ int failures = 0; hbool_t verbose = TRUE; /* used to control error messages */ #define NFILENAME 2 -#define PARATESTFILE filenames[0] const char *FILENAME[NFILENAME]={"CacheTestDummy", NULL}; #ifndef PATH_MAX #define PATH_MAX 512 @@ -219,7 +218,9 @@ struct datum data[NUM_DATA_ENTRIES]; #define STD_VIRT_NUM_DATA_ENTRIES NUM_DATA_ENTRIES #define EXPRESS_VIRT_NUM_DATA_ENTRIES (NUM_DATA_ENTRIES / 10) /* Use a smaller test size to avoid creating huge MPE logfiles. */ +#ifdef H5_HAVE_MPE #define MPE_VIRT_NUM_DATA_ENTIES (NUM_DATA_ENTRIES / 100) +#endif int virt_num_data_entries = NUM_DATA_ENTRIES; diff --git a/testpar/t_coll_chunk.c b/testpar/t_coll_chunk.c index 40cc1ca..2d758ba 100644 --- a/testpar/t_coll_chunk.c +++ b/testpar/t_coll_chunk.c @@ -620,7 +620,6 @@ coll_chunktest(const char* filename, size_t num_points; /* for point selection */ hsize_t *coords = NULL; /* for point selection */ hsize_t current_dims; /* for point selection */ - int i; /* set up MPI parameters */ MPI_Comm_size(comm,&mpi_size); diff --git a/testpar/t_coll_md_read.c b/testpar/t_coll_md_read.c index 912388c..c0fe04b 100644 --- a/testpar/t_coll_md_read.c +++ b/testpar/t_coll_md_read.c @@ -34,7 +34,6 @@ #define MULTI_CHUNK_IO_ADDRMAP_ISSUE_DIMS 2 -#define LINK_CHUNK_IO_SORT_CHUNK_ISSUE_NO_SEL_PROCESS (mpi_rank == mpi_size - 1) #define LINK_CHUNK_IO_SORT_CHUNK_ISSUE_DATASET_NAME "linked_chunk_io_sort_chunk_issue" #define LINK_CHUNK_IO_SORT_CHUNK_ISSUE_Y_DIM_SCALE 20000 #define LINK_CHUNK_IO_SORT_CHUNK_ISSUE_CHUNK_SIZE 1 diff --git a/testpar/t_dset.c b/testpar/t_dset.c index 6c91a41..c23343a 100644 --- a/testpar/t_dset.c +++ b/testpar/t_dset.c @@ -567,7 +567,6 @@ dataset_writeAll(void) size_t num_points; /* for point selection */ hsize_t *coords = NULL; /* for point selection */ hsize_t current_dims; /* for point selection */ - int i; herr_t ret; /* Generic return value */ int mpi_size, mpi_rank; @@ -1098,7 +1097,6 @@ dataset_readAll(void) size_t num_points; /* for point selection */ hsize_t *coords = NULL; /* for point selection */ - hsize_t current_dims; /* for point selection */ int i,j,k; herr_t ret; /* Generic return value */ @@ -3470,8 +3468,9 @@ actual_io_mode_tests(void) { * Programmer: Jonathan Kim * Date: Aug, 2012 */ +#ifdef LATER #define DSET_NOCOLCAUSE "nocolcause" -#define NELM 2 +#endif #define FILE_EXTERNAL "nocolcause_extern.data" static void test_no_collective_cause_mode(int selection_mode) @@ -3482,7 +3481,6 @@ test_no_collective_cause_mode(int selection_mode) uint32_t no_collective_cause_global_write = 0; uint32_t no_collective_cause_global_read = 0; uint32_t no_collective_cause_global_expected = 0; - hsize_t coord[NELM][RANK]; const char * filename; const char * test_name; @@ -3797,6 +3795,7 @@ test_no_collective_cause_mode(int selection_mode) * Programmer: Jonathan Kim * Date: Aug, 2012 */ +#ifdef LATER static void test_no_collective_cause_mode_filter(int selection_mode) { @@ -4008,6 +4007,7 @@ test_no_collective_cause_mode_filter(int selection_mode) HDfree(buffer); return; } +#endif /* Function: no_collective_cause_tests * diff --git a/testpar/t_filter_read.c b/testpar/t_filter_read.c index 28baed5..15aec2d 100644 --- a/testpar/t_filter_read.c +++ b/testpar/t_filter_read.c @@ -215,7 +215,6 @@ test_filter_read(void) unsigned disable_partial_chunk_filters; /* Whether filters are disabled on partial chunks */ herr_t hrc; const char *filename; - hsize_t fletcher32_size; /* Size of dataset with Fletcher32 checksum */ #ifdef H5_HAVE_FILTER_DEFLATE hsize_t deflate_size; /* Size of dataset with deflate filter */ diff --git a/testpar/t_span_tree.c b/testpar/t_span_tree.c index 9a4ac4d..65ee03d 100644 --- a/testpar/t_span_tree.c +++ b/testpar/t_span_tree.c @@ -662,7 +662,7 @@ void coll_write_test(int chunk_factor) *------------------------------------------------------------------------- */ static void -coll_read_test(int chunk_factor) +coll_read_test(int H5_ATTR_UNUSED chunk_factor) { const char *filename; @@ -923,7 +923,9 @@ coll_read_test(int chunk_factor) ****************************************************************/ #define LDSCT_DS_RANK 5 +#if LOWER_DIM_SIZE_COMP_TEST__RUN_TEST__DEBUG #define LOWER_DIM_SIZE_COMP_TEST_DEBUG_TARGET_RANK 0 +#endif #define LOWER_DIM_SIZE_COMP_TEST__SELECT_CHECKER_BOARD__DEBUG 0 diff --git a/tools/lib/h5tools_utils.c b/tools/lib/h5tools_utils.c index 47ce690..da19e6a 100644 --- a/tools/lib/h5tools_utils.c +++ b/tools/lib/h5tools_utils.c @@ -1277,9 +1277,9 @@ done: *----------------------------------------------------------------------------- */ int -h5tools_set_configured_fapl(hid_t fapl_id, - const char vfd_name[], - void *fapl_t_ptr) +h5tools_set_configured_fapl(hid_t fapl_id, + const char vfd_name[], + void H5_ATTR_UNUSED *fapl_t_ptr) { int ret_value = 1; diff --git a/tools/src/h5diff/ph5diff_main.c b/tools/src/h5diff/ph5diff_main.c index 380ab3b..87221fd 100644 --- a/tools/src/h5diff/ph5diff_main.c +++ b/tools/src/h5diff/ph5diff_main.c @@ -304,7 +304,7 @@ void print_manager_output(void) * *------------------------------------------------------------------------- */ -void h5diff_exit(int status) +void h5diff_exit(int H5_ATTR_UNUSED status) { /* if in parallel mode, dismiss workers, close down MPI, then exit */ if(g_Parallel) { diff --git a/tools/src/h5repack/h5repack_main.c b/tools/src/h5repack/h5repack_main.c index c628beb..c0c8a2a 100644 --- a/tools/src/h5repack/h5repack_main.c +++ b/tools/src/h5repack/h5repack_main.c @@ -281,7 +281,7 @@ int read_info(const char *filename, pack_opt_t *options) char comp_info[1024]; FILE *fp = NULL; char c; - int i, rc = 1; + int i; int ret_value = EXIT_SUCCESS; if (NULL == (fp = HDfopen(filename, "r"))) { diff --git a/tools/test/h5repack/h5repackgentest.c b/tools/test/h5repack/h5repackgentest.c index aaac285..87ca31c 100644 --- a/tools/test/h5repack/h5repackgentest.c +++ b/tools/test/h5repack/h5repackgentest.c @@ -314,7 +314,6 @@ generate_f32le(hbool_t external) { int main(void) { int i = 0; - int ret_value = 0; for (i = 0; i < 2; i++) { hbool_t external = (i & 1) ? TRUE : FALSE; diff --git a/tools/test/perform/perf.c b/tools/test/perform/perf.c index 34b8a2d..fd7d9de 100644 --- a/tools/test/perform/perf.c +++ b/tools/test/perform/perf.c @@ -118,7 +118,7 @@ extern char *optarg; int main(int argc, char **argv) { char *buf, *tmp, *buf2, *tmp2, *check; - int i, j, mynod=0, nprocs=1, err, my_correct = 1, correct, myerrno; + int i, j, mynod=0, nprocs=1, my_correct = 1, correct, myerrno; double stim, etim; double write_tim = 0; double read_tim = 0; @@ -127,10 +127,6 @@ int main(int argc, char **argv) double min_read_tim, min_write_tim; double ave_read_tim, ave_write_tim; int64_t iter_jump = 0; - int64_t seek_position = 0; - MPI_File fh; - MPI_Status status; - int nchars; char filename[MAX_PATH]; herr_t ret; /* Generic return value */ diff --git a/tools/test/perform/pio_engine.c b/tools/test/perform/pio_engine.c index 77c04ab..44f9b0a 100644 --- a/tools/test/perform/pio_engine.c +++ b/tools/test/perform/pio_engine.c @@ -54,24 +54,15 @@ /* sizes of various items. these sizes won't change during program execution */ /* The following three must have the same type */ -#define ELMT_SIZE (sizeof(unsigned char)) /* we're doing bytes */ -#define ELMT_MPI_TYPE MPI_BYTE #define ELMT_H5_TYPE H5T_NATIVE_UCHAR #define GOTOERROR(errcode) { ret_code = errcode; goto done; } -#define GOTODONE { goto done; } #define ERRMSG(mesg) { \ HDfprintf(stderr, "Proc %d: ", pio_mpi_rank_g); \ HDfprintf(stderr, "*** Assertion failed (%s) at line %4d in %s\n", \ mesg, (int)__LINE__, __FILE__); \ } -#define MSG(mesg) { \ - HDfprintf(stderr, "Proc %d: ", pio_mpi_rank_g); \ - HDfprintf(stderr, "(%s) at line %4d in %s\n", \ - mesg, (int)__LINE__, __FILE__); \ -} - /* verify: if val is false (0), print mesg. */ #define VRFY(val, mesg) do { \ if (!val) { \ -- cgit v0.12 From f2614c904244cca043bf8fc9f94f566fa43c6e28 Mon Sep 17 00:00:00 2001 From: kmu Date: Mon, 9 Dec 2019 14:08:47 -0600 Subject: more fix and address comments --- test/page_buffer.c | 15 +++------------ testpar/t_shapesame.c | 15 --------------- testpar/t_span_tree.c | 5 ++++- tools/lib/h5diff.c | 3 +-- 4 files changed, 8 insertions(+), 30 deletions(-) diff --git a/test/page_buffer.c b/test/page_buffer.c index f6ce4a7..1172ae7 100644 --- a/test/page_buffer.c +++ b/test/page_buffer.c @@ -38,9 +38,6 @@ #define FILENAME_LEN 1024 -#define NUM_DSETS 5 -#define NX 100 -#define NY 50 /* helper routines */ #ifndef H5_HAVE_PARALLEL @@ -65,6 +62,7 @@ const char *FILENAME[] = { NULL }; +#ifndef H5_HAVE_PARALLEL /*------------------------------------------------------------------------- * Function: create_file() @@ -299,6 +297,7 @@ error: } H5E_END_TRY; return 1; } +#endif /* * @@ -360,6 +359,7 @@ error: } /* set_multi_split() */ +#ifndef H5_HAVE_PARALLEL /*------------------------------------------------------------------------- * Function: test_args() @@ -383,7 +383,6 @@ error: *------------------------------------------------------------------------- */ -#ifndef H5_HAVE_PARALLEL static unsigned test_args(hid_t orig_fapl, const char *env_h5_drvr) { @@ -538,7 +537,6 @@ error: } H5E_END_TRY; return 1; } /* test_args */ -#endif /*------------------------------------------------------------------------- @@ -571,7 +569,6 @@ error: */ /* Changes due to file space page size has a minimum size of 512 */ -#ifndef H5_HAVE_PARALLEL static unsigned test_raw_data_handling(hid_t orig_fapl, const char *env_h5_drvr) { @@ -817,7 +814,6 @@ error: } H5E_END_TRY; return 1; } /* test_raw_data_handling */ -#endif /*------------------------------------------------------------------------- @@ -850,7 +846,6 @@ error: *------------------------------------------------------------------------- */ -#ifndef H5_HAVE_PARALLEL static unsigned test_lru_processing(hid_t orig_fapl, const char *env_h5_drvr) { @@ -1072,7 +1067,6 @@ error: } H5E_END_TRY; return 1; } /* test_lru_processing */ -#endif /*------------------------------------------------------------------------- @@ -1106,7 +1100,6 @@ error: *------------------------------------------------------------------------- */ -#ifndef H5_HAVE_PARALLEL static unsigned test_min_threshold(hid_t orig_fapl, const char *env_h5_drvr) { @@ -1710,7 +1703,6 @@ error: return 1; } /* test_min_threshold */ -#endif /*------------------------------------------------------------------------- @@ -1743,7 +1735,6 @@ error: * *------------------------------------------------------------------------- */ -#ifndef H5_HAVE_PARALLEL static unsigned test_stats_collection(hid_t orig_fapl, const char *env_h5_drvr) { diff --git a/testpar/t_shapesame.c b/testpar/t_shapesame.c index abbfbb3..c12cf5a 100644 --- a/testpar/t_shapesame.c +++ b/testpar/t_shapesame.c @@ -1981,7 +1981,6 @@ contig_hs_dr_pio_test__run_test(const int test_num, #if CONTIG_HS_DR_PIO_TEST__RUN_TEST__DEBUG const char *fcnName = "contig_hs_dr_pio_test__run_test()"; #endif /* CONTIG_HS_DR_PIO_TEST__RUN_TEST__DEBUG */ - int mpi_rank; struct hs_dr_pio_test_vars_t test_vars = { /* int mpi_size = */ -1, @@ -2049,9 +2048,6 @@ contig_hs_dr_pio_test__run_test(const int test_num, small_rank, large_rank, use_collective_io, dset_type, express_test, tv_ptr); - /* initialize the local copy of mpi_rank */ - mpi_rank = tv_ptr->mpi_rank; - /* initialize skips & max_skips */ tv_ptr->skips = *skips_ptr; tv_ptr->max_skips = max_skips; @@ -3520,7 +3516,6 @@ ckrbrd_hs_dr_pio_test__m2d_l2s(struct hs_dr_pio_test_vars_t * tv_ptr) const char *fcnName = "ckrbrd_hs_dr_pio_test__m2d_l2s()"; #endif /* CHECKER_BOARD_HS_DR_PIO_TEST__M2D_L2S__DEBUG */ hbool_t data_ok = FALSE; - hbool_t mis_match = FALSE; int i, j, k, l; size_t u; size_t start_index; @@ -3768,8 +3763,6 @@ ckrbrd_hs_dr_pio_test__m2d_l2s(struct hs_dr_pio_test_vars_t * tv_ptr) /* verify that expected data is retrieved */ - mis_match = FALSE; - expected_value = (uint32_t)( (i * tv_ptr->edge_size * tv_ptr->edge_size * tv_ptr->edge_size * tv_ptr->edge_size) + @@ -3878,7 +3871,6 @@ ckrbrd_hs_dr_pio_test__m2d_s2l(struct hs_dr_pio_test_vars_t * tv_ptr) const char *fcnName = "ckrbrd_hs_dr_pio_test__m2d_s2l()"; #endif /* CONTIG_HS_DR_PIO_TEST__M2D_S2L__DEBUG */ hbool_t data_ok = FALSE; - hbool_t mis_match = FALSE; int i, j, k, l; size_t u; size_t start_index; @@ -4138,8 +4130,6 @@ ckrbrd_hs_dr_pio_test__m2d_s2l(struct hs_dr_pio_test_vars_t * tv_ptr) HDassert( stop_index < tv_ptr->large_ds_size ); - mis_match = FALSE; - data_ok = TRUE; ptr_1 = tv_ptr->large_ds_buf_1; @@ -4235,7 +4225,6 @@ ckrbrd_hs_dr_pio_test__run_test(const int test_num, #if CKRBRD_HS_DR_PIO_TEST__RUN_TEST__DEBUG const char *fcnName = "ckrbrd_hs_dr_pio_test__run_test()"; #endif /* CKRBRD_HS_DR_PIO_TEST__RUN_TEST__DEBUG */ - int mpi_rank; /* needed by VRFY */ struct hs_dr_pio_test_vars_t test_vars = { /* int mpi_size = */ -1, @@ -4305,10 +4294,6 @@ ckrbrd_hs_dr_pio_test__run_test(const int test_num, tv_ptr); - /* initialize the local copy of mpi_rank */ - mpi_rank = tv_ptr->mpi_rank; - - /* initialize skips & max_skips */ tv_ptr->skips = *skips_ptr; tv_ptr->max_skips = max_skips; diff --git a/testpar/t_span_tree.c b/testpar/t_span_tree.c index 65ee03d..da6d343 100644 --- a/testpar/t_span_tree.c +++ b/testpar/t_span_tree.c @@ -1560,7 +1560,9 @@ lower_dim_size_comp_test__run_test(const int chunk_edge_size, size_t small_ds_size; size_t small_ds_slice_size; size_t large_ds_size; +#if LOWER_DIM_SIZE_COMP_TEST__RUN_TEST__DEBUG size_t large_ds_slice_size; +#endif uint32_t expected_value; uint32_t * small_ds_buf_0 = NULL; uint32_t * small_ds_buf_1 = NULL; @@ -1614,9 +1616,10 @@ lower_dim_size_comp_test__run_test(const int chunk_edge_size, small_ds_size = (size_t)((mpi_size + 1) * 1 * 1 * 10 * 10); small_ds_slice_size = (size_t) ( 1 * 1 * 10 * 10); large_ds_size = (size_t)((mpi_size + 1) * 10 * 10 * 10 * 10); - large_ds_slice_size = (size_t) (10 * 10 * 10 * 10); #if LOWER_DIM_SIZE_COMP_TEST__RUN_TEST__DEBUG + large_ds_slice_size = (size_t) (10 * 10 * 10 * 10); + if ( mpi_rank == LOWER_DIM_SIZE_COMP_TEST_DEBUG_TARGET_RANK ) { HDfprintf(stdout, "%s:%d: small ds size / slice size = %d / %d.\n", fcnName, mpi_rank, diff --git a/tools/lib/h5diff.c b/tools/lib/h5diff.c index c2153e5..03d7941 100644 --- a/tools/lib/h5diff.c +++ b/tools/lib/h5diff.c @@ -274,14 +274,13 @@ build_match_list (const char *objname1, trav_info_t *info1, const char *objname2 int cmp; trav_table_t *table = NULL; size_t idx; - int ret_value = 0; h5difftrace("build_match_list start\n"); /* init */ trav_table_init(&table); if (table == NULL) { H5TOOLS_INFO(H5E_tools_min_id_g, "Cannot create traverse table"); - HGOTO_DONE(-1); + goto done; } /* * This is necessary for the case that given objects are group and -- cgit v0.12 From b0e5b2d9338bf352a4154a838c4146c84be8705b Mon Sep 17 00:00:00 2001 From: kmu Date: Wed, 11 Dec 2019 13:36:56 -0600 Subject: removed unused parameter --- test/cache_image.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/cache_image.c b/test/cache_image.c index bada814..f226de9 100644 --- a/test/cache_image.c +++ b/test/cache_image.c @@ -7825,7 +7825,7 @@ get_free_sections_test(hbool_t single_file_vfd) *------------------------------------------------------------------------- */ static unsigned -evict_on_close_test(hbool_t H5_ATTR_UNUSED single_file_vfd) +evict_on_close_test() { #ifndef H5_HAVE_PARALLEL const char * fcn_name = "evict_on_close_test()"; -- cgit v0.12 From 9712fad601a7844dc01deb1dc4d81b5aa5402b5e Mon Sep 17 00:00:00 2001 From: kmu Date: Mon, 13 Jan 2020 13:20:19 -0600 Subject: fix unused related warnings --- src/H5ACmpio.c | 2 +- src/H5Aint.c | 2 +- src/H5B.c | 4 +- src/H5B2dbg.c | 6 +- src/H5B2internal.c | 4 +- src/H5C.c | 10 +- src/H5CX.c | 4 +- src/H5Clog_json.c | 2 +- src/H5Dbtree.c | 4 +- src/H5Dint.c | 2 +- src/H5Dnone.c | 2 +- src/H5Dsingle.c | 2 +- src/H5EAcache.c | 4 +- src/H5EAtest.c | 2 +- src/H5FAcache.c | 6 +- src/H5FDhdfs.c | 3 + src/H5FS.c | 2 +- src/H5FScache.c | 53 ++++----- src/H5Fsuper_cache.c | 10 +- src/H5Gnode.c | 5 +- src/H5HFcache.c | 18 +-- src/H5HFsection.c | 12 +- src/H5HGcache.c | 4 +- src/H5HLcache.c | 12 +- src/H5I.c | 2 +- src/H5Oainfo.c | 6 +- src/H5Oalloc.c | 2 +- src/H5Ocache.c | 6 +- src/H5Omessage.c | 9 +- src/H5Oshared.c | 4 +- src/H5Oshared.h | 2 +- src/H5Pfapl.c | 8 +- src/H5Pint.c | 15 ++- src/H5Plapl.c | 2 +- src/H5SL.c | 2 +- src/H5SMcache.c | 12 +- src/H5Tconv.c | 2 +- src/H5Tref.c | 8 +- src/H5mpi.c | 2 +- src/H5private.h | 9 +- test/cache_common.c | 67 ++++------- test/cache_image.c | 2 +- test/cache_tagging.c | 52 ++++++++- test/dsets.c | 8 +- test/dtypes.c | 2 +- test/mf.c | 4 +- test/page_buffer.c | 6 + test/tfile.c | 4 +- test/tmisc.c | 10 +- test/tselect.c | 3 +- test/vds_swmr.h | 10 +- testpar/t_cache.c | 14 +-- testpar/t_filter_read.c | 3 + testpar/t_mdset.c | 3 +- testpar/t_span_tree.c | 10 +- tools/lib/h5tools_dump.c | 2 +- tools/lib/h5tools_utils.c | 6 +- tools/src/h5diff/ph5diff_main.c | 2 +- tools/test/h5diff/h5diffgentest.c | 16 +-- tools/test/h5dump/h5dumpgentest.c | 226 +++++++++++++++++++------------------- tools/test/h5repack/h5repacktst.c | 12 +- tools/test/perform/iopipe.c | 36 +++--- 62 files changed, 410 insertions(+), 354 deletions(-) diff --git a/src/H5ACmpio.c b/src/H5ACmpio.c index e4b81fa..56fedee 100644 --- a/src/H5ACmpio.c +++ b/src/H5ACmpio.c @@ -498,7 +498,7 @@ done: *------------------------------------------------------------------------- */ static herr_t -H5AC__construct_candidate_list(H5AC_t *cache_ptr, H5AC_aux_t *aux_ptr, +H5AC__construct_candidate_list(H5AC_t *cache_ptr, H5AC_aux_t H5_ATTR_SANITY_CHECK *aux_ptr, int sync_point_op) { herr_t ret_value = SUCCEED; /* Return value */ diff --git a/src/H5Aint.c b/src/H5Aint.c index 436fced..782bf19 100644 --- a/src/H5Aint.c +++ b/src/H5Aint.c @@ -2062,7 +2062,7 @@ done: */ H5A_t * H5A__attr_copy_file(const H5A_t *attr_src, H5F_t *file_dst, hbool_t *recompute_size, - H5O_copy_t *cpy_info) + H5O_copy_t H5_ATTR_SANITY_CHECK *cpy_info) { H5A_t *attr_dst = NULL; /* Destination attribute */ hid_t tid_src = -1; /* Datatype ID for source datatype */ diff --git a/src/H5B.c b/src/H5B.c index 2a34fae..4c1abfd 100644 --- a/src/H5B.c +++ b/src/H5B.c @@ -2020,7 +2020,6 @@ H5B_valid(H5F_t *f, const H5B_class_t *type, haddr_t addr) { H5B_t *bt = NULL; /* The B-tree */ H5UC_t *rc_shared; /* Ref-counted shared info */ - H5B_shared_t *shared; /* Pointer to shared B-tree info */ H5B_cache_ud_t cache_udata; /* User-data for metadata cache callback */ htri_t ret_value = SUCCEED; /* Return value */ @@ -2038,8 +2037,7 @@ H5B_valid(H5F_t *f, const H5B_class_t *type, haddr_t addr) /* Get shared info for B-tree */ if(NULL == (rc_shared = (type->get_shared)(f, NULL))) HGOTO_ERROR(H5E_BTREE, H5E_CANTGET, FAIL, "can't retrieve B-tree's shared ref. count object") - shared = (H5B_shared_t *)H5UC_GET_OBJ(rc_shared); - HDassert(shared); + HDassert((H5B_shared_t *)H5UC_GET_OBJ(rc_shared)); /* * Load the tree node. diff --git a/src/H5B2dbg.c b/src/H5B2dbg.c index 0e3ebd5..dcae07c 100644 --- a/src/H5B2dbg.c +++ b/src/H5B2dbg.c @@ -87,7 +87,7 @@ */ herr_t H5B2__hdr_debug(H5F_t *f, haddr_t addr, FILE *stream, int indent, int fwidth, - const H5B2_class_t *type, haddr_t obj_addr) + const H5B2_class_t H5_ATTR_SANITY_CHECK *type, haddr_t H5_ATTR_SANITY_CHECK obj_addr) { H5B2_hdr_t *hdr = NULL; /* B-tree header info */ unsigned u; /* Local index variable */ @@ -182,7 +182,7 @@ done: */ herr_t H5B2__int_debug(H5F_t *f, haddr_t addr, FILE *stream, int indent, int fwidth, - const H5B2_class_t *type, haddr_t hdr_addr, unsigned nrec, unsigned depth, haddr_t obj_addr) + const H5B2_class_t *type, haddr_t hdr_addr, unsigned nrec, unsigned depth, haddr_t H5_ATTR_SANITY_CHECK obj_addr) { H5B2_hdr_t *hdr = NULL; /* B-tree header */ H5B2_internal_t *internal = NULL; /* B-tree internal node */ @@ -294,7 +294,7 @@ done: */ herr_t H5B2__leaf_debug(H5F_t *f, haddr_t addr, FILE *stream, int indent, int fwidth, - const H5B2_class_t *type, haddr_t hdr_addr, unsigned nrec, haddr_t obj_addr) + const H5B2_class_t *type, haddr_t hdr_addr, unsigned nrec, haddr_t H5_ATTR_SANITY_CHECK obj_addr) { H5B2_hdr_t *hdr = NULL; /* B-tree header */ H5B2_leaf_t *leaf = NULL; /* B-tree leaf node */ diff --git a/src/H5B2internal.c b/src/H5B2internal.c index 7f6b80a..f08237e 100644 --- a/src/H5B2internal.c +++ b/src/H5B2internal.c @@ -1355,7 +1355,7 @@ done: *------------------------------------------------------------------------- */ H5_ATTR_PURE herr_t -H5B2__assert_internal(hsize_t parent_all_nrec, const H5B2_hdr_t *hdr, const H5B2_internal_t *internal) +H5B2__assert_internal(hsize_t parent_all_nrec, const H5B2_hdr_t H5_ATTR_SANITY_CHECK *hdr, const H5B2_internal_t *internal) { hsize_t tot_all_nrec; /* Total number of records at or below this node */ uint16_t u, v; /* Local index variables */ @@ -1396,7 +1396,7 @@ H5B2__assert_internal(hsize_t parent_all_nrec, const H5B2_hdr_t *hdr, const H5B2 *------------------------------------------------------------------------- */ H5_ATTR_PURE herr_t -H5B2__assert_internal2(hsize_t parent_all_nrec, const H5B2_hdr_t *hdr, const H5B2_internal_t *internal, const H5B2_internal_t *internal2) +H5B2__assert_internal2(hsize_t parent_all_nrec, const H5_ATTR_SANITY_CHECK H5B2_hdr_t *hdr, const H5B2_internal_t *internal, const H5B2_internal_t *internal2) { hsize_t tot_all_nrec; /* Total number of records at or below this node */ uint16_t u, v; /* Local index variables */ diff --git a/src/H5C.c b/src/H5C.c index 3e0cf95..2a90bd1 100644 --- a/src/H5C.c +++ b/src/H5C.c @@ -1056,7 +1056,6 @@ H5C_flush_cache(H5F_t *f, unsigned flags) H5C_ring_t ring; H5C_t * cache_ptr; hbool_t destroy; - hbool_t ignore_protected; herr_t ret_value = SUCCEED; FUNC_ENTER_NOAPI(FAIL) @@ -1101,9 +1100,8 @@ H5C_flush_cache(H5F_t *f, unsigned flags) HGOTO_ERROR(H5E_CACHE, H5E_SYSTEM, FAIL, "an extreme sanity check failed on entry") #endif /* H5C_DO_EXTREME_SANITY_CHECKS */ - ignore_protected = ( (flags & H5C__FLUSH_IGNORE_PROTECTED_FLAG) != 0 ); destroy = ( (flags & H5C__FLUSH_INVALIDATE_FLAG) != 0 ); - HDassert( ! ( destroy && ignore_protected ) ); + HDassert( ! ( destroy && ( (flags & H5C__FLUSH_IGNORE_PROTECTED_FLAG) != 0 )) ); HDassert( ! ( cache_ptr->flush_in_progress ) ); cache_ptr->flush_in_progress = TRUE; @@ -3856,7 +3854,11 @@ H5C__unpin_entry_real(H5C_t *cache_ptr, H5C_cache_entry_t *entry_ptr, { herr_t ret_value = SUCCEED; /* Return value */ +#if H5C_DO_SANITY_CHECKS FUNC_ENTER_STATIC +#else + FUNC_ENTER_STATIC_NOERR +#endif /* Sanity checking */ HDassert(cache_ptr); @@ -3873,7 +3875,9 @@ H5C__unpin_entry_real(H5C_t *cache_ptr, H5C_cache_entry_t *entry_ptr, /* Update the stats for an unpin operation */ H5C__UPDATE_STATS_FOR_UNPIN(cache_ptr, entry_ptr) +#if H5C_DO_SANITY_CHECKS done: +#endif FUNC_LEAVE_NOAPI(ret_value) } /* H5C__unpin_entry_real() */ diff --git a/src/H5CX.c b/src/H5CX.c index 649bd8f..998808b 100644 --- a/src/H5CX.c +++ b/src/H5CX.c @@ -105,7 +105,7 @@ } /* end if */ #endif /* H5_HAVE_PARALLEL */ -#ifdef H5_HAVE_PARALLEL +#if defined(H5_HAVE_PARALLEL) && defined(H5_HAVE_INSTRUMENTED_LIBRARY) /* Macro for the duplicated code to test and set properties for a property list */ #define H5CX_TEST_SET_PROP(PROP_NAME, PROP_FIELD) \ { \ @@ -127,7 +127,9 @@ (*head)->ctx.H5_GLUE(PROP_FIELD,_set) = TRUE; \ } /* end if */ \ } +#endif +#ifdef H5_HAVE_PARALLEL /* Macro for the duplicated code to test and set properties for a property list */ #define H5CX_SET_PROP(PROP_NAME, PROP_FIELD) \ if((*head)->ctx.H5_GLUE(PROP_FIELD,_set)) { \ diff --git a/src/H5Clog_json.c b/src/H5Clog_json.c index dd9e9b2..38aedf9 100644 --- a/src/H5Clog_json.c +++ b/src/H5Clog_json.c @@ -1281,7 +1281,7 @@ done: *------------------------------------------------------------------------- */ static herr_t -H5C__json_write_set_cache_config_log_msg(void *udata, const H5AC_cache_config_t *config, +H5C__json_write_set_cache_config_log_msg(void *udata, const H5AC_cache_config_t H5_ATTR_SANITY_CHECK *config, herr_t fxn_ret_value) { H5C_log_json_udata_t *json_udata = (H5C_log_json_udata_t *)(udata); diff --git a/src/H5Dbtree.c b/src/H5Dbtree.c index c13c36a..aea4672 100644 --- a/src/H5Dbtree.c +++ b/src/H5Dbtree.c @@ -253,7 +253,7 @@ H5D__btree_get_shared(const H5F_t H5_ATTR_UNUSED *f, const void *_udata) *------------------------------------------------------------------------- */ static herr_t -H5D__btree_new_node(H5F_t *f, H5B_ins_t op, void *_lt_key, void *_udata, +H5D__btree_new_node(H5F_t H5_ATTR_SANITY_CHECK *f, H5B_ins_t op, void *_lt_key, void *_udata, void *_rt_key, haddr_t *addr_p/*out*/) { H5D_btree_key_t *lt_key = (H5D_btree_key_t *) _lt_key; @@ -536,7 +536,7 @@ done: *------------------------------------------------------------------------- */ static H5B_ins_t -H5D__btree_insert(H5F_t *f, haddr_t addr, void *_lt_key, hbool_t *lt_key_changed, +H5D__btree_insert(H5F_t H5_ATTR_SANITY_CHECK *f, haddr_t H5_ATTR_SANITY_CHECK addr, void *_lt_key, hbool_t *lt_key_changed, void *_md_key, void *_udata, void *_rt_key, hbool_t H5_ATTR_UNUSED *rt_key_changed, haddr_t *new_node_p/*out*/) { diff --git a/src/H5Dint.c b/src/H5Dint.c index c3d4398..356ac1c 100644 --- a/src/H5Dint.c +++ b/src/H5Dint.c @@ -699,7 +699,7 @@ done: *------------------------------------------------------------------------- */ static herr_t -H5D__use_minimized_dset_headers(H5F_t *file, H5D_t *dset, hbool_t *minimize) +H5D__use_minimized_dset_headers(H5F_t *file, H5D_t H5_ATTR_SANITY_CHECK *dset, hbool_t *minimize) { herr_t ret_value = SUCCEED; diff --git a/src/H5Dnone.c b/src/H5Dnone.c index 9346220..eb4e6b8 100644 --- a/src/H5Dnone.c +++ b/src/H5Dnone.c @@ -378,7 +378,7 @@ done: *------------------------------------------------------------------------- */ static herr_t -H5D__none_idx_copy_setup(const H5D_chk_idx_info_t *idx_info_src, +H5D__none_idx_copy_setup(const H5D_chk_idx_info_t H5_ATTR_SANITY_CHECK *idx_info_src, const H5D_chk_idx_info_t *idx_info_dst) { herr_t ret_value = SUCCEED; /* Return value */ diff --git a/src/H5Dsingle.c b/src/H5Dsingle.c index 4510a03..3d7400d 100644 --- a/src/H5Dsingle.c +++ b/src/H5Dsingle.c @@ -437,7 +437,7 @@ H5D__single_idx_delete(const H5D_chk_idx_info_t *idx_info) *------------------------------------------------------------------------- */ static herr_t -H5D__single_idx_copy_setup(const H5D_chk_idx_info_t *idx_info_src, +H5D__single_idx_copy_setup(const H5D_chk_idx_info_t H5_ATTR_SANITY_CHECK *idx_info_src, const H5D_chk_idx_info_t *idx_info_dst) { herr_t ret_value = SUCCEED; /* Return value */ diff --git a/src/H5EAcache.c b/src/H5EAcache.c index da67e6b..66a5951 100644 --- a/src/H5EAcache.c +++ b/src/H5EAcache.c @@ -1540,7 +1540,7 @@ END_FUNC(STATIC) /* end H5EA__cache_sblock_verify_chksum() */ */ BEGIN_FUNC(STATIC, ERR, void *, NULL, NULL, -H5EA__cache_dblock_deserialize(const void *_image, size_t len, +H5EA__cache_dblock_deserialize(const void *_image, size_t H5_ATTR_SANITY_CHECK len, void *_udata, hbool_t H5_ATTR_UNUSED *dirty)) /* Local variables */ @@ -2076,7 +2076,7 @@ END_FUNC(STATIC) /* end H5EA__cache_dblk_page_image_len() */ */ BEGIN_FUNC(STATIC, ERR, herr_t, SUCCEED, FAIL, -H5EA__cache_dblk_page_serialize(const H5F_t *f, void *_image, size_t H5_ATTR_UNUSED len, +H5EA__cache_dblk_page_serialize(const H5F_t H5_ATTR_SANITY_CHECK *f, void *_image, size_t H5_ATTR_UNUSED len, void *_thing)) /* Local variables */ diff --git a/src/H5EAtest.c b/src/H5EAtest.c index 814e64f..6b47828 100644 --- a/src/H5EAtest.c +++ b/src/H5EAtest.c @@ -279,7 +279,7 @@ END_FUNC(STATIC) /* end H5EA__test_encode() */ */ BEGIN_FUNC(STATIC, NOERR, herr_t, SUCCEED, -, -H5EA__test_decode(const void *_raw, void *_elmt, size_t nelmts, void *_ctx)) +H5EA__test_decode(const void *_raw, void *_elmt, size_t nelmts, void H5_ATTR_SANITY_CHECK *_ctx)) /* Local variables */ #ifndef NDEBUG diff --git a/src/H5FAcache.c b/src/H5FAcache.c index f440efe..fabaf12 100644 --- a/src/H5FAcache.c +++ b/src/H5FAcache.c @@ -253,7 +253,7 @@ END_FUNC(STATIC) /* end H5FA__cache_hdr_verify_chksum() */ */ BEGIN_FUNC(STATIC, ERR, void *, NULL, NULL, -H5FA__cache_hdr_deserialize(const void *_image, size_t len, +H5FA__cache_hdr_deserialize(const void *_image, size_t H5_ATTR_SANITY_CHECK len, void *_udata, hbool_t H5_ATTR_UNUSED *dirty)) /* Local variables */ @@ -650,7 +650,7 @@ END_FUNC(STATIC) /* end H5FA__cache_dblock_verify_chksum() */ */ BEGIN_FUNC(STATIC, ERR, void *, NULL, NULL, -H5FA__cache_dblock_deserialize(const void *_image, size_t len, +H5FA__cache_dblock_deserialize(const void *_image, size_t H5_ATTR_SANITY_CHECK len, void *_udata, hbool_t H5_ATTR_UNUSED *dirty)) /* Local variables */ @@ -1176,7 +1176,7 @@ END_FUNC(STATIC) /* end H5FA__cache_dblk_page_image_len() */ */ BEGIN_FUNC(STATIC, ERR, herr_t, SUCCEED, FAIL, -H5FA__cache_dblk_page_serialize(const H5F_t *f, void *_image, size_t H5_ATTR_UNUSED len, +H5FA__cache_dblk_page_serialize(const H5F_t H5_ATTR_SANITY_CHECK *f, void *_image, size_t H5_ATTR_UNUSED len, void *_thing)) /* Local variables */ diff --git a/src/H5FDhdfs.c b/src/H5FDhdfs.c index 0b954cf..63d3de5 100644 --- a/src/H5FDhdfs.c +++ b/src/H5FDhdfs.c @@ -581,6 +581,9 @@ hid_t H5FD_hdfs_init(void) { hid_t ret_value = H5I_INVALID_HID; /* Return value */ +#if HDFS_STATS + unsigned int bin_i; +#endif FUNC_ENTER_NOAPI(FAIL) diff --git a/src/H5FS.c b/src/H5FS.c index dbcb6b5..bd89bed 100644 --- a/src/H5FS.c +++ b/src/H5FS.c @@ -665,7 +665,7 @@ done: *------------------------------------------------------------------------- */ herr_t -H5FS_size(const H5F_t *f, const H5FS_t *fspace, hsize_t *meta_size) +H5FS_size(const H5F_t H5_ATTR_SANITY_CHECK *f, const H5FS_t *fspace, hsize_t *meta_size) { FUNC_ENTER_NOAPI_NOINIT_NOERR diff --git a/src/H5FScache.c b/src/H5FScache.c index b520458..4f05eee 100644 --- a/src/H5FScache.c +++ b/src/H5FScache.c @@ -241,7 +241,7 @@ H5FS__cache_hdr_verify_chksum(const void *_image, size_t len, void H5_ATTR_UNUSE *------------------------------------------------------------------------- */ static void * -H5FS__cache_hdr_deserialize(const void *_image, size_t len, void *_udata, +H5FS__cache_hdr_deserialize(const void *_image, size_t H5_ATTR_SANITY_CHECK len, void *_udata, hbool_t H5_ATTR_UNUSED *dirty) { H5FS_t *fspace = NULL; /* Free space header info */ @@ -404,8 +404,8 @@ H5FS__cache_hdr_image_len(const void *_thing, size_t *image_len) */ static herr_t H5FS__cache_hdr_pre_serialize(H5F_t *f, void *_thing, - haddr_t addr, size_t H5_ATTR_UNUSED len, haddr_t *new_addr, size_t *new_len, - unsigned *flags) + haddr_t addr, size_t H5_ATTR_UNUSED len, haddr_t H5_ATTR_SANITY_CHECK *new_addr, + size_t H5_ATTR_SANITY_CHECK *new_len, unsigned *flags) { H5FS_t *fspace = (H5FS_t *)_thing; /* Pointer to the object */ H5AC_ring_t orig_ring = H5AC_RING_INV; /* Original ring value */ @@ -694,7 +694,7 @@ done: *------------------------------------------------------------------------- */ static herr_t -H5FS__cache_hdr_serialize(const H5F_t *f, void *_image, size_t len, +H5FS__cache_hdr_serialize(const H5F_t *f, void *_image, size_t H5_ATTR_SANITY_CHECK len, void *_thing) { H5FS_t *fspace = (H5FS_t *)_thing; /* Pointer to the object */ @@ -979,8 +979,8 @@ H5FS__cache_sinfo_verify_chksum(const void *_image, size_t len, void H5_ATTR_UNU *------------------------------------------------------------------------- */ static void * -H5FS__cache_sinfo_deserialize(const void *_image, size_t len, void *_udata, - hbool_t *dirty) +H5FS__cache_sinfo_deserialize(const void *_image, size_t H5_ATTR_SANITY_CHECK len, void *_udata, + hbool_t H5_ATTR_SANITY_CHECK *dirty) { H5FS_sinfo_cache_ud_t *udata = (H5FS_sinfo_cache_ud_t *)_udata; /* User data for callback */ H5FS_t *fspace; /* free space manager */ @@ -1025,11 +1025,11 @@ H5FS__cache_sinfo_deserialize(const void *_image, size_t len, void *_udata, /* Check for any serialized sections */ if(fspace->serial_sect_count > 0) { - hsize_t old_tot_sect_count; /* Total section count from header */ - hsize_t old_serial_sect_count; /* Total serializable section count from header */ - hsize_t old_ghost_sect_count; /* Total ghost section count from header */ - hsize_t old_tot_space; /* Total space managed from header */ - unsigned sect_cnt_size; /* The size of the section size counts */ + hsize_t old_tot_sect_count; /* Total section count from header */ + hsize_t H5_ATTR_SANITY_CHECK old_serial_sect_count; /* Total serializable section count from header */ + hsize_t H5_ATTR_SANITY_CHECK old_ghost_sect_count; /* Total ghost section count from header */ + hsize_t H5_ATTR_SANITY_CHECK old_tot_space; /* Total space managed from header */ + unsigned sect_cnt_size; /* The size of the section size counts */ /* Compute the size of the section counts */ sect_cnt_size = H5VM_limit_enc_size((uint64_t)fspace->serial_sect_count); @@ -1141,7 +1141,6 @@ static herr_t H5FS__cache_sinfo_image_len(const void *_thing, size_t *image_len) { const H5FS_sinfo_t *sinfo = (const H5FS_sinfo_t *)_thing; /* Pointer to the object */ - const H5FS_t *fspace; /* Free space header */ FUNC_ENTER_STATIC_NOERR @@ -1149,10 +1148,9 @@ H5FS__cache_sinfo_image_len(const void *_thing, size_t *image_len) HDassert(sinfo); HDassert(sinfo->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_MAGIC); HDassert(sinfo->cache_info.type == H5AC_FSPACE_SINFO); - fspace = sinfo->fspace; - HDassert(fspace); - HDassert(fspace->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_MAGIC); - HDassert(fspace->cache_info.type == H5AC_FSPACE_HDR); + HDassert(sinfo->fspace); + HDassert(sinfo->fspace->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_MAGIC); + HDassert(sinfo->fspace->cache_info.type == H5AC_FSPACE_HDR); HDassert(image_len); /* Set the image length size */ @@ -1180,7 +1178,8 @@ H5FS__cache_sinfo_image_len(const void *_thing, size_t *image_len) */ static herr_t H5FS__cache_sinfo_pre_serialize(H5F_t *f, void *_thing, haddr_t addr, - size_t len, haddr_t *new_addr, size_t *new_len, unsigned *flags) + size_t H5_ATTR_SANITY_CHECK len, haddr_t *new_addr, size_t H5_ATTR_SANITY_CHECK *new_len, + unsigned *flags) { H5FS_sinfo_t *sinfo = (H5FS_sinfo_t *)_thing; /* Pointer to the object */ H5FS_t *fspace; /* Free space header */ @@ -1267,7 +1266,6 @@ H5FS__cache_sinfo_serialize(const H5F_t *f, void *_image, size_t len, void *_thing) { H5FS_sinfo_t *sinfo = (H5FS_sinfo_t *)_thing; /* Pointer to the object */ - H5FS_t *fspace; /* Free space header */ H5FS_iter_ud_t udata; /* User data for callbacks */ uint8_t *image = (uint8_t *)_image; /* Pointer into raw data buffer */ uint8_t *chksum_image = NULL; /* Points to chksum location */ @@ -1283,12 +1281,11 @@ H5FS__cache_sinfo_serialize(const H5F_t *f, void *_image, size_t len, HDassert(sinfo); HDassert(sinfo->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_MAGIC); HDassert(sinfo->cache_info.type == H5AC_FSPACE_SINFO); - fspace = sinfo->fspace; - HDassert(fspace->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_MAGIC); - HDassert(fspace->cache_info.type == H5AC_FSPACE_HDR); - HDassert(fspace->cache_info.is_pinned); - HDassert(fspace->sect_size == len); - HDassert(fspace->sect_cls); + HDassert(sinfo->fspace->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_MAGIC); + HDassert(sinfo->fspace->cache_info.type == H5AC_FSPACE_HDR); + HDassert(sinfo->fspace->cache_info.is_pinned); + HDassert(sinfo->fspace->sect_size == len); + HDassert(sinfo->fspace->sect_cls); /* Magic number */ H5MM_memcpy(image, H5FS_SINFO_MAGIC, (size_t)H5_SIZEOF_MAGIC); @@ -1418,7 +1415,6 @@ static herr_t H5FS__cache_sinfo_free_icr(void *_thing) { H5FS_sinfo_t *sinfo = (H5FS_sinfo_t *)_thing; /* Pointer to the object */ - H5FS_t *fspace; /* Free space header */ herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_STATIC @@ -1427,10 +1423,9 @@ H5FS__cache_sinfo_free_icr(void *_thing) HDassert(sinfo); HDassert(sinfo->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_BAD_MAGIC); HDassert(sinfo->cache_info.type == H5AC_FSPACE_SINFO); - fspace = sinfo->fspace; - HDassert(fspace->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_MAGIC); - HDassert(fspace->cache_info.type == H5AC_FSPACE_HDR); - HDassert(fspace->cache_info.is_pinned); + HDassert(sinfo->fspace->cache_info.magic == H5C__H5C_CACHE_ENTRY_T_MAGIC); + HDassert(sinfo->fspace->cache_info.type == H5AC_FSPACE_HDR); + HDassert(sinfo->fspace->cache_info.is_pinned); /* Destroy free space info */ if(H5FS__sinfo_dest(sinfo) < 0) diff --git a/src/H5Fsuper_cache.c b/src/H5Fsuper_cache.c index 125d6cf..f17ef15 100644 --- a/src/H5Fsuper_cache.c +++ b/src/H5Fsuper_cache.c @@ -344,7 +344,7 @@ H5F__cache_superblock_get_initial_load_size(void H5_ATTR_UNUSED *_udata, size_t *------------------------------------------------------------------------- */ static herr_t -H5F__cache_superblock_get_final_load_size(const void *_image, size_t image_len, +H5F__cache_superblock_get_final_load_size(const void *_image, size_t H5_ATTR_SANITY_CHECK image_len, void *_udata, size_t *actual_len) { const uint8_t *image = (const uint8_t *)_image; /* Pointer into raw data buffer */ @@ -434,7 +434,7 @@ H5F__cache_superblock_verify_chksum(const void *_image, size_t len, void *_udata *------------------------------------------------------------------------- */ static void * -H5F__cache_superblock_deserialize(const void *_image, size_t len, void *_udata, +H5F__cache_superblock_deserialize(const void *_image, size_t H5_ATTR_SANITY_CHECK len, void *_udata, hbool_t H5_ATTR_UNUSED *dirty) { H5F_super_t *sblock = NULL; /* File's superblock */ @@ -867,7 +867,7 @@ H5F__cache_drvrinfo_get_initial_load_size(void H5_ATTR_UNUSED *_udata, size_t *i *------------------------------------------------------------------------- */ static herr_t -H5F__cache_drvrinfo_get_final_load_size(const void *_image, size_t image_len, +H5F__cache_drvrinfo_get_final_load_size(const void *_image, size_t H5_ATTR_SANITY_CHECK image_len, void *_udata, size_t *actual_len) { const uint8_t *image = (const uint8_t *)_image; /* Pointer into raw data buffer */ @@ -911,7 +911,7 @@ done: *------------------------------------------------------------------------- */ static void * -H5F__cache_drvrinfo_deserialize(const void *_image, size_t len, void *_udata, +H5F__cache_drvrinfo_deserialize(const void *_image, size_t H5_ATTR_SANITY_CHECK len, void *_udata, hbool_t H5_ATTR_UNUSED *dirty) { H5O_drvinfo_t *drvinfo = NULL; /* Driver info */ @@ -1006,7 +1006,7 @@ H5F__cache_drvrinfo_image_len(const void *_thing, size_t *image_len) *------------------------------------------------------------------------- */ static herr_t -H5F__cache_drvrinfo_serialize(const H5F_t *f, void *_image, size_t len, +H5F__cache_drvrinfo_serialize(const H5F_t *f, void *_image, size_t H5_ATTR_SANITY_CHECK len, void *_thing) { H5O_drvinfo_t *drvinfo = (H5O_drvinfo_t *)_thing; /* Pointer to the object */ diff --git a/src/H5Gnode.c b/src/H5Gnode.c index b79b7d2..54769ca 100644 --- a/src/H5Gnode.c +++ b/src/H5Gnode.c @@ -762,12 +762,11 @@ done: *------------------------------------------------------------------------- */ static H5B_ins_t -H5G_node_remove(H5F_t *f, haddr_t addr, void *_lt_key/*in,out*/, +H5G_node_remove(H5F_t *f, haddr_t addr, void H5_ATTR_SANITY_CHECK *_lt_key/*in,out*/, hbool_t H5_ATTR_UNUSED *lt_key_changed/*out*/, void *_udata/*in,out*/, void *_rt_key/*in,out*/, hbool_t *rt_key_changed/*out*/) { - H5G_node_key_t *lt_key = (H5G_node_key_t *)_lt_key; H5G_node_key_t *rt_key = (H5G_node_key_t *)_rt_key; H5G_bt_rm_t *udata = (H5G_bt_rm_t *)_udata; H5G_node_t *sn = NULL; @@ -781,7 +780,7 @@ H5G_node_remove(H5F_t *f, haddr_t addr, void *_lt_key/*in,out*/, /* Check arguments */ HDassert(f); HDassert(H5F_addr_defined(addr)); - HDassert(lt_key); + HDassert((H5G_node_key_t *)_lt_key); HDassert(rt_key); HDassert(udata && udata->common.heap); diff --git a/src/H5HFcache.c b/src/H5HFcache.c index 2d1c1f2..1d76ba3 100644 --- a/src/H5HFcache.c +++ b/src/H5HFcache.c @@ -403,7 +403,7 @@ H5HF__cache_hdr_get_initial_load_size(void *_udata, size_t *image_len) *------------------------------------------------------------------------- */ static herr_t -H5HF__cache_hdr_get_final_load_size(const void *_image, size_t image_len, +H5HF__cache_hdr_get_final_load_size(const void *_image, size_t H5_ATTR_SANITY_CHECK image_len, void *_udata, size_t *actual_len) { H5HF_hdr_t hdr; /* Temporary fractal heap header */ @@ -749,7 +749,7 @@ done: *------------------------------------------------------------------------- */ static herr_t -H5HF__cache_hdr_serialize(const H5F_t *f, void *_image, size_t len, +H5HF__cache_hdr_serialize(const H5F_t *f, void *_image, size_t H5_ATTR_SANITY_CHECK len, void *_thing) { H5HF_hdr_t *hdr = (H5HF_hdr_t *)_thing; /* Fractal heap info */ @@ -979,8 +979,8 @@ H5HF__cache_iblock_verify_chksum(const void *_image, size_t len, void H5_ATTR_UN *------------------------------------------------------------------------- */ static void * -H5HF__cache_iblock_deserialize(const void *_image, size_t len, void *_udata, - hbool_t H5_ATTR_UNUSED *dirty) +H5HF__cache_iblock_deserialize(const void *_image, size_t H5_ATTR_SANITY_CHECK len, + void *_udata, hbool_t H5_ATTR_UNUSED *dirty) { H5HF_hdr_t *hdr; /* Shared fractal heap information */ H5HF_iblock_cache_ud_t *udata = (H5HF_iblock_cache_ud_t *)_udata; /* User data for callback */ @@ -1326,7 +1326,7 @@ done: *------------------------------------------------------------------------- */ static herr_t -H5HF__cache_iblock_serialize(const H5F_t *f, void *_image, size_t len, +H5HF__cache_iblock_serialize(const H5F_t *f, void *_image, size_t H5_ATTR_SANITY_CHECK len, void *_thing) { H5HF_hdr_t *hdr; /* Shared fractal heap information */ @@ -1471,8 +1471,8 @@ H5HF__cache_iblock_notify(H5AC_notify_action_t action, void *_thing) else { /* if this is a child iblock, verify that the pointers are */ /* either uninitialized or set up correctly. */ - H5HF_indirect_t *par_iblock = iblock->parent; - unsigned indir_idx; /* Index in parent's child iblock pointer array */ + H5HF_indirect_t H5_ATTR_SANITY_CHECK *par_iblock = iblock->parent; + unsigned H5_ATTR_SANITY_CHECK indir_idx; /* Index in parent's child iblock pointer array */ /* Sanity check */ HDassert(par_iblock->child_iblocks); @@ -2438,8 +2438,8 @@ done: *------------------------------------------------------------------------- */ static herr_t -H5HF__cache_dblock_serialize(const H5F_t *f, void *image, size_t len, - void *_thing) +H5HF__cache_dblock_serialize(const H5F_t H5_ATTR_SANITY_CHECK *f, void *image, + size_t H5_ATTR_SANITY_CHECK len, void *_thing) { H5HF_direct_t *dblock = (H5HF_direct_t *)_thing; /* Direct block info */ herr_t ret_value = SUCCEED; /* Return value */ diff --git a/src/H5HFsection.c b/src/H5HFsection.c index f5ac8e5..1514c53 100644 --- a/src/H5HFsection.c +++ b/src/H5HFsection.c @@ -1185,9 +1185,9 @@ H5HF__sect_single_valid(const H5FS_section_class_t H5_ATTR_UNUSED *cls, const H5 H5HF_indirect_t *iblock; /* Indirect block that section's direct block resides in */ haddr_t dblock_addr; /* Direct block address */ size_t dblock_size; /* Direct block size */ - size_t dblock_overhead; /* Direct block's overhead */ + size_t H5_ATTR_SANITY_CHECK dblock_overhead; /* Direct block's overhead */ unsigned dblock_status = 0; /* Direct block's status in the metadata cache */ - herr_t status; /* Generic status value */ + herr_t H5_ATTR_SANITY_CHECK status; /* Generic status value */ /* Sanity check settings for section's direct block's parent */ iblock = sect->u.single.parent; @@ -2038,7 +2038,7 @@ H5HF__sect_row_valid(const H5FS_section_class_t *cls, const H5FS_section_info_t const H5HF_hdr_t *hdr; /* Fractal heap header */ const H5HF_free_section_t *sect = (const H5HF_free_section_t *)_sect; /* Pointer to section to check */ const H5HF_free_section_t *indir_sect; /* Pointer to underlying indirect section */ - unsigned indir_idx; /* Index of row in underlying indirect section's row array */ + unsigned H5_ATTR_SANITY_CHECK indir_idx; /* Index of row in underlying indirect section's row array */ FUNC_ENTER_STATIC_NOERR @@ -4125,7 +4125,7 @@ H5HF_sect_indirect_valid(const H5HF_hdr_t *hdr, const H5HF_free_section_t *sect) dir_nrows = (max_dir_row - start_row) + 1; HDassert(dir_nrows == sect->u.indirect.dir_nrows); for(u = 0; u < dir_nrows; u++) { - const H5HF_free_section_t *tmp_row_sect; /* Pointer to row section */ + const H5HF_free_section_t H5_ATTR_SANITY_CHECK *tmp_row_sect; /* Pointer to row section */ tmp_row_sect = sect->u.indirect.dir_rows[u]; HDassert(tmp_row_sect->sect_info.type == H5HF_FSPACE_SECT_FIRST_ROW @@ -4133,7 +4133,7 @@ H5HF_sect_indirect_valid(const H5HF_hdr_t *hdr, const H5HF_free_section_t *sect) HDassert(tmp_row_sect->u.row.under == sect); HDassert(tmp_row_sect->u.row.row == (start_row + u)); if(u > 0) { - const H5HF_free_section_t *tmp_row_sect2; /* Pointer to row section */ + const H5HF_free_section_t H5_ATTR_SANITY_CHECK *tmp_row_sect2; /* Pointer to row section */ tmp_row_sect2 = sect->u.indirect.dir_rows[u - 1]; HDassert(tmp_row_sect2->u.row.row < tmp_row_sect->u.row.row); @@ -4160,7 +4160,7 @@ H5HF_sect_indirect_valid(const H5HF_hdr_t *hdr, const H5HF_free_section_t *sect) HDassert(tmp_child_sect->sect_info.type == H5HF_FSPACE_SECT_INDIRECT); HDassert(tmp_child_sect->u.indirect.parent == sect); if(u > 0) { - const H5HF_free_section_t *tmp_child_sect2; /* Pointer to child indirect section */ + const H5HF_free_section_t H5_ATTR_SANITY_CHECK *tmp_child_sect2; /* Pointer to child indirect section */ tmp_child_sect2 = sect->u.indirect.indir_ents[u - 1]; HDassert(H5F_addr_lt(tmp_child_sect2->sect_info.addr, tmp_child_sect->sect_info.addr)); diff --git a/src/H5HGcache.c b/src/H5HGcache.c index 29e88df..a2a9318 100644 --- a/src/H5HGcache.c +++ b/src/H5HGcache.c @@ -202,7 +202,7 @@ H5HG__cache_heap_get_initial_load_size(void H5_ATTR_UNUSED *_udata, size_t *imag *------------------------------------------------------------------------- */ static herr_t -H5HG__cache_heap_get_final_load_size(const void *image, size_t image_len, +H5HG__cache_heap_get_final_load_size(const void *image, size_t H5_ATTR_SANITY_CHECK image_len, void *udata, size_t *actual_len) { H5HG_heap_t heap; /* Global heap */ @@ -432,7 +432,7 @@ H5HG__cache_heap_image_len(const void *_thing, size_t *image_len) *------------------------------------------------------------------------- */ static herr_t -H5HG__cache_heap_serialize(const H5F_t *f, void *image, size_t len, +H5HG__cache_heap_serialize(const H5F_t H5_ATTR_SANITY_CHECK *f, void *image, size_t len, void *_thing) { H5HG_heap_t *heap = (H5HG_heap_t *)_thing; diff --git a/src/H5HLcache.c b/src/H5HLcache.c index 8b04b47..966ef40 100644 --- a/src/H5HLcache.c +++ b/src/H5HLcache.c @@ -364,7 +364,7 @@ H5HL__cache_prefix_get_initial_load_size(void H5_ATTR_UNUSED *_udata, size_t *im *------------------------------------------------------------------------- */ static herr_t -H5HL__cache_prefix_get_final_load_size(const void *_image, size_t image_len, +H5HL__cache_prefix_get_final_load_size(const void *_image, size_t H5_ATTR_SANITY_CHECK image_len, void *_udata, size_t *actual_len) { const uint8_t *image = (const uint8_t *)_image; /* Pointer into raw data buffer */ @@ -415,8 +415,8 @@ done: *------------------------------------------------------------------------- */ static void * -H5HL__cache_prefix_deserialize(const void *_image, size_t len, void *_udata, - hbool_t H5_ATTR_UNUSED *dirty) +H5HL__cache_prefix_deserialize(const void *_image, size_t H5_ATTR_SANITY_CHECK len, + void *_udata, hbool_t H5_ATTR_UNUSED *dirty) { H5HL_t *heap = NULL; /* Local heap */ H5HL_prfx_t *prfx = NULL; /* Heap prefix deserialized */ @@ -555,7 +555,7 @@ H5HL__cache_prefix_image_len(const void *_thing, size_t *image_len) *------------------------------------------------------------------------- */ static herr_t -H5HL__cache_prefix_serialize(const H5F_t *f, void *_image, size_t len, +H5HL__cache_prefix_serialize(const H5_ATTR_SANITY_CHECK H5F_t *f, void *_image, size_t H5_ATTR_SANITY_CHECK len, void *_thing) { H5HL_prfx_t *prfx = (H5HL_prfx_t *)_thing; /* Pointer to local heap prefix to query */ @@ -826,8 +826,8 @@ H5HL__cache_datablock_image_len(const void *_thing, size_t *image_len) *------------------------------------------------------------------------- */ static herr_t -H5HL__cache_datablock_serialize(const H5F_t *f, void *image, size_t len, - void *_thing) +H5HL__cache_datablock_serialize(const H5F_t H5_ATTR_SANITY_CHECK *f, void *image, + size_t H5_ATTR_SANITY_CHECK len, void *_thing) { H5HL_t *heap; /* Pointer to the local heap */ H5HL_dblk_t *dblk = (H5HL_dblk_t *)_thing; /* Pointer to the local heap data block */ diff --git a/src/H5I.c b/src/H5I.c index c3c2d46..5159908 100644 --- a/src/H5I.c +++ b/src/H5I.c @@ -215,7 +215,7 @@ H5I_term_package(void) *------------------------------------------------------------------------- */ H5I_type_t -H5Iregister_type(size_t hash_size, unsigned reserved, H5I_free_t free_func) +H5Iregister_type(size_t H5_ATTR_SANITY_CHECK hash_size, unsigned reserved, H5I_free_t free_func) { H5I_class_t *cls = NULL; /* New ID class */ H5I_type_t new_type; /* New ID type value */ diff --git a/src/H5Oainfo.c b/src/H5Oainfo.c index 7f4f17f..2d3a9b7 100644 --- a/src/H5Oainfo.c +++ b/src/H5Oainfo.c @@ -334,7 +334,7 @@ H5O__ainfo_free(void *mesg) *------------------------------------------------------------------------- */ static herr_t -H5O__ainfo_delete(H5F_t *f, H5O_t *open_oh, void *_mesg) +H5O__ainfo_delete(H5F_t *f, H5O_t H5_ATTR_SANITY_CHECK *open_oh, void *_mesg) { H5O_ainfo_t *ainfo = (H5O_ainfo_t *)_mesg; herr_t ret_value = SUCCEED; /* Return value */ @@ -405,9 +405,9 @@ H5O_ainfo_pre_copy_file(H5F_t H5_ATTR_UNUSED *file_src, const void H5_ATTR_UNUSE *------------------------------------------------------------------------- */ static void * -H5O__ainfo_copy_file(H5F_t *file_src, void *mesg_src, H5F_t *file_dst, +H5O__ainfo_copy_file(H5F_t H5_ATTR_SANITY_CHECK *file_src, void *mesg_src, H5F_t *file_dst, hbool_t H5_ATTR_UNUSED *recompute_size, unsigned H5_ATTR_UNUSED *mesg_flags, - H5O_copy_t *cpy_info, void H5_ATTR_UNUSED *udata) + H5O_copy_t H5_ATTR_SANITY_CHECK *cpy_info, void H5_ATTR_UNUSED *udata) { H5O_ainfo_t *ainfo_src = (H5O_ainfo_t *)mesg_src; H5O_ainfo_t *ainfo_dst = NULL; diff --git a/src/H5Oalloc.c b/src/H5Oalloc.c index c1f90cb..698fc19 100644 --- a/src/H5Oalloc.c +++ b/src/H5Oalloc.c @@ -111,7 +111,7 @@ H5FL_EXTERN(H5O_cont_t); *------------------------------------------------------------------------- */ static herr_t -H5O__add_gap(H5F_t *f, H5O_t *oh, unsigned chunkno, hbool_t *chk_dirtied, +H5O__add_gap(H5F_t H5_ATTR_SANITY_CHECK *f, H5O_t *oh, unsigned chunkno, hbool_t *chk_dirtied, size_t idx, uint8_t *new_gap_loc, size_t new_gap_size) { hbool_t merged_with_null; /* Whether the gap was merged with a null message */ diff --git a/src/H5Ocache.c b/src/H5Ocache.c index 683d155..a977594 100644 --- a/src/H5Ocache.c +++ b/src/H5Ocache.c @@ -201,7 +201,7 @@ H5O__cache_get_initial_load_size(void H5_ATTR_UNUSED *_udata, size_t *image_len) *------------------------------------------------------------------------- */ static herr_t -H5O__cache_get_final_load_size(const void *image, size_t image_len, +H5O__cache_get_final_load_size(const void *image, size_t H5_ATTR_SANITY_CHECK image_len, void *_udata, size_t *actual_len) { H5O_cache_ud_t *udata = (H5O_cache_ud_t *)_udata; /* User data for callback */ @@ -306,7 +306,7 @@ H5O__cache_verify_chksum(const void *_image, size_t len, void *_udata) *------------------------------------------------------------------------- */ static void * -H5O__cache_deserialize(const void *image, size_t len, void *_udata, +H5O__cache_deserialize(const void *image, size_t H5_ATTR_SANITY_CHECK len, void *_udata, hbool_t *dirty) { H5O_t *oh = NULL; /* Object header read in */ @@ -763,7 +763,7 @@ H5O__cache_chk_verify_chksum(const void *_image, size_t len, void *_udata) *------------------------------------------------------------------------- */ static void * -H5O__cache_chk_deserialize(const void *image, size_t len, void *_udata, +H5O__cache_chk_deserialize(const void *image, size_t H5_ATTR_SANITY_CHECK len, void *_udata, hbool_t *dirty) { H5O_chunk_proxy_t *chk_proxy = NULL; /* Chunk proxy object */ diff --git a/src/H5Omessage.c b/src/H5Omessage.c index 18f3706..1623769 100644 --- a/src/H5Omessage.c +++ b/src/H5Omessage.c @@ -1686,17 +1686,14 @@ done: *------------------------------------------------------------------------- */ herr_t -H5O_msg_reset_share(unsigned type_id, void *mesg) +H5O_msg_reset_share(unsigned H5_ATTR_SANITY_CHECK type_id, void *mesg) { - const H5O_msg_class_t *type; /* Actual H5O class type for the ID */ - FUNC_ENTER_NOAPI_NOINIT_NOERR /* Check args */ HDassert(type_id < NELMTS(H5O_msg_class_g)); - type = H5O_msg_class_g[type_id]; /* map the type ID to the actual type object */ - HDassert(type); - HDassert(type->share_flags & H5O_SHARE_IS_SHARABLE); + HDassert(H5O_msg_class_g[type_id]); /* map the type ID to the actual type object */ + HDassert(H5O_msg_class_g[type_id]->share_flags & H5O_SHARE_IS_SHARABLE); HDassert(mesg); /* Reset the shared component in the message to zero. */ diff --git a/src/H5Oshared.c b/src/H5Oshared.c index 67ca76f..3798cdf 100644 --- a/src/H5Oshared.c +++ b/src/H5Oshared.c @@ -589,9 +589,9 @@ done: *------------------------------------------------------------------------- */ herr_t -H5O__shared_copy_file(H5F_t *file_src, H5F_t *file_dst, +H5O__shared_copy_file(H5F_t H5_ATTR_SANITY_CHECK *file_src, H5F_t *file_dst, const H5O_msg_class_t *mesg_type, const void *_native_src, void *_native_dst, - hbool_t H5_ATTR_UNUSED *recompute_size, unsigned *mesg_flags, H5O_copy_t *cpy_info, + hbool_t H5_ATTR_UNUSED *recompute_size, unsigned *mesg_flags, H5O_copy_t H5_ATTR_SANITY_CHECK *cpy_info, void H5_ATTR_UNUSED *udata) { const H5O_shared_t *shared_src = (const H5O_shared_t *)_native_src; /* Alias to shared info in native source */ diff --git a/src/H5Oshared.h b/src/H5Oshared.h index 8040a6a..f0fced4 100644 --- a/src/H5Oshared.h +++ b/src/H5Oshared.h @@ -381,7 +381,7 @@ done: *------------------------------------------------------------------------- */ static H5_INLINE herr_t -H5O_SHARED_POST_COPY_FILE(const H5O_loc_t *oloc_src, const void *mesg_src, +H5O_SHARED_POST_COPY_FILE(const H5O_loc_t H5_ATTR_SANITY_CHECK *oloc_src, const void *mesg_src, H5O_loc_t *oloc_dst, void *mesg_dst, unsigned *mesg_flags, H5O_copy_t *cpy_info) { diff --git a/src/H5Pfapl.c b/src/H5Pfapl.c index 22252d3..c046bba 100644 --- a/src/H5Pfapl.c +++ b/src/H5Pfapl.c @@ -5753,10 +5753,10 @@ H5P__facc_vol_cmp(const void *_info1, const void *_info2, size_t H5_ATTR_UNUSED { const H5VL_connector_prop_t *info1 = (const H5VL_connector_prop_t *)_info1; /* Create local aliases for values */ const H5VL_connector_prop_t *info2 = (const H5VL_connector_prop_t *)_info2; - H5VL_class_t *cls1, *cls2; /* connector class for each property */ - int cmp_value = 0; /* Value from comparison */ - herr_t status; /* Status from info comparison */ - int ret_value = 0; /* Return value */ + H5VL_class_t *cls1, *cls2; /* connector class for each property */ + int cmp_value = 0; /* Value from comparison */ + herr_t H5_ATTR_SANITY_CHECK status; /* Status from info comparison */ + int ret_value = 0; /* Return value */ FUNC_ENTER_STATIC_NOERR diff --git a/src/H5Pint.c b/src/H5Pint.c index 2911eef..c3c6f62 100644 --- a/src/H5Pint.c +++ b/src/H5Pint.c @@ -2780,8 +2780,8 @@ done: REVISION LOG --------------------------------------------------------------------------*/ static herr_t -H5P__poke_plist_cb(H5P_genplist_t *plist, const char *name, H5P_genprop_t *prop, - void *_udata) +H5P__poke_plist_cb(H5P_genplist_t H5_ATTR_SANITY_CHECK *plist, const char H5_ATTR_SANITY_CHECK *name, + H5P_genprop_t *prop, void *_udata) { H5P_prop_set_ud_t *udata = (H5P_prop_set_ud_t *)_udata; /* User data for callback */ herr_t ret_value = SUCCEED; /* Return value */ @@ -2827,7 +2827,7 @@ done: REVISION LOG --------------------------------------------------------------------------*/ static herr_t -H5P__poke_pclass_cb(H5P_genplist_t *plist, const char *name, H5P_genprop_t *prop, +H5P__poke_pclass_cb(H5P_genplist_t *plist, const char H5_ATTR_SANITY_CHECK *name, H5P_genprop_t *prop, void *_udata) { H5P_prop_set_ud_t *udata = (H5P_prop_set_ud_t *)_udata; /* User data for callback */ @@ -4260,10 +4260,9 @@ property list class. REVISION LOG --------------------------------------------------------------------------*/ static int -H5P__iterate_pclass_cb(void *_item, void *_key, void *_udata) +H5P__iterate_pclass_cb(void *_item, void H5_ATTR_SANITY_CHECK *_key, void *_udata) { H5P_genprop_t *item = (H5P_genprop_t *)_item; /* Pointer to the property */ - char *key = (char *)_key; /* Pointer to the property's name */ H5P_iter_pclass_ud_t *udata = (H5P_iter_pclass_ud_t *)_udata; /* Pointer to user data */ int ret_value = 0; /* Return value */ @@ -4271,7 +4270,7 @@ H5P__iterate_pclass_cb(void *_item, void *_key, void *_udata) /* Sanity check */ HDassert(item); - HDassert(key); + HDassert((char *)_key); /* Check if we've found the correctly indexed property */ if(*udata->curr_idx_ptr >= udata->prev_idx) { @@ -4397,8 +4396,8 @@ done: REVISION LOG --------------------------------------------------------------------------*/ static herr_t -H5P__peek_cb(H5P_genplist_t *plist, const char *name, H5P_genprop_t *prop, - void *_udata) +H5P__peek_cb(H5P_genplist_t H5_ATTR_SANITY_CHECK *plist, const char H5_ATTR_SANITY_CHECK *name, + H5P_genprop_t *prop, void *_udata) { H5P_prop_get_ud_t *udata = (H5P_prop_get_ud_t *)_udata; /* User data for callback */ herr_t ret_value = SUCCEED; /* Return value */ diff --git a/src/H5Plapl.c b/src/H5Plapl.c index 7a7cc23..4ea6716 100644 --- a/src/H5Plapl.c +++ b/src/H5Plapl.c @@ -567,7 +567,7 @@ H5P__lacc_elink_fapl_cmp(const void *value1, const void *value2, size_t H5_ATTR_ if(obj1 == NULL && obj2 != NULL) HGOTO_DONE(1); if(obj1 != NULL && obj2 == NULL) HGOTO_DONE(-1); if(obj1 && obj2) { - herr_t status; + herr_t H5_ATTR_SANITY_CHECK status; status = H5P__cmp_plist(obj1, obj2, &ret_value); HDassert(status >= 0); diff --git a/src/H5SL.c b/src/H5SL.c index 5f00fb8..7ca70b3 100644 --- a/src/H5SL.c +++ b/src/H5SL.c @@ -652,7 +652,7 @@ int H5SL_term_package(void) /* Terminate all the factories */ if(H5SL_fac_nused_g > 0) { size_t i; - herr_t ret; + herr_t H5_ATTR_SANITY_CHECK ret; for(i = 0; i < H5SL_fac_nused_g; i++) { ret = H5FL_fac_term(H5SL_fac_g[i]); diff --git a/src/H5SMcache.c b/src/H5SMcache.c index 49ce2b4..f4c7d4d 100644 --- a/src/H5SMcache.c +++ b/src/H5SMcache.c @@ -212,8 +212,8 @@ H5SM__cache_table_verify_chksum(const void *_image, size_t len, void H5_ATTR_UNU *------------------------------------------------------------------------- */ static void * -H5SM__cache_table_deserialize(const void *_image, size_t len, void *_udata, - hbool_t H5_ATTR_UNUSED *dirty) +H5SM__cache_table_deserialize(const void *_image, size_t H5_ATTR_SANITY_CHECK len, + void *_udata, hbool_t H5_ATTR_UNUSED *dirty) { H5F_t *f; /* File pointer -- from user data */ H5SM_master_table_t *table = NULL; /* Shared message table that we deserializing */ @@ -364,7 +364,7 @@ H5SM__cache_table_image_len(const void *_thing, size_t *image_len) *------------------------------------------------------------------------- */ static herr_t -H5SM__cache_table_serialize(const H5F_t *f, void *_image, size_t len, +H5SM__cache_table_serialize(const H5F_t *f, void *_image, size_t H5_ATTR_SANITY_CHECK len, void *_thing) { H5SM_master_table_t *table = (H5SM_master_table_t *)_thing; /* Shared message table to encode */ @@ -568,8 +568,8 @@ H5SM__cache_list_verify_chksum(const void *_image, size_t H5_ATTR_UNUSED len, vo *------------------------------------------------------------------------- */ static void * -H5SM__cache_list_deserialize(const void *_image, size_t len, void *_udata, - hbool_t H5_ATTR_UNUSED *dirty) +H5SM__cache_list_deserialize(const void *_image, size_t H5_ATTR_SANITY_CHECK len, + void *_udata, hbool_t H5_ATTR_UNUSED *dirty) { H5SM_list_t *list = NULL; /* The SOHM list being read in */ H5SM_list_cache_ud_t *udata = (H5SM_list_cache_ud_t *)_udata; /* User data for callback */ @@ -687,7 +687,7 @@ H5SM__cache_list_image_len(const void *_thing, size_t *image_len) *------------------------------------------------------------------------- */ static herr_t -H5SM__cache_list_serialize(const H5F_t *f, void *_image, size_t len, +H5SM__cache_list_serialize(const H5F_t *f, void *_image, size_t H5_ATTR_SANITY_CHECK len, void *_thing) { H5SM_list_t *list = (H5SM_list_t *)_thing ; /* Instance being serialized */ diff --git a/src/H5Tconv.c b/src/H5Tconv.c index 4cc5f3c..467583a 100644 --- a/src/H5Tconv.c +++ b/src/H5Tconv.c @@ -1848,7 +1848,7 @@ H5T_conv_struct_free(H5T_conv_struct_t *priv) for(i = 0; i < priv->src_nmembs; i++) if(src2dst[i] >= 0) { - int status; + int H5_ATTR_SANITY_CHECK status; status = H5I_dec_ref(src_memb_id[i]); HDassert(status >= 0); diff --git a/src/H5Tref.c b/src/H5Tref.c index 6f21363..2805151 100644 --- a/src/H5Tref.c +++ b/src/H5Tref.c @@ -736,7 +736,7 @@ done: *------------------------------------------------------------------------- */ static herr_t -H5T__ref_disk_read(H5VL_object_t *src_file, const void *src_buf, size_t src_size, +H5T__ref_disk_read(H5VL_object_t *src_file, const void *src_buf, size_t H5_ATTR_SANITY_CHECK src_size, H5VL_object_t H5_ATTR_UNUSED *dst_file, void *dst_buf, size_t dst_size) { const uint8_t *p = (const uint8_t *)src_buf; @@ -1013,7 +1013,11 @@ H5T__ref_dsetreg_disk_getsize(H5VL_object_t H5_ATTR_UNUSED *src_file, { size_t ret_value = sizeof(struct H5Tref_dsetreg); +#ifndef NDEBUG FUNC_ENTER_STATIC +#else + FUNC_ENTER_STATIC_NOERR +#endif HDassert(src_buf); @@ -1032,7 +1036,9 @@ H5T__ref_dsetreg_disk_getsize(H5VL_object_t H5_ATTR_UNUSED *src_file, } /* end block */ #endif /* NDEBUG */ +#ifndef NDEBUG done: +#endif FUNC_LEAVE_NOAPI(ret_value) } /* end H5T__ref_dsetreg_disk_getsize() */ diff --git a/src/H5mpi.c b/src/H5mpi.c index f529b3d..15451d4 100644 --- a/src/H5mpi.c +++ b/src/H5mpi.c @@ -75,7 +75,7 @@ H5_mpi_set_bigio_count(hsize_t new_count) *------------------------------------------------------------------------- */ hsize_t -H5_mpi_get_bigio_count() +H5_mpi_get_bigio_count(void) { return bigio_count; } diff --git a/src/H5private.h b/src/H5private.h index c39c946..a6f0474 100644 --- a/src/H5private.h +++ b/src/H5private.h @@ -306,6 +306,7 @@ #ifdef __cplusplus # define H5_ATTR_FORMAT(X,Y,Z) /*void*/ # define H5_ATTR_UNUSED /*void*/ +# define H5_ATTR_SANITY_CHECK /*void*/ # define H5_ATTR_NORETURN /*void*/ # define H5_ATTR_CONST /*void*/ # define H5_ATTR_PURE /*void*/ @@ -314,6 +315,11 @@ #if defined(H5_HAVE_ATTRIBUTE) && !defined(__SUNPRO_C) # define H5_ATTR_FORMAT(X,Y,Z) __attribute__((format(X, Y, Z))) # define H5_ATTR_UNUSED __attribute__((unused)) +#ifndef NDEBUG +#define H5_ATTR_SANITY_CHECK /*void*/ +#else /* NDEBUG */ +#define H5_ATTR_SANITY_CHECK H5_ATTR_UNUSED +#endif /* NDEBUG */ # define H5_ATTR_NORETURN __attribute__((noreturn)) # define H5_ATTR_CONST __attribute__((const)) # define H5_ATTR_PURE __attribute__((pure)) @@ -325,6 +331,7 @@ #else # define H5_ATTR_FORMAT(X,Y,Z) /*void*/ # define H5_ATTR_UNUSED /*void*/ +# define H5_ATTR_SANITY_CHECK /*void*/ # define H5_ATTR_NORETURN /*void*/ # define H5_ATTR_CONST /*void*/ # define H5_ATTR_PURE /*void*/ @@ -2047,7 +2054,7 @@ H5_DLL herr_t H5CX_pop(void); #define FUNC_ENTER_COMMON(asrt) \ - hbool_t err_occurred = FALSE; \ + hbool_t H5_ATTR_SANITY_CHECK err_occurred = FALSE; \ \ FUNC_ENTER_CHECK_NAME(asrt); diff --git a/test/cache_common.c b/test/cache_common.c index 24962bc..8607717 100644 --- a/test/cache_common.c +++ b/test/cache_common.c @@ -20,6 +20,7 @@ #include "H5CXprivate.h" /* API Contexts */ #include "H5MFprivate.h" #include "H5MMprivate.h" +#include "H5private.h" #include "cache_common.h" @@ -622,7 +623,7 @@ check_write_permitted(const H5F_t H5_ATTR_UNUSED *f, hbool_t *write_permitted_pt *------------------------------------------------------------------------- */ static herr_t -get_initial_load_size(void *udata, size_t *image_length, int32_t entry_type) +get_initial_load_size(void *udata, size_t *image_length, int32_t H5_ATTR_SANITY_CHECK entry_type) { test_entry_t *entry; test_entry_t *base_addr; @@ -732,7 +733,7 @@ notify_get_initial_load_size(void *udata, size_t *image_length) */ static herr_t get_final_load_size(const void H5_ATTR_UNUSED *image, size_t H5_ATTR_UNUSED image_len, - void *udata, size_t *actual_len, int32_t entry_type) + void *udata, size_t *actual_len, int32_t H5_ATTR_SANITY_CHECK entry_type) { test_entry_t *entry; test_entry_t *base_addr; @@ -792,7 +793,8 @@ variable_get_final_load_size(const void *image, size_t image_len, */ static htri_t -verify_chksum(const void H5_ATTR_UNUSED *image, size_t H5_ATTR_UNUSED len, void *udata, int32_t entry_type) +verify_chksum(const void H5_ATTR_UNUSED *image, size_t H5_ATTR_UNUSED len, void *udata, + int32_t H5_ATTR_SANITY_CHECK entry_type) { test_entry_t *entry; test_entry_t *base_addr; @@ -845,8 +847,8 @@ variable_verify_chksum(const void *image, size_t len, void *udata) *------------------------------------------------------------------------- */ static void * -deserialize(const void *image, size_t len, void *udata, hbool_t *dirty, - int32_t entry_type) +deserialize(const void *image, size_t H5_ATTR_SANITY_CHECK len, void *udata, hbool_t *dirty, + int32_t H5_ATTR_SANITY_CHECK entry_type) { test_entry_t *entry; test_entry_t *base_addr; @@ -1002,12 +1004,10 @@ notify_deserialize(const void *image, size_t len, void *udata, hbool_t *dirty) *------------------------------------------------------------------------- */ herr_t -image_len(const void *thing, size_t *image_length, int32_t entry_type) +image_len(const void *thing, size_t *image_length, int32_t H5_ATTR_SANITY_CHECK entry_type) { const test_entry_t *entry; - test_entry_t *base_addr; int32_t type; - int32_t idx; HDassert(thing); HDassert(image_length); @@ -1017,14 +1017,12 @@ image_len(const void *thing, size_t *image_length, int32_t entry_type) HDassert(entry->self == entry); type = entry->type; - idx = entry->index; HDassert((type >= 0) && (type < NUMBER_OF_ENTRY_TYPES)); HDassert(type == entry_type); - HDassert((idx >= 0) && (idx <= max_indices[type])); + HDassert((entry->index >= 0) && (entry->index <= max_indices[type])); - base_addr = entries[type]; - HDassert(entry == &(base_addr[idx])); + HDassert(entry == &(entries[type][entry->index])); if(type != VARIABLE_ENTRY_TYPE) HDassert(entry->size == entry_sizes[type]); @@ -1124,18 +1122,15 @@ notify_image_len(const void *thing, size_t *image_length) *------------------------------------------------------------------------- */ herr_t -pre_serialize(H5F_t *f, +pre_serialize(H5F_t H5_ATTR_SANITY_CHECK *f, void *thing, - haddr_t addr, - size_t len, + haddr_t H5_ATTR_SANITY_CHECK addr, + size_t H5_ATTR_SANITY_CHECK len, haddr_t *new_addr_ptr, size_t *new_len_ptr, unsigned *flags_ptr) { test_entry_t *entry; - test_entry_t *base_addr; - int32_t type; - int32_t idx; int32_t i; HDassert(f); @@ -1155,16 +1150,9 @@ pre_serialize(H5F_t *f, /* shouldn't serialize the entry unless it is dirty */ HDassert(entry->is_dirty); - - type = entry->type; - idx = entry->index; - - HDassert((type >= 0) && (type < NUMBER_OF_ENTRY_TYPES)); - HDassert((idx >= 0) && (idx <= max_indices[type])); - - base_addr = entries[type]; - - HDassert(entry == &(base_addr[idx])); + HDassert((entry->type >= 0) && (entry->type < NUMBER_OF_ENTRY_TYPES)); + HDassert((entry->index >= 0) && (entry->index <= max_indices[entry->type])); + HDassert(entry == &(entries[entry->type][entry->index])); HDassert(entry->num_flush_ops >= 0); HDassert(entry->num_flush_ops < MAX_FLUSH_OPS); @@ -1376,9 +1364,7 @@ herr_t serialize(const H5F_t H5_ATTR_UNUSED *f, void *image_ptr, size_t len, void *thing) { test_entry_t *entry; - test_entry_t *base_addr; int32_t type; - int32_t idx; HDassert(image_ptr); HDassert(thing); @@ -1392,14 +1378,11 @@ serialize(const H5F_t H5_ATTR_UNUSED *f, void *image_ptr, size_t len, void *thin HDassert(entry->is_dirty); type = entry->type; - idx = entry->index; HDassert((type >= 0) && (type < NUMBER_OF_ENTRY_TYPES)); - HDassert((idx >= 0) && (idx <= max_indices[type])); + HDassert((entry->index >= 0) && (entry->index <= max_indices[type])); - base_addr = entries[type]; - - HDassert(entry == &(base_addr[idx])); + HDassert(entry == &(entries[type][entry->index])); HDassert(entry->num_flush_ops >= 0); HDassert(entry->num_flush_ops < MAX_FLUSH_OPS); @@ -1530,21 +1513,19 @@ notify_serialize(const H5F_t H5_ATTR_UNUSED *f, void *image_ptr, size_t len, *------------------------------------------------------------------------- */ static herr_t -notify(H5C_notify_action_t action, void *thing, int32_t entry_type) +notify(H5C_notify_action_t action, void *thing, int32_t H5_ATTR_SANITY_CHECK entry_type) { test_entry_t *entry; - test_entry_t *base_addr; HDassert(thing); entry = (test_entry_t *)thing; - base_addr = entries[entry->type]; HDassert(entry->index >= 0); HDassert(entry->index <= max_indices[entry->type]); HDassert((entry->type >= 0) && (entry->type < NUMBER_OF_ENTRY_TYPES)); HDassert(entry->type == entry_type); - HDassert(entry == &(base_addr[entry->index])); + HDassert(entry == &(entries[entry->type][entry->index])); HDassert(entry == entry->self); if(!(action == H5C_NOTIFY_ACTION_ENTRY_DIRTIED && entry->action == TEST_ENTRY_ACTION_MOVE)) HDassert(entry->header.addr == entry->addr); @@ -1609,18 +1590,14 @@ notify_notify(H5C_notify_action_t action, void *thing) *------------------------------------------------------------------------- */ herr_t -free_icr(test_entry_t *entry, int32_t entry_type) +free_icr(test_entry_t *entry, int32_t H5_ATTR_SANITY_CHECK entry_type) { - test_entry_t *base_addr; - HDassert(entry); - base_addr = entries[entry->type]; - HDassert(entry->type == entry_type); HDassert(entry->index >= 0); HDassert(entry->index <= max_indices[entry->type]); - HDassert(entry == &(base_addr[entry->index])); + HDassert(entry == &(entries[entry->type][entry->index])); HDassert(entry == entry->self); HDassert(entry->cache_ptr != NULL); HDassert(entry->cache_ptr->magic == H5C__H5C_T_MAGIC); diff --git a/test/cache_image.c b/test/cache_image.c index f226de9..59689a9 100644 --- a/test/cache_image.c +++ b/test/cache_image.c @@ -7825,7 +7825,7 @@ get_free_sections_test(hbool_t single_file_vfd) *------------------------------------------------------------------------- */ static unsigned -evict_on_close_test() +evict_on_close_test(hbool_t single_file_vfd) { #ifndef H5_HAVE_PARALLEL const char * fcn_name = "evict_on_close_test()"; diff --git a/test/cache_tagging.c b/test/cache_tagging.c index 7ce4e88..8354e09 100644 --- a/test/cache_tagging.c +++ b/test/cache_tagging.c @@ -439,7 +439,9 @@ check_file_creation_tags(hid_t fcpl_id, int type) { /* Variable Declarations */ hid_t fid = -1; /* File Identifier */ +#ifndef NDEBUG int verbose = FALSE; /* verbose test outout */ +#endif hid_t fapl = -1; /* File access prop list */ haddr_t root_tag = 0; haddr_t sbe_tag = 0; @@ -526,7 +528,9 @@ check_file_open_tags(hid_t fcpl, int type) { /* Variable Declarations */ hid_t fid = -1; /* File Identifier */ +#ifndef NDEBUG int verbose = FALSE; /* verbose file outout */ +#endif hid_t fapl = -1; /* File access prop list */ haddr_t root_tag; /* Root Group Tag */ haddr_t sbe_tag; /* Sblock Extension Tag */ @@ -639,7 +643,9 @@ check_group_creation_tags(void) /* Variable Declarations */ hid_t fid = -1; /* File Identifier */ hid_t gid = -1; /* Group Identifier */ +#ifndef NDEBUG int verbose = FALSE; /* verbose file outout */ +#endif hid_t fapl = -1; /* File access prop list */ haddr_t root_tag = HADDR_UNDEF; /* Root Group Tag */ haddr_t g_tag; /* Group Tag */ @@ -740,7 +746,9 @@ check_multi_group_creation_tags(void) /* Variable Declarations */ hid_t fid = -1; /* File Identifier */ hid_t gid = -1; /* Group Identifier */ +#ifndef NDEBUG int verbose = FALSE; /* verbose file outout */ +#endif char gname[16]; /* group name buffer */ int i = 0; /* iterator */ hid_t fapl = -1; /* File access prop list */ @@ -869,7 +877,9 @@ check_link_iteration_tags(void) hid_t fid = -1; /* File Identifier */ hid_t sid = -1; /* Group Identifier */ hid_t did = -1; /* Group Identifier */ +#ifndef NDEBUG int verbose = FALSE; /* verbose file outout */ +#endif int i = 0; /* iterator */ haddr_t root_tag = 0; /* Root Group Tag Value */ char dsetname[500]; /* Name of dataset */ @@ -989,7 +999,9 @@ check_dense_attribute_tags(void) hid_t sid = -1; /* Group Identifier */ hid_t did = -1; /* Group Identifier */ hid_t dcpl = -1; /* Group Identifier */ +#ifndef NDEBUG int verbose = FALSE; /* verbose file outout */ +#endif int i = 0; /* iterator */ hid_t fapl = -1; /* File access property list */ haddr_t d_tag = 0; /* Dataset tag value */ @@ -1171,7 +1183,9 @@ check_group_open_tags(void) /* Variable Declarations */ hid_t fid = -1; /* File Identifier */ hid_t gid = -1; /* Group Identifier */ +#ifndef NDEBUG int verbose = FALSE; /* verbose file output */ +#endif hid_t fapl = -1; /* File access prop list */ haddr_t root_tag = HADDR_UNDEF; haddr_t g_tag; @@ -1280,7 +1294,9 @@ check_attribute_creation_tags(hid_t fcpl, int type) hid_t aid = -1; /* Attribute Identifier */ hid_t gid = -1; /* Group Identifier */ hid_t sid = -1; /* Dataspace Identifier */ +#ifndef NDEBUG int verbose = FALSE; /* verbose file outout */ +#endif hid_t fapl = -1; /* File access prop list */ haddr_t root_tag = 0; /* Root group tag */ haddr_t g_tag = 0; @@ -1414,7 +1430,9 @@ check_attribute_open_tags(hid_t fcpl, int type) hid_t aid = -1; /* Attribute Identifier */ hid_t gid = -1; /* Group Identifier */ hid_t sid = -1; /* Dataspace Identifier */ +#ifndef NDEBUG int verbose = FALSE; /* verbose file outout */ +#endif hid_t fapl = -1; /* File access prop list */ haddr_t root_tag = 0; haddr_t g_tag = 0; @@ -1551,7 +1569,9 @@ check_attribute_rename_tags(hid_t fcpl, int type) hid_t gid = -1; /* Group Identifier */ hid_t aid = -1; /* Attribute Identifier */ hid_t sid = -1; /* Dataset Identifier */ +#ifndef NDEBUG int verbose = FALSE; /* verbose file outout */ +#endif int *data = NULL; /* data buffer */ int i,j,k = 0; /* iterators */ hid_t fapl = -1; /* File access prop list */ @@ -1726,7 +1746,9 @@ check_attribute_delete_tags(hid_t fcpl, int type) hid_t gid = -1; /* Group Identifier */ hid_t aid = -1; /* Attribute Identifier */ hid_t sid = -1; /* Dataset Identifier */ +#ifndef NDEBUG int verbose = FALSE; /* verbose file outout */ +#endif int *data = NULL; /* data buffer */ int i,j,k = 0; /* iterators */ hid_t fapl = -1; /* File access prop list */ @@ -1892,7 +1914,9 @@ check_dataset_creation_tags(hid_t fcpl, int type) hid_t fid = -1; /* File Identifier */ hid_t did = -1; /* Dataset Identifier */ hid_t sid = -1; /* Dataspace Identifier */ +#ifndef NDEBUG int verbose = FALSE; /* verbose file outout */ +#endif hid_t dcpl = -1; /* dataset creation pl */ hsize_t cdims[2] = {1,1}; /* chunk dimensions */ int fillval = 0; @@ -2025,7 +2049,9 @@ check_dataset_creation_earlyalloc_tags(hid_t fcpl, int type) hid_t fid = -1; /* File Identifier */ hid_t did = -1; /* Dataset Identifier */ hid_t sid = -1; /* Dataspace Identifier */ +#ifndef NDEBUG int verbose = FALSE; /* verbose file outout */ +#endif hid_t dcpl = -1; /* dataset creation pl */ hsize_t cdims[2] = {1,1}; /* chunk dimensions */ int fillval = 0; @@ -2162,7 +2188,9 @@ check_dataset_open_tags(void) hid_t fid = -1; /* File Identifier */ hid_t did = -1; /* Dataset Identifier */ hid_t sid = -1; /* Dataspace Identifier */ +#ifndef NDEBUG int verbose = FALSE; /* verbose file outout */ +#endif hid_t dcpl = -1; /* dataset creation pl */ hsize_t cdims[2] = {1,1}; /* chunk dimensions */ int fillval = 0; @@ -2288,7 +2316,9 @@ check_dataset_write_tags(void) hid_t fid = -1; /* File Identifier */ hid_t did = -1; /* Dataset Identifier */ hid_t sid = -1; /* Dataspace Identifier */ +#ifndef NDEBUG int verbose = FALSE; /* verbose file outout */ +#endif hid_t dcpl = -1; /* dataset creation pl */ hsize_t cdims[2] = {1,1}; /* chunk dimensions */ int fillval = 0; @@ -2430,7 +2460,9 @@ check_attribute_write_tags(hid_t fcpl, int type) hid_t gid = -1; /* Group Identifier */ hid_t aid = -1; /* Attribute Identifier */ hid_t sid = -1; /* Dataset Identifier */ +#ifndef NDEBUG int verbose = FALSE; /* verbose file outout */ +#endif int *data = NULL; /* data buffer */ int i,j,k = 0; /* iterators */ hid_t fapl = -1; /* File access prop list */ @@ -2583,7 +2615,9 @@ check_dataset_read_tags(void) hid_t fid = -1; /* File Identifier */ hid_t did = -1; /* Dataset Identifier */ hid_t sid = -1; /* Dataspace Identifier */ +#ifndef NDEBUG int verbose = FALSE; /* verbose file outout */ +#endif hid_t dcpl = -1; /* dataset creation pl */ hsize_t cdims[2] = {1,1}; /* chunk dimensions */ int fillval = 0; @@ -2720,7 +2754,9 @@ check_dataset_size_retrieval(void) hid_t fid = -1; /* File Identifier */ hid_t did = -1; /* Dataset Identifier */ hid_t sid = -1; /* Dataspace Identifier */ +#ifndef NDEBUG int verbose = FALSE; /* verbose file outout */ +#endif hid_t dcpl = -1; /* dataset creation pl */ hsize_t cdims[2] = {1,1}; /* chunk dimensions */ int fillval = 0; @@ -2859,7 +2895,9 @@ check_dataset_extend_tags(void) hid_t fid = -1; /* File Identifier */ hid_t did = -1; /* Dataset Identifier */ hid_t sid = -1; /* Dataspace Identifier */ +#ifndef NDEBUG int verbose = FALSE; /* verbose file outout */ +#endif hid_t dcpl = -1; /* dataset creation pl */ hsize_t cdims[2] = {1,1}; /* chunk dimensions */ int fillval = 0; @@ -2996,7 +3034,9 @@ check_object_info_tags(void) /* Variable Declarations */ hid_t fid = -1; /* File Identifier */ hid_t gid = -1; /* Group Identifier */ +#ifndef NDEBUG int verbose = FALSE; /* verbose file output */ +#endif hid_t fapl = -1; /* File access prop list */ haddr_t root_tag = HADDR_UNDEF; haddr_t g_tag; @@ -3105,7 +3145,9 @@ check_object_copy_tags(void) /* Variable Declarations */ hid_t fid = -1; /* File Identifier */ hid_t gid = -1; /* Group Identifier */ +#ifndef NDEBUG int verbose = FALSE; /* verbose file output */ +#endif hid_t fapl = -1; /* File access prop list */ haddr_t root_tag = HADDR_UNDEF; haddr_t g_tag; @@ -3226,7 +3268,9 @@ check_link_removal_tags(hid_t fcpl, int type) hid_t did = -1; /* Dataset Identifier */ hid_t sid = -1; /* Dataspace Identifier */ hid_t gid = -1; /* Dataspace Identifier */ +#ifndef NDEBUG int verbose = FALSE; /* verbose file outout */ +#endif hid_t dcpl = -1; /* dataset creation pl */ hsize_t cdims[2] = {1,1}; /* chunk dimensions */ int fillval = 0; @@ -3385,7 +3429,9 @@ check_link_getname_tags(void) hid_t did = -1; /* Dataset Identifier */ hid_t sid = -1; /* Dataspace Identifier */ hid_t gid = -1; /* Dataspace Identifier */ +#ifndef NDEBUG int verbose = FALSE; /* verbose file outout */ +#endif hid_t dcpl = -1; /* dataset creation pl */ hsize_t cdims[2] = {1,1}; /* chunk dimensions */ int fillval = 0; @@ -3534,7 +3580,9 @@ check_external_link_creation_tags(void) hid_t fid = -1; /* File Identifier */ hid_t fid2 = -1; /* File Identifier */ hid_t gid = -1; /* Dataspace Identifier */ +#ifndef NDEBUG int verbose = FALSE; /* verbose file outout */ +#endif hid_t fapl = -1; /* File access prop list */ haddr_t root_tag = 0; @@ -3640,7 +3688,9 @@ check_external_link_open_tags(void) hid_t fid2 = -1; /* File Identifier */ hid_t gid = -1; /* Dataspace Identifier */ hid_t xid = -1; /* Dataspace Identifier */ +#ifndef NDEBUG int verbose = FALSE; /* verbose file outout */ +#endif hid_t fapl = -1; /* File access prop list */ haddr_t root_tag = 0; haddr_t root2_tag = 0; @@ -3836,8 +3886,8 @@ check_invalid_tag_application(void) return 0; -error: #if H5C_DO_TAGGING_SANITY_CHECKS +error: if(api_ctx_pushed) H5CX_pop(); #endif /* H5C_DO_TAGGING_SANITY_CHECKS */ diff --git a/test/dsets.c b/test/dsets.c index d017ff3..2ed2970 100644 --- a/test/dsets.c +++ b/test/dsets.c @@ -7546,10 +7546,10 @@ static herr_t test_deprec(hid_t file) { hid_t dataset, space, small_space, create_parms, dcpl; - hsize_t dims[2], small_dims[2]; - hsize_t deprec_size; - herr_t status; - hsize_t csize[2]; + hsize_t dims[2], small_dims[2]; + hsize_t deprec_size; + herr_t H5_ATTR_SANITY_CHECK status; + hsize_t csize[2]; TESTING("deprecated API routines"); diff --git a/test/dtypes.c b/test/dtypes.c index 791e8e8..0175607 100644 --- a/test/dtypes.c +++ b/test/dtypes.c @@ -6732,7 +6732,7 @@ static void create_del_obj_named_test_file(const char *filename, hid_t fapl, hid_t my_fapl; /* Copy of file access property list ID */ hid_t dcpl; /* Dataset creation property list ID */ unsigned use_at_least_v18;/* Whether to use old or new format */ - herr_t status; /* Generic return value */ + herr_t H5_ATTR_SANITY_CHECK status; /* Generic return value */ /* Make copy of FAPL */ my_fapl = H5Pcopy(fapl); diff --git a/test/mf.c b/test/mf.c index 3c33163..031e625 100644 --- a/test/mf.c +++ b/test/mf.c @@ -38,6 +38,7 @@ #include "H5Iprivate.h" #include "H5VLprivate.h" /* Virtual Object Layer */ #include "H5VMprivate.h" +#include "H5private.h" #define FILENAME_LEN 1024 @@ -7528,7 +7529,8 @@ error: *------------------------------------------------------------------------- */ static int -set_multi_split(hid_t fapl, hsize_t pagesize, hbool_t multi, hbool_t split) +set_multi_split(hid_t fapl, hsize_t pagesize, hbool_t H5_ATTR_SANITY_CHECK multi, + hbool_t split) { H5FD_mem_t memb_map[H5FD_MEM_NTYPES]; hid_t memb_fapl_arr[H5FD_MEM_NTYPES]; diff --git a/test/page_buffer.c b/test/page_buffer.c index 1172ae7..4789bc4 100644 --- a/test/page_buffer.c +++ b/test/page_buffer.c @@ -39,6 +39,12 @@ #define FILENAME_LEN 1024 +#ifndef H5_HAVE_PARALLEL +#define NUM_DSETS 5 +#define NX 100 +#define NY 50 +#endif + /* helper routines */ #ifndef H5_HAVE_PARALLEL static unsigned create_file(char *filename, hid_t fcpl, hid_t fapl); diff --git a/test/tfile.c b/test/tfile.c index 7da8b85..a900a8b 100644 --- a/test/tfile.c +++ b/test/tfile.c @@ -25,6 +25,7 @@ #include "H5Iprivate.h" #include "H5Pprivate.h" #include "H5VLprivate.h" /* Virtual Object Layer */ +#include "H5private.h" /* * This file needs to access private information from the H5F package. @@ -4208,7 +4209,8 @@ test_filespace_info(const char *env_h5_drvr) ** *****************************************************************/ static int -set_multi_split(hid_t fapl, hsize_t pagesize, hbool_t multi, hbool_t split) +set_multi_split(hid_t fapl, hsize_t pagesize, hbool_t H5_ATTR_SANITY_CHECK multi, + hbool_t split) { H5FD_mem_t memb_map[H5FD_MEM_NTYPES]; hid_t memb_fapl_arr[H5FD_MEM_NTYPES]; diff --git a/test/tmisc.c b/test/tmisc.c index b1a3ef1..93bdf29 100644 --- a/test/tmisc.c +++ b/test/tmisc.c @@ -130,10 +130,18 @@ typedef struct #define MISC8_DSETNAME1 "Dataset1" #define MISC8_DSETNAME4 "Dataset4" #define MISC8_DSETNAME5 "Dataset5" +#define MISC8_DSETNAME8 "Dataset8" + #ifndef H5_HAVE_PARALLEL +#define MISC8_DSETNAME2 "Dataset2" +#define MISC8_DSETNAME3 "Dataset3" +#define MISC8_DSETNAME4 "Dataset4" +#define MISC8_DSETNAME6 "Dataset6" #define MISC8_DSETNAME7 "Dataset7" +#define MISC8_DSETNAME9 "Dataset9" +#define MISC8_DSETNAME10 "Dataset10" #endif -#define MISC8_DSETNAME8 "Dataset8" + #define MISC8_RANK 2 #define MISC8_DIM0 50 #define MISC8_DIM1 50 diff --git a/test/tselect.c b/test/tselect.c index 27bc36b..348d30a 100644 --- a/test/tselect.c +++ b/test/tselect.c @@ -27,6 +27,7 @@ #include "testhdf5.h" #include "hdf5.h" #include "H5Spkg.h" /* Dataspaces */ +#include "H5private.h" #define FILENAME "tselect.h5" @@ -1613,7 +1614,7 @@ test_select_hyper_contig3(hid_t dset_type, hid_t xfer_plist) ****************************************************************/ static void verify_select_hyper_contig_dr__run_test(const uint16_t *cube_buf, - size_t cube_size, unsigned edge_size, unsigned cube_rank) + size_t H5_ATTR_SANITY_CHECK cube_size, unsigned edge_size, unsigned cube_rank) { const uint16_t *cube_ptr; /* Pointer into the cube buffer */ uint16_t expected_value; /* Expected value in dataset */ diff --git a/test/vds_swmr.h b/test/vds_swmr.h index eb2dcf4..43c78a4 100644 --- a/test/vds_swmr.h +++ b/test/vds_swmr.h @@ -84,7 +84,7 @@ #define N_PLANES_TO_WRITE 25 /* Planes */ -static hsize_t PLANES[N_SOURCES][RANK] = { +H5TEST_DLLVAR hsize_t PLANES[N_SOURCES][RANK] = { {1, SM_HEIGHT, WIDTH}, {1, LG_HEIGHT, WIDTH}, {1, SM_HEIGHT, WIDTH}, @@ -94,7 +94,7 @@ static hsize_t PLANES[N_SOURCES][RANK] = { }; /* File names for source datasets */ -static char FILE_NAMES[N_SOURCES][NAME_LEN] = { +H5TEST_DLLVAR char FILE_NAMES[N_SOURCES][NAME_LEN] = { {"vds_swmr_src_a.h5"}, {"vds_swmr_src_b.h5"}, {"vds_swmr_src_c.h5"}, @@ -104,11 +104,11 @@ static char FILE_NAMES[N_SOURCES][NAME_LEN] = { }; /* VDS file name */ -static char VDS_FILE_NAME[NAME_LEN] = "vds_swmr.h5"; +H5TEST_DLLVAR char VDS_FILE_NAME[NAME_LEN] = "vds_swmr.h5"; /* Dataset names */ -static char SOURCE_DSET_PATH[NAME_LEN] = "/source_dset"; -static char VDS_DSET_NAME[NAME_LEN] = "vds_dset"; +H5TEST_DLLVAR char SOURCE_DSET_PATH[NAME_LEN] = "/source_dset"; +H5TEST_DLLVAR char VDS_DSET_NAME[NAME_LEN] = "vds_dset"; /* Fill values */ #endif /* VDS_SWMR_H */ diff --git a/testpar/t_cache.c b/testpar/t_cache.c index eddc3d0..6b94e10 100644 --- a/testpar/t_cache.c +++ b/testpar/t_cache.c @@ -28,7 +28,7 @@ #include "H5Fpkg.h" #include "H5Iprivate.h" #include "H5MFprivate.h" - +#include "H5private.h" #define BASE_ADDR (haddr_t)1024 @@ -2379,7 +2379,7 @@ datum_get_initial_load_size(void *udata_ptr, size_t *image_len_ptr) *------------------------------------------------------------------------- */ static void * -datum_deserialize(const void * image_ptr, +datum_deserialize(const void H5_ATTR_SANITY_CHECK *image_ptr, H5_ATTR_UNUSED size_t len, void * udata_ptr, hbool_t * dirty_ptr) @@ -2492,14 +2492,13 @@ datum_image_len(const void *thing, size_t *image_len) */ static herr_t datum_serialize(const H5F_t *f, - void *image_ptr, + void H5_ATTR_SANITY_CHECK *image_ptr, size_t len, void *thing_ptr) { herr_t ret_value = SUCCEED; int idx; struct datum * entry_ptr; - H5C_t * cache_ptr; struct H5AC_aux_t * aux_ptr; HDassert( thing_ptr ); @@ -2510,11 +2509,8 @@ datum_serialize(const H5F_t *f, HDassert( f ); HDassert( f->shared ); HDassert( f->shared->cache ); - - cache_ptr = f->shared->cache; - - HDassert( cache_ptr->magic == H5C__H5C_T_MAGIC ); - HDassert( cache_ptr->aux_ptr ); + HDassert( f->shared->cache->magic == H5C__H5C_T_MAGIC ); + HDassert( f->shared->cache->aux_ptr ); aux_ptr = (H5AC_aux_t *)(f->shared->cache->aux_ptr); diff --git a/testpar/t_filter_read.c b/testpar/t_filter_read.c index 15aec2d..cabb51e 100644 --- a/testpar/t_filter_read.c +++ b/testpar/t_filter_read.c @@ -215,6 +215,9 @@ test_filter_read(void) unsigned disable_partial_chunk_filters; /* Whether filters are disabled on partial chunks */ herr_t hrc; const char *filename; +#ifdef H5_HAVE_FILTER_FLETCHER32 + hsize_t fletcher32_size; /* Size of dataset with Fletcher32 checksum */ +#endif #ifdef H5_HAVE_FILTER_DEFLATE hsize_t deflate_size; /* Size of dataset with deflate filter */ diff --git a/testpar/t_mdset.c b/testpar/t_mdset.c index 63ac8d3..4e8a519 100644 --- a/testpar/t_mdset.c +++ b/testpar/t_mdset.c @@ -13,6 +13,7 @@ #include "testphdf5.h" #include "H5Dprivate.h" +#include "H5private.h" #define DIM 2 #define SIZE 32 @@ -1959,7 +1960,7 @@ void rr_obj_hdr_flush_confusion_writer(MPI_Comm comm) /* private communicator size and rank */ int mpi_size; int mpi_rank; - int mrc; /* mpi error code */ + int H5_ATTR_SANITY_CHECK mrc; /* mpi error code */ /* steps to verify and have been verified */ int steps = 0; int steps_done = 0; diff --git a/testpar/t_span_tree.c b/testpar/t_span_tree.c index da6d343..c3cc7b5 100644 --- a/testpar/t_span_tree.c +++ b/testpar/t_span_tree.c @@ -37,7 +37,7 @@ static void coll_write_test(int chunk_factor); -static void coll_read_test(int chunk_factor); +static void coll_read_test(void); /*------------------------------------------------------------------------- @@ -84,7 +84,7 @@ void coll_irregular_cont_read(void) { - coll_read_test(0); + coll_read_test(); } @@ -133,7 +133,7 @@ void coll_irregular_simple_chunk_read(void) { - coll_read_test(1); + coll_read_test(); } @@ -181,7 +181,7 @@ void coll_irregular_complex_chunk_read(void) { - coll_read_test(4); + coll_read_test(); } @@ -662,7 +662,7 @@ void coll_write_test(int chunk_factor) *------------------------------------------------------------------------- */ static void -coll_read_test(int H5_ATTR_UNUSED chunk_factor) +coll_read_test(void) { const char *filename; diff --git a/tools/lib/h5tools_dump.c b/tools/lib/h5tools_dump.c index ebe5c4a..a27e980 100644 --- a/tools/lib/h5tools_dump.c +++ b/tools/lib/h5tools_dump.c @@ -3119,7 +3119,7 @@ h5tools_dump_dcpl(FILE *stream, const h5tool_format_t *info, if (vmaps) { size_t next; - ssize_t ssize_out; + ssize_t H5_ATTR_SANITY_CHECK ssize_out; ctx->indent_level++; for (next = 0; next < (unsigned) vmaps; next++) { diff --git a/tools/lib/h5tools_utils.c b/tools/lib/h5tools_utils.c index da19e6a..47ce690 100644 --- a/tools/lib/h5tools_utils.c +++ b/tools/lib/h5tools_utils.c @@ -1277,9 +1277,9 @@ done: *----------------------------------------------------------------------------- */ int -h5tools_set_configured_fapl(hid_t fapl_id, - const char vfd_name[], - void H5_ATTR_UNUSED *fapl_t_ptr) +h5tools_set_configured_fapl(hid_t fapl_id, + const char vfd_name[], + void *fapl_t_ptr) { int ret_value = 1; diff --git a/tools/src/h5diff/ph5diff_main.c b/tools/src/h5diff/ph5diff_main.c index 87221fd..380ab3b 100644 --- a/tools/src/h5diff/ph5diff_main.c +++ b/tools/src/h5diff/ph5diff_main.c @@ -304,7 +304,7 @@ void print_manager_output(void) * *------------------------------------------------------------------------- */ -void h5diff_exit(int H5_ATTR_UNUSED status) +void h5diff_exit(int status) { /* if in parallel mode, dismiss workers, close down MPI, then exit */ if(g_Parallel) { diff --git a/tools/test/h5diff/h5diffgentest.c b/tools/test/h5diff/h5diffgentest.c index c711013..95f98fd 100644 --- a/tools/test/h5diff/h5diffgentest.c +++ b/tools/test/h5diff/h5diffgentest.c @@ -4227,7 +4227,7 @@ static void test_comps_array(const char *fname, const char *dset, const char *at hsize_t sdims_dset[] = { SDIM_DSET }; hsize_t sdims_cmpd_arry[] = { SDIM_CMPD_ARRAY }; int i, j; - herr_t ret; /* Generic return value */ + herr_t H5_ATTR_SANITY_CHECK ret; /* Generic return value */ /* Initialize array data to write */ for (i = 0; i < SDIM_DSET; i++) { @@ -4336,7 +4336,7 @@ static void test_comps_vlen(const char * fname, const char *dset, const char *at hsize_t sdims_dset[] = { SDIM_DSET }; unsigned i, j; /* counting variables */ - herr_t ret; /* Generic return value */ + herr_t H5_ATTR_SANITY_CHECK ret; /* Generic return value */ /* Allocate and initialize VL data to write */ for (i = 0; i < SDIM_DSET; i++) { @@ -4454,7 +4454,7 @@ static void test_comps_array_vlen(const char * fname, const char *dset, const ch hsize_t sdims_dset[] = { SDIM_DSET }; hsize_t sdims_arry[] = { SDIM_CMPD_ARRAY }; unsigned i, j, k; /* counting variables */ - herr_t ret; /* Generic return value */ + herr_t H5_ATTR_SANITY_CHECK ret; /* Generic return value */ /* Initialize array data to write in compound1 */ for (i = 0; i < SDIM_DSET; i++) { @@ -4597,7 +4597,7 @@ static void test_comps_vlen_arry(const char * fname, const char *dset, const cha hsize_t sdims_cmpd_arry[] = { SDIM_CMPD_ARRAY }; unsigned i, j, k; /* counting variables */ - herr_t ret; /* Generic return value */ + herr_t H5_ATTR_SANITY_CHECK ret; /* Generic return value */ /* Allocate and initialize VL data to write */ for (i = 0; i < SDIM_DSET; i++) { @@ -5214,7 +5214,7 @@ void write_attr_strings(hid_t loc_id, const char* dset_name, hid_t fid, int make hid_t aid = -1; hid_t sid = -1; hid_t tid = -1; - herr_t status; + herr_t H5_ATTR_SANITY_CHECK status; int val, i, j, k, l, n; float f; @@ -6205,7 +6205,7 @@ void write_attr_in(hid_t loc_id, const char* dset_name, hid_t fid, int make_diff hid_t aid = -1; hid_t sid = -1; hid_t tid = -1; - herr_t status; + herr_t H5_ATTR_SANITY_CHECK status; int val, i, j, k, l, n; float f; @@ -7197,7 +7197,7 @@ void write_dset_in(hid_t loc_id, const char* dset_name, hid_t fid, int make_diff hid_t sid = -1; hid_t tid = -1; hid_t dcpl = -1; - herr_t status; + herr_t H5_ATTR_SANITY_CHECK status; int val, i, j, k, l, n; float f; int fillvalue = 2; @@ -7832,7 +7832,7 @@ void gen_datareg(hid_t fid, int make_diffs /* flag to modify data buffers */) hsize_t start[10]; /* starting location of hyperslab */ hsize_t count[10]; /* element count of hyperslab */ hsize_t coord[5][2]; /* coordinates for point selection */ - herr_t status; + herr_t H5_ATTR_SANITY_CHECK status; int i; /* allocate the buffer for write the references */ diff --git a/tools/test/h5dump/h5dumpgentest.c b/tools/test/h5dump/h5dumpgentest.c index 4ceed73..5d4c21b 100644 --- a/tools/test/h5dump/h5dumpgentest.c +++ b/tools/test/h5dump/h5dumpgentest.c @@ -1554,7 +1554,7 @@ gent_many(void) dset1_t dset1[6]; hsize_t dim[4]; - herr_t ret; + herr_t H5_ATTR_SANITY_CHECK ret; fid = H5Fcreate(FILE12, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); @@ -2603,7 +2603,7 @@ static void gent_vldatatypes(void) hid_t file, dset, space, type; hsize_t dims[] = { SPACE1_DIM1 }; int i; - herr_t ret=0; + herr_t H5_ATTR_SANITY_CHECK ret=0; file = H5Fcreate(FILE21, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); @@ -2698,7 +2698,7 @@ gent_vldatatypes2(void) hid_t tid1, tid2; /* Datatype IDs */ hsize_t dims1[] = {SPACE1_DIM1}; unsigned i,j,k; /* counting variables */ - herr_t ret; /* Generic return value */ + herr_t H5_ATTR_SANITY_CHECK ret; /* Generic return value */ /* Allocate and initialize VL data to write */ for(i = 0; i < SPACE1_DIM1; i++) { @@ -2771,7 +2771,7 @@ static void gent_vldatatypes3(void) hid_t tid1, tid2; /* Datatype IDs */ hsize_t dims1[] = {SPACE1_DIM1}; unsigned i,j; /* counting variables */ - herr_t ret; /* Generic return value */ + herr_t H5_ATTR_SANITY_CHECK ret; /* Generic return value */ /* Allocate and initialize VL data to write */ for(i=0; i= 0); @@ -169,7 +169,7 @@ main (void) unsigned char *the_data = NULL; hid_t file, dset, file_space = -1; - herr_t status; + herr_t H5_ATTR_SANITY_CHECK status; #ifdef H5_HAVE_GETRUSAGE struct rusage r_start, r_stop; #else @@ -178,8 +178,8 @@ main (void) struct timeval t_start, t_stop; int fd; unsigned u; - hssize_t n; - off_t offset; + hssize_t H5_ATTR_SANITY_CHECK n; + off_t H5_ATTR_SANITY_CHECK offset; hsize_t start[2]; hsize_t count[2]; @@ -198,15 +198,15 @@ main (void) /* Open the files */ file = H5Fcreate (HDF5_FILE_NAME, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); - assert (file>=0); + HDassert (file>=0); fd = HDopen (RAW_FILE_NAME, O_RDWR|O_CREAT|O_TRUNC, 0666); - assert (fd>=0); + HDassert (fd>=0); /* Create the dataset */ file_space = H5Screate_simple (2, size, size); - assert(file_space >= 0); + HDassert(file_space >= 0); dset = H5Dcreate2(file, "dset", H5T_NATIVE_UCHAR, file_space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); - assert(dset >= 0); + HDassert(dset >= 0); the_data = (unsigned char *)malloc((size_t)(size[0] * size[1])); /* initial fill for lazy malloc */ @@ -268,7 +268,7 @@ main (void) HDfflush(stderr); status = H5Dread (dset, H5T_NATIVE_UCHAR, file_space, file_space, H5P_DEFAULT, the_data); - assert (status>=0); + HDassert (status>=0); } #ifdef H5_HAVE_GETRUSAGE HDgetrusage(RUSAGE_SELF, &r_stop); @@ -306,9 +306,9 @@ main (void) putc (PROGRESS, stderr); HDfflush(stderr); offset = HDlseek (fd, (off_t)0, SEEK_SET); - assert (0==offset); + HDassert (0==offset); n = HDwrite (fd, the_data, (size_t)(size[0]*size[1])); - assert (n>=0 && (size_t)n==size[0]*size[1]); + HDassert (n>=0 && (size_t)n==size[0]*size[1]); } #ifdef H5_HAVE_GETRUSAGE HDgetrusage(RUSAGE_SELF, &r_stop); @@ -347,7 +347,7 @@ main (void) HDfflush(stderr); status = H5Dwrite (dset, H5T_NATIVE_UCHAR, H5S_ALL, H5S_ALL, H5P_DEFAULT, the_data); - assert (status>=0); + HDassert (status>=0); } #ifdef H5_HAVE_GETRUSAGE HDgetrusage(RUSAGE_SELF, &r_stop); @@ -385,9 +385,9 @@ main (void) putc (PROGRESS, stderr); HDfflush(stderr); offset = HDlseek (fd, (off_t)0, SEEK_SET); - assert (0==offset); + HDassert (0==offset); n = HDread (fd, the_data, (size_t)(size[0]*size[1])); - assert (n>=0 && (size_t)n==size[0]*size[1]); + HDassert (n>=0 && (size_t)n==size[0]*size[1]); } #ifdef H5_HAVE_GETRUSAGE HDgetrusage(RUSAGE_SELF, &r_stop); @@ -427,7 +427,7 @@ main (void) HDfflush(stderr); status = H5Dread (dset, H5T_NATIVE_UCHAR, file_space, file_space, H5P_DEFAULT, the_data); - assert (status>=0); + HDassert (status>=0); } #ifdef H5_HAVE_GETRUSAGE HDgetrusage(RUSAGE_SELF, &r_stop); @@ -449,11 +449,11 @@ main (void) (size_t)(nread*size[0]*size[1])); /* Read hyperslab */ - assert (size[0]>20 && size[1]>20); + HDassert (size[0]>20 && size[1]>20); start[0] = start[1] = 10; count[0] = count[1] = size[0]-20; status = H5Sselect_hyperslab (file_space, H5S_SELECT_SET, start, NULL, count, NULL); - assert (status>=0); + HDassert (status>=0); synchronize (); #ifdef H5_HAVE_GETRUSAGE HDgetrusage(RUSAGE_SELF, &r_start); @@ -471,7 +471,7 @@ main (void) HDfflush(stderr); status = H5Dread (dset, H5T_NATIVE_UCHAR, file_space, file_space, H5P_DEFAULT, the_data); - assert (status>=0); + HDassert (status>=0); } #ifdef H5_HAVE_GETRUSAGE HDgetrusage(RUSAGE_SELF, &r_stop); -- cgit v0.12 From 03c5bcbea7f8a12c91a67f11d0293e225000577e Mon Sep 17 00:00:00 2001 From: kmu Date: Mon, 13 Jan 2020 13:29:05 -0600 Subject: pick up missing piece --- src/H5B2leaf.c | 3 ++- src/H5I.c | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/H5B2leaf.c b/src/H5B2leaf.c index beca40c..b50efad 100644 --- a/src/H5B2leaf.c +++ b/src/H5B2leaf.c @@ -1027,7 +1027,8 @@ done: *------------------------------------------------------------------------- */ H5_ATTR_PURE herr_t -H5B2__assert_leaf(const H5B2_hdr_t *hdr, const H5B2_leaf_t *leaf) +H5B2__assert_leaf(const H5B2_hdr_t H5_ATTR_SANITY_CHECK *hdr, + const H5B2_leaf_t H5_ATTR_SANITY_CHECK *leaf) { /* General sanity checking on node */ HDassert(leaf->nrec <= hdr->node_info->split_nrec); diff --git a/src/H5I.c b/src/H5I.c index 5159908..c3c2d46 100644 --- a/src/H5I.c +++ b/src/H5I.c @@ -215,7 +215,7 @@ H5I_term_package(void) *------------------------------------------------------------------------- */ H5I_type_t -H5Iregister_type(size_t H5_ATTR_SANITY_CHECK hash_size, unsigned reserved, H5I_free_t free_func) +H5Iregister_type(size_t hash_size, unsigned reserved, H5I_free_t free_func) { H5I_class_t *cls = NULL; /* New ID class */ H5I_type_t new_type; /* New ID type value */ -- cgit v0.12 From 156baee37112996291f9ff07760be047d0e03c76 Mon Sep 17 00:00:00 2001 From: kmu Date: Mon, 13 Jan 2020 14:48:22 -0600 Subject: change it back --- testpar/t_mdset.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/testpar/t_mdset.c b/testpar/t_mdset.c index 4e8a519..a0b3253 100644 --- a/testpar/t_mdset.c +++ b/testpar/t_mdset.c @@ -13,7 +13,6 @@ #include "testphdf5.h" #include "H5Dprivate.h" -#include "H5private.h" #define DIM 2 #define SIZE 32 @@ -1960,7 +1959,7 @@ void rr_obj_hdr_flush_confusion_writer(MPI_Comm comm) /* private communicator size and rank */ int mpi_size; int mpi_rank; - int H5_ATTR_SANITY_CHECK mrc; /* mpi error code */ + int mrc; /* mpi error code */ /* steps to verify and have been verified */ int steps = 0; int steps_done = 0; -- cgit v0.12 From 408b9b1f3b8e84ba090c51e665d38eedef32c7ee Mon Sep 17 00:00:00 2001 From: kmu Date: Tue, 21 Jan 2020 12:29:48 -0600 Subject: fix uninitizlized warning --- src/H5Fint.c | 4 ++-- testpar/t_cache.c | 6 +++--- tools/test/perform/perf.c | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/H5Fint.c b/src/H5Fint.c index 153ec2f..3a8dc3b 100644 --- a/src/H5Fint.c +++ b/src/H5Fint.c @@ -1509,8 +1509,8 @@ H5F_open(const char *name, unsigned flags, hid_t fcpl_id, hid_t fapl_id) H5P_genplist_t *a_plist; /*file access property list */ H5F_close_degree_t fc_degree; /*file close degree */ size_t page_buf_size; - unsigned page_buf_min_meta_perc; - unsigned page_buf_min_raw_perc; + unsigned page_buf_min_meta_perc = 0; + unsigned page_buf_min_raw_perc = 0; hbool_t set_flag = FALSE; /*set the status_flags in the superblock */ hbool_t clear = FALSE; /*clear the status_flags */ hbool_t evict_on_close; /* evict on close value from plist */ diff --git a/testpar/t_cache.c b/testpar/t_cache.c index cde19fe..ebb8e33 100644 --- a/testpar/t_cache.c +++ b/testpar/t_cache.c @@ -1761,7 +1761,7 @@ serve_write_request(struct mssg_t * mssg_ptr) hbool_t report_mssg = FALSE; hbool_t success = TRUE; int target_index; - int new_ver_num; + int new_ver_num = 0; haddr_t target_addr; #if DO_WRITE_REQ_ACK struct mssg_t reply; @@ -4612,7 +4612,7 @@ verify_entry_reads(haddr_t addr, int expected_entry_reads) { hbool_t success = TRUE; - int reported_entry_reads; + int reported_entry_reads = 0; struct mssg_t mssg; if ( success ) { @@ -4719,7 +4719,7 @@ verify_entry_writes(haddr_t addr, int expected_entry_writes) { hbool_t success = TRUE; - int reported_entry_writes; + int reported_entry_writes = 0; struct mssg_t mssg; if ( success ) { diff --git a/tools/test/perform/perf.c b/tools/test/perform/perf.c index 34b8a2d..2008a6e 100644 --- a/tools/test/perform/perf.c +++ b/tools/test/perform/perf.c @@ -117,7 +117,7 @@ extern char *optarg; int main(int argc, char **argv) { - char *buf, *tmp, *buf2, *tmp2, *check; + char *buf, *tmp, *buf2 = NULL, *tmp2 = NULL, *check; int i, j, mynod=0, nprocs=1, err, my_correct = 1, correct, myerrno; double stim, etim; double write_tim = 0; -- cgit v0.12 From 9f80ffa1f1908975b3100814b2529bf779521e13 Mon Sep 17 00:00:00 2001 From: kmu Date: Tue, 21 Jan 2020 12:30:40 -0600 Subject: fix missing prototype warning --- src/H5Pmapl.c | 3 ++- testpar/t_2Gio.c | 2 +- tools/test/perform/perf.c | 2 -- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/H5Pmapl.c b/src/H5Pmapl.c index fe5be0f..3a3f619 100644 --- a/src/H5Pmapl.c +++ b/src/H5Pmapl.c @@ -137,6 +137,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5P__macc_reg_prop() */ +#ifdef H5_HAVE_MAP_API /*------------------------------------------------------------------------- * Function: H5Pset_map_iterate_hints @@ -214,4 +215,4 @@ H5Pget_map_iterate_hints(hid_t mapl_id, size_t *key_prefetch_size, size_t *key_a done: FUNC_LEAVE_API(ret_value) } /* end H5Pget_map_iterate_hints() */ - +#endif diff --git a/testpar/t_2Gio.c b/testpar/t_2Gio.c index d48dfca..98ba557 100644 --- a/testpar/t_2Gio.c +++ b/testpar/t_2Gio.c @@ -552,7 +552,7 @@ dataset_vrfy(hsize_t start[], hsize_t count[], hsize_t stride[], hsize_t block[] #define H5FILE_NAME "hugefile.h5" #define DATASETNAME "dataset" -int MpioTest2G( MPI_Comm comm ) +static int MpioTest2G( MPI_Comm comm ) { /* * HDF5 APIs definitions diff --git a/tools/test/perform/perf.c b/tools/test/perform/perf.c index 34b8a2d..599c39e 100644 --- a/tools/test/perform/perf.c +++ b/tools/test/perform/perf.c @@ -110,8 +110,6 @@ const char *FILENAME[] = { /* function prototypes */ static int parse_args(int argc, char **argv); -extern int errno; - /* globals needed for getopt */ extern char *optarg; -- cgit v0.12 From 04a2d20bba020444686642d593e1be0529113d5d Mon Sep 17 00:00:00 2001 From: kmu Date: Wed, 22 Jan 2020 12:55:01 -0600 Subject: fix float type cmp warning --- testpar/t_mdset.c | 9 +++++---- tools/lib/h5diff_array.c | 6 +++--- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/testpar/t_mdset.c b/testpar/t_mdset.c index 63ac8d3..1c561c9 100644 --- a/testpar/t_mdset.c +++ b/testpar/t_mdset.c @@ -13,6 +13,7 @@ #include "testphdf5.h" #include "H5Dprivate.h" +#include "H5private.h" #define DIM 2 #define SIZE 32 @@ -332,7 +333,7 @@ void compact_dataset(void) /* Verify data value */ for(i = 0; i < size; i++) for(j = 0; j < size; j++) - if(inme[(i * size) + j] != outme[(i * size) + j]) + if(!H5_DBL_ABS_EQUAL(inme[(i * size) + j], outme[(i * size) + j])) if(err_num++ < MAX_ERR_REPORT || VERBOSE_MED) HDprintf("Dataset Verify failed at [%d][%d]: expect %f, got %f\n", i, j, outme[(i * size) + j], inme[(i * size) + j]); @@ -2477,7 +2478,7 @@ void rr_obj_hdr_flush_confusion_reader(MPI_Comm comm) /* compare read data with expected data */ for ( j = 0; j < LOCAL_DATA_SIZE; j++ ) - if (data_read[j] != data[j]){ + if (!H5_DBL_ABS_EQUAL(data_read[j], data[j])){ HDfprintf(stdout, "%0d:%s: Reading datasets value failed in " "Dataset %d, at position %d: expect %f, got %f.\n", @@ -2540,7 +2541,7 @@ void rr_obj_hdr_flush_confusion_reader(MPI_Comm comm) VRFY((err >= 0), "H5Aread failed.\n"); /* compare read attribute data with expected data */ for ( j = 0; j < LOCAL_DATA_SIZE; j++ ) - if (att_read[j] != att[j]){ + if (!H5_DBL_ABS_EQUAL(att_read[j], att[j])){ HDfprintf(stdout, "%0d:%s: Mismatched attribute data read in Dataset %d, at position %d: expect %f, got %f.\n", mpi_rank, fcn_name, i, j, att[j], att_read[j]); @@ -2592,7 +2593,7 @@ void rr_obj_hdr_flush_confusion_reader(MPI_Comm comm) VRFY((err >= 0), "H5Aread failed.\n"); /* compare read attribute data with expected data */ for ( j = 0; j < LARGE_ATTR_SIZE; j++ ) - if (lg_att_read[j] != lg_att[j]){ + if (!H5_DBL_ABS_EQUAL(lg_att_read[j], lg_att[j])){ HDfprintf(stdout, "%0d:%s: Mismatched large attribute data read in Dataset %d, at position %d: expect %f, got %f.\n", mpi_rank, fcn_name, i, j, lg_att[j], lg_att_read[j]); diff --git a/tools/lib/h5diff_array.c b/tools/lib/h5diff_array.c index 8321a98..e99b2cc 100644 --- a/tools/lib/h5diff_array.c +++ b/tools/lib/h5diff_array.c @@ -4584,7 +4584,7 @@ static hbool_t equal_double(double value, double expected, diff_opt_t *opts) { return FALSE; } - if (value == expected) + if (H5_DBL_ABS_EQUAL(value, expected)) return TRUE; if (opts->use_system_epsilon) @@ -4628,7 +4628,7 @@ hbool_t equal_ldouble(long double value, long double expected, diff_opt_t *opts) return FALSE; } - if (value == expected) + if (H5_DBL_ABS_EQUAL(value, expected)) return TRUE; if (opts->use_system_epsilon) @@ -4670,7 +4670,7 @@ static hbool_t equal_float(float value, float expected, diff_opt_t *opts) { return FALSE; } - if (value == expected) + if (H5_FLT_ABS_EQUAL(value, expected)) return TRUE; if (opts->use_system_epsilon) -- cgit v0.12 From 9cc63d81fb1f311e849e2d098d31e6cfd4f549b5 Mon Sep 17 00:00:00 2001 From: kmu Date: Wed, 22 Jan 2020 12:55:21 -0600 Subject: fix float type cmp warning --- tools/test/perform/pio_perf.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tools/test/perform/pio_perf.c b/tools/test/perform/pio_perf.c index 5977731..74855cb 100644 --- a/tools/test/perform/pio_perf.c +++ b/tools/test/perform/pio_perf.c @@ -59,6 +59,7 @@ #include #include +#include "H5private.h" #include "hdf5.h" #ifdef H5_HAVE_PARALLEL @@ -82,6 +83,7 @@ /* report 0.0 in case t is zero too */ #define MB_PER_SEC(bytes,t) (((t)==0.0) ? 0.0 : ((((double)bytes) / ONE_MB) / (t))) +#define MB_PER_SEC(bytes,t) (H5_DBL_ABS_EQUAL((t), 0.0) ? 0.0 : ((((double)bytes) / ONE_MB) / (t))) #ifndef TRUE #define TRUE 1 -- cgit v0.12 From 9afaf94bef740f89958a1a8aae369d5f607845f4 Mon Sep 17 00:00:00 2001 From: kmu Date: Wed, 22 Jan 2020 14:15:40 -0600 Subject: not use hdf5 private header --- tools/test/perform/pio_perf.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tools/test/perform/pio_perf.c b/tools/test/perform/pio_perf.c index 74855cb..1a40f44 100644 --- a/tools/test/perform/pio_perf.c +++ b/tools/test/perform/pio_perf.c @@ -59,7 +59,6 @@ #include #include -#include "H5private.h" #include "hdf5.h" #ifdef H5_HAVE_PARALLEL @@ -81,6 +80,9 @@ #define PIO_MPI 0x2 #define PIO_HDF5 0x4 +#define DBL_EPSILON 2.2204460492503131e-16 +#define H5_DBL_ABS_EQUAL(X,Y) (fabsf((X)-(Y)) < DBL_EPSILON) + /* report 0.0 in case t is zero too */ #define MB_PER_SEC(bytes,t) (((t)==0.0) ? 0.0 : ((((double)bytes) / ONE_MB) / (t))) #define MB_PER_SEC(bytes,t) (H5_DBL_ABS_EQUAL((t), 0.0) ? 0.0 : ((((double)bytes) / ONE_MB) / (t))) -- cgit v0.12 From f3d1b4c6d2c85995e4c6cd8dc9df5ac4d213d8a5 Mon Sep 17 00:00:00 2001 From: Larry Knox Date: Wed, 22 Jan 2020 15:46:34 -0600 Subject: Max Library "index" should be 7. --- bin/make_vers | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/make_vers b/bin/make_vers index f40e29a..74b0ae2 100755 --- a/bin/make_vers +++ b/bin/make_vers @@ -9,7 +9,7 @@ use warnings; # need to be decremented. - QAK) # Max. library "index" (0 = v1.0, 1 = 1.2, 2 = 1.4, 3 = 1.6, 4 = 1.8, 5 = 1.10, 6 = 1.12, 7 = 1.14, etc) -$max_idx = 8; +$max_idx = 7; # Min. supported previous library version "index" (0 = v1.0, 1 = 1.2, etc) $min_sup_idx = 3; -- cgit v0.12 From 145ef3ceee20c28a443bd11507c58858bea3f889 Mon Sep 17 00:00:00 2001 From: kmu Date: Wed, 22 Jan 2020 19:46:12 -0600 Subject: more cleanup --- src/H5CX.c | 2 +- test/cache_common.c | 2 +- test/mf.c | 7 +++---- test/page_buffer.c | 4 ++-- test/tselect.c | 2 -- 5 files changed, 7 insertions(+), 10 deletions(-) diff --git a/src/H5CX.c b/src/H5CX.c index 998808b..160aa84 100644 --- a/src/H5CX.c +++ b/src/H5CX.c @@ -127,7 +127,7 @@ (*head)->ctx.H5_GLUE(PROP_FIELD,_set) = TRUE; \ } /* end if */ \ } -#endif +#endif /* defined(H5_HAVE_PARALLEL) && defined(H5_HAVE_INSTRUMENTED_LIBRARY) */ #ifdef H5_HAVE_PARALLEL /* Macro for the duplicated code to test and set properties for a property list */ diff --git a/test/cache_common.c b/test/cache_common.c index 696eae3..038a0ed 100644 --- a/test/cache_common.c +++ b/test/cache_common.c @@ -17,9 +17,9 @@ * This file contains common code for tests of the cache * implemented in H5C.c */ +#include "H5private.h" #include "H5CXprivate.h" /* API Contexts */ #include "H5MMprivate.h" -#include "H5private.h" #include "cache_common.h" diff --git a/test/mf.c b/test/mf.c index 6030314..141f5ec 100644 --- a/test/mf.c +++ b/test/mf.c @@ -38,7 +38,6 @@ #include "H5Iprivate.h" #include "H5VLprivate.h" /* Virtual Object Layer */ #include "H5VMprivate.h" -#include "H5private.h" #define FILENAME_LEN 1024 @@ -7529,7 +7528,7 @@ error: *------------------------------------------------------------------------- */ static int -set_multi_split(hid_t fapl, hsize_t pagesize, hbool_t split) +set_multi_split(hid_t fapl, hsize_t pagesize, hbool_t is_multi_or_split) { H5FD_mem_t memb_map[H5FD_MEM_NTYPES]; hid_t memb_fapl_arr[H5FD_MEM_NTYPES]; @@ -7538,7 +7537,7 @@ set_multi_split(hid_t fapl, hsize_t pagesize, hbool_t split) hbool_t relax; H5FD_mem_t mt; - HDassert(split); + HDassert(is_multi_or_split); HDmemset(memb_name, 0, sizeof memb_name); @@ -7546,7 +7545,7 @@ set_multi_split(hid_t fapl, hsize_t pagesize, hbool_t split) if(H5Pget_fapl_multi(fapl, memb_map, memb_fapl_arr, memb_name, memb_addr, &relax) < 0) TEST_ERROR - if(split) { + if(is_multi_or_split) { /* Set memb_addr aligned */ memb_addr[H5FD_MEM_SUPER] = ((memb_addr[H5FD_MEM_SUPER] + pagesize - 1) / pagesize) * pagesize; memb_addr[H5FD_MEM_DRAW] = ((memb_addr[H5FD_MEM_DRAW] + pagesize - 1) / pagesize) * pagesize; diff --git a/test/page_buffer.c b/test/page_buffer.c index 79ba43f..21ffbf5 100644 --- a/test/page_buffer.c +++ b/test/page_buffer.c @@ -299,7 +299,7 @@ error: } H5E_END_TRY; return 1; } -#endif +#endif /* H5_HAVE_PARALLEL */ /* * @@ -2008,7 +2008,7 @@ error: return 1; } /* test_stats_collection */ -#endif +#endif /* #ifndef H5_HAVE_PARALLEL */ /*------------------------------------------------------------------------- diff --git a/test/tselect.c b/test/tselect.c index db7c9de..390f61f 100644 --- a/test/tselect.c +++ b/test/tselect.c @@ -25,9 +25,7 @@ #define H5S_TESTING #include "testhdf5.h" -#include "hdf5.h" #include "H5Spkg.h" /* Dataspaces */ -#include "H5private.h" #define FILENAME "tselect.h5" -- cgit v0.12