From 527105012bd5836998ca9d476bd7aa07c9d3f8d4 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Wed, 18 Dec 2019 12:44:27 -0600 Subject: Fix include to correct memory calls - big-endian issue. --- test/cache.c | 1 + test/cache_common.c | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/test/cache.c b/test/cache.c index ca2cf13..c1af1b2 100644 --- a/test/cache.c +++ b/test/cache.c @@ -18,6 +18,7 @@ * H5C.c */ #include "cache_common.h" +#include "H5MFprivate.h" hid_t saved_fapl_id = H5P_DEFAULT; /* store the fapl id here between diff --git a/test/cache_common.c b/test/cache_common.c index 96c146c..2e24bda 100644 --- a/test/cache_common.c +++ b/test/cache_common.c @@ -18,7 +18,6 @@ * implemented in H5C.c */ #include "H5CXprivate.h" /* API Contexts */ -#include "H5MFprivate.h" #include "H5MMprivate.h" #include "cache_common.h" -- cgit v0.12 From b89d4280876fcbc280fb694e218afa6fa5f67e1d Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Wed, 18 Dec 2019 14:29:46 -0600 Subject: Adjust cache.c only variables. --- test/cache.c | 39 ++++++++++++++++++++++++++------------- test/cache_common.c | 12 ------------ test/cache_common.h | 4 ---- 3 files changed, 26 insertions(+), 29 deletions(-) diff --git a/test/cache.c b/test/cache.c index c1af1b2..a90f12b 100644 --- a/test/cache.c +++ b/test/cache.c @@ -21,22 +21,35 @@ #include "H5MFprivate.h" +H5C_t * saved_cache = NULL; /* store the pointer to the instance of + * of H5C_t created by H5Fcreate() + * here between test cache setup and + * shutdown. + */ + +haddr_t saved_actual_base_addr = HADDR_UNDEF; /* Store the address of the + * space allocated for cache items in the file between + * cache setup & takedown + */ + hid_t saved_fapl_id = H5P_DEFAULT; /* store the fapl id here between - * cache setup and takedown. Note - * that if saved_fapl_id == H5P_DEFAULT, - * we assume that there is no fapl to - * close. - */ + * cache setup and takedown. Note + * that if saved_fapl_id == H5P_DEFAULT, + * we assume that there is no fapl to + * close. + */ hid_t saved_fcpl_id = H5P_DEFAULT; /* store the fcpl id here between - * cache setup and takedown. Note - * that if saved_fcpl_id == H5P_DEFAULT, - * we assume that there is no fcpl to - * close. - */ -hid_t saved_fid = -1; /* store the file id here between cache setup - * and takedown. - */ + * cache setup and takedown. Note + * that if saved_fcpl_id == H5P_DEFAULT, + * we assume that there is no fcpl to + * close. + */ + +hid_t saved_fid = -1; /* store the file id here between cache setup + * and takedown. + */ +hbool_t write_permitted = TRUE; hbool_t try_core_file_driver = FALSE; hbool_t core_file_driver_failed = FALSE; diff --git a/test/cache_common.c b/test/cache_common.c index 2e24bda..f977c3c 100644 --- a/test/cache_common.c +++ b/test/cache_common.c @@ -22,18 +22,6 @@ #include "cache_common.h" - -H5C_t * saved_cache = NULL; /* store the pointer to the instance of - * of H5C_t created by H5Fcreate() - * here between test cache setup and - * shutdown. - */ - -haddr_t saved_actual_base_addr = HADDR_UNDEF; /* Store the address of the - space allocated for cache items in the file between - cache setup & takedown */ - -hbool_t write_permitted = TRUE; hbool_t pass = TRUE; /* set to false on error */ const char *failure_mssg = NULL; diff --git a/test/cache_common.h b/test/cache_common.h index 61457d9..969cc2a 100644 --- a/test/cache_common.h +++ b/test/cache_common.h @@ -538,10 +538,6 @@ struct expected_entry_status /* global variable externs: */ -H5TEST_DLLVAR H5C_t * saved_cache; - -H5TEST_DLLVAR haddr_t saved_actual_base_addr; -H5TEST_DLLVAR hbool_t write_permitted; H5TEST_DLLVAR hbool_t pass; /* set to false on error */ H5TEST_DLLVAR const char *failure_mssg; -- cgit v0.12 From 27596d1157d94aae6b45c2b3d52458050bd78168 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Wed, 18 Dec 2019 15:08:40 -0600 Subject: Fix compile error - declaration after executable statement --- test/dsets.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/test/dsets.c b/test/dsets.c index d017ff3..db0af35 100644 --- a/test/dsets.c +++ b/test/dsets.c @@ -7065,6 +7065,7 @@ static void make_random_offset_and_increment(long nelts, long *offsetp, long *incp) { long inc; + const long maxinc; HDassert(0 < nelts); @@ -7073,7 +7074,7 @@ make_random_offset_and_increment(long nelts, long *offsetp, long *incp) /* `maxinc` is chosen so that for any `x` in [0, nelts - 1], * `x + maxinc` does not overflow a long. */ - const long maxinc = MIN(nelts - 1, LONG_MAX - nelts); + maxinc = MIN(nelts - 1, LONG_MAX - nelts); /* Choose a random number in [1, nelts - 1]. If its greatest divisor * in common with `nelts` is 1, then it will "generate" the additive ring @@ -13132,7 +13133,7 @@ test_versionbounds(void) return FAIL; } /* end test_versionbounds() */ - + /*----------------------------------------------------------------------------- * Function: test_object_header_minimization_dcpl * -- cgit v0.12 From ac87f12afe73fa22dcf31d9aeba05a259e215765 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Wed, 18 Dec 2019 16:10:12 -0600 Subject: Remove const --- test/dsets.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/dsets.c b/test/dsets.c index db0af35..26a47f0 100644 --- a/test/dsets.c +++ b/test/dsets.c @@ -7065,7 +7065,7 @@ static void make_random_offset_and_increment(long nelts, long *offsetp, long *incp) { long inc; - const long maxinc; + long maxinc; HDassert(0 < nelts); -- cgit v0.12