From dcf794e716f2d37db7881fea6dda4f05c654548f Mon Sep 17 00:00:00 2001 From: Larry Knox Date: Wed, 29 Apr 2020 10:45:18 -0500 Subject: Resolve warning errors from -Werror= flags: -Werror=bad-function-cast -Werror=bad-function-cast -Werror=implicit-function-declaration -Werror=nested-externs --- src/H5Dmpio.c | 2 +- src/H5Pint.c | 6 +++--- src/H5Smpio.c | 2 -- testpar/t_cache.c | 4 ++-- testpar/t_span_tree.c | 6 ++++++ 5 files changed, 12 insertions(+), 8 deletions(-) diff --git a/src/H5Dmpio.c b/src/H5Dmpio.c index c4c9fbe..4e5a121 100644 --- a/src/H5Dmpio.c +++ b/src/H5Dmpio.c @@ -603,7 +603,7 @@ H5D__chunk_collective_io(H5D_io_info_t *io_info, const H5D_type_info_t *type_inf HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a file access property list") /* Check the optional property list on what to do with collective chunk IO. */ - chunk_opt_mode = (H5FD_mpio_chunk_opt_t)H5P_peek_unsigned(dx_plist, H5D_XFER_MPIO_CHUNK_OPT_HARD_NAME); + chunk_opt_mode = H5P_peek_unsigned(dx_plist, H5D_XFER_MPIO_CHUNK_OPT_HARD_NAME); if(H5FD_MPIO_CHUNK_ONE_IO == chunk_opt_mode) io_option = H5D_ONE_LINK_CHUNK_IO; /*no opt*/ /* direct request to multi-chunk-io */ diff --git a/src/H5Pint.c b/src/H5Pint.c index 04ae167..2b71e77 100644 --- a/src/H5Pint.c +++ b/src/H5Pint.c @@ -3744,9 +3744,9 @@ done: PURPOSE Internal routine to quickly retrieve the value of a property in a property list. USAGE - int H5P_peek_unsigned(plist, name) - H5P_genplist_t *plist; IN: Property list to check - const char *name; IN: Name of property to query + unsigned H5P_peek_unsigned(plist, name) + H5P_genplist_t *plist; IN: Property list to check + const char *name; IN: Name of property to query RETURNS Directly returns the value of the property in the list DESCRIPTION diff --git a/src/H5Smpio.c b/src/H5Smpio.c index 6101ec6..ee774cf 100644 --- a/src/H5Smpio.c +++ b/src/H5Smpio.c @@ -388,8 +388,6 @@ H5S_mpio_permute_type(const H5S_t *space, size_t elmt_size, hsize_t **permute, /* Loop, while elements left in selection */ u = 0; while(max_elem > 0) { - hsize_t off[H5D_IO_VECTOR_SIZE]; /* Array to store sequence offsets */ - size_t len[H5D_IO_VECTOR_SIZE]; /* Array to store sequence lengths */ size_t nelem; /* Number of elements used in sequences */ size_t nseq; /* Number of sequences generated */ size_t curr_seq; /* Current sequence being worked on */ diff --git a/testpar/t_cache.c b/testpar/t_cache.c index f290551..0ae91d6 100644 --- a/testpar/t_cache.c +++ b/testpar/t_cache.c @@ -5634,7 +5634,6 @@ smoke_check_3(int metadata_write_strategy) { const char * fcn_name = "smoke_check_3()"; hbool_t success = TRUE; - hbool_t verbose = FALSE; int cp = 0; int i; int max_nerrors; @@ -5646,6 +5645,7 @@ smoke_check_3(int metadata_write_strategy) H5F_t * file_ptr = NULL; H5C_t * cache_ptr = NULL; struct mssg_t mssg; + verbose = FALSE; switch ( metadata_write_strategy ) { @@ -6319,7 +6319,6 @@ smoke_check_5(int metadata_write_strategy) { const char * fcn_name = "smoke_check_5()"; hbool_t success = TRUE; - hbool_t verbose = FALSE; int cp = 0; int i; int max_nerrors; @@ -6327,6 +6326,7 @@ smoke_check_5(int metadata_write_strategy) H5F_t * file_ptr = NULL; H5C_t * cache_ptr = NULL; struct mssg_t mssg; + verbose = FALSE; switch ( metadata_write_strategy ) { diff --git a/testpar/t_span_tree.c b/testpar/t_span_tree.c index b69645d..b33fd96 100644 --- a/testpar/t_span_tree.c +++ b/testpar/t_span_tree.c @@ -32,7 +32,13 @@ */ +#define H5S_PACKAGE /*suppress error about including H5Spkg */ + +/* Define this macro to indicate that the testing APIs should be available */ +#define H5S_TESTING + #include "H5private.h" +#include "H5Spkg.h" #include "testphdf5.h" -- cgit v0.12 From a81a72b0e5649a197b33b2b666605d649af73981 Mon Sep 17 00:00:00 2001 From: Larry Knox Date: Wed, 29 Apr 2020 15:12:02 -0500 Subject: Remove verbose assignments in smoke_check 3 and 5 functions. --- testpar/t_cache.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/testpar/t_cache.c b/testpar/t_cache.c index 0ae91d6..0493cb6 100644 --- a/testpar/t_cache.c +++ b/testpar/t_cache.c @@ -5645,7 +5645,6 @@ smoke_check_3(int metadata_write_strategy) H5F_t * file_ptr = NULL; H5C_t * cache_ptr = NULL; struct mssg_t mssg; - verbose = FALSE; switch ( metadata_write_strategy ) { @@ -6326,7 +6325,6 @@ smoke_check_5(int metadata_write_strategy) H5F_t * file_ptr = NULL; H5C_t * cache_ptr = NULL; struct mssg_t mssg; - verbose = FALSE; switch ( metadata_write_strategy ) { -- cgit v0.12