summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAllen Byrne <byrn@hdfgroup.org>2019-12-19 16:23:37 (GMT)
committerAllen Byrne <byrn@hdfgroup.org>2019-12-19 16:23:37 (GMT)
commit817235bb60e1f79c4b22b4a6116a1594aa75b81d (patch)
tree63c8393575702bec34e6f0139a288d9a060e67b2
parent134a31c4a98221d56ba56e6744685166c5ef0a8b (diff)
parentac87f12afe73fa22dcf31d9aeba05a259e215765 (diff)
downloadhdf5-817235bb60e1f79c4b22b4a6116a1594aa75b81d.zip
hdf5-817235bb60e1f79c4b22b4a6116a1594aa75b81d.tar.gz
hdf5-817235bb60e1f79c4b22b4a6116a1594aa75b81d.tar.bz2
Merge pull request #2153 in HDFFV/hdf5 from ~BYRN/hdf5_adb:develop to develop
* commit 'ac87f12afe73fa22dcf31d9aeba05a259e215765': Remove const Fix compile error - declaration after executable statement Adjust cache.c only variables. Fix include to correct memory calls - big-endian issue.
-rw-r--r--test/cache.c40
-rw-r--r--test/cache_common.c13
-rw-r--r--test/cache_common.h4
-rw-r--r--test/dsets.c5
4 files changed, 30 insertions, 32 deletions
diff --git a/test/cache.c b/test/cache.c
index ca2cf13..a90f12b 100644
--- a/test/cache.c
+++ b/test/cache.c
@@ -18,24 +18,38 @@
* H5C.c
*/
#include "cache_common.h"
+#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 96c146c..f977c3c 100644
--- a/test/cache_common.c
+++ b/test/cache_common.c
@@ -18,23 +18,10 @@
* implemented in H5C.c
*/
#include "H5CXprivate.h" /* API Contexts */
-#include "H5MFprivate.h"
#include "H5MMprivate.h"
#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;
diff --git a/test/dsets.c b/test/dsets.c
index d017ff3..26a47f0 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;
+ 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
*