summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/H5MF.c4
-rw-r--r--test/mf.c10
2 files changed, 13 insertions, 1 deletions
diff --git a/src/H5MF.c b/src/H5MF.c
index a3769d1..2cf52b0 100644
--- a/src/H5MF.c
+++ b/src/H5MF.c
@@ -302,6 +302,8 @@ HDfprintf(stderr, "%s: alloc_type = %u, size = %Hu\n", FUNC, (unsigned)alloc_typ
/* check arguments */
HDassert(f);
+ HDassert(f->shared);
+ HDassert(f->shared->lf);
HDassert(size > 0);
/* Get free space type from allocation type */
@@ -768,6 +770,8 @@ HDfprintf(stderr, "%s: Entering - alloc_type = %u, addr = %a, size = %Hu\n", FUN
/* check arguments */
HDassert(f);
+ HDassert(f->shared);
+ HDassert(f->shared->lf);
HDassert(H5F_addr_defined(addr));
HDassert(size > 0);
diff --git a/test/mf.c b/test/mf.c
index 4259520..8b5c51b 100644
--- a/test/mf.c
+++ b/test/mf.c
@@ -3753,6 +3753,10 @@ test_mf_align_eoa(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl)
if((file = H5Fopen(filename, H5F_ACC_RDWR, fapl1)) < 0)
FAIL_STACK_ERROR
+ /* Get a pointer to the internal file object */
+ if(NULL == (f = (H5F_t *)H5I_object(file)))
+ FAIL_STACK_ERROR
+
/* shrink the block */
if(H5MF_try_shrink(f, type, H5P_DATASET_XFER_DEFAULT, addr1, (hsize_t)TEST_BLOCK_SIZE50) <= 0)
TEST_ERROR
@@ -3804,6 +3808,10 @@ test_mf_align_eoa(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl)
if((file = H5Fopen(filename, H5F_ACC_RDWR, fapl1)) < 0)
FAIL_STACK_ERROR
+ /* Get a pointer to the internal file object */
+ if(NULL == (f = (H5F_t *)H5I_object(file)))
+ FAIL_STACK_ERROR
+
/* try to extend the block */
extended = H5MF_try_extend(f, H5P_DATASET_XFER_DEFAULT, type, (haddr_t)addr1, (hsize_t)TEST_BLOCK_SIZE50, (hsize_t)TEST_BLOCK_SIZE30);
@@ -5864,7 +5872,7 @@ main(void)
nerrors += test_mf_align_alloc4(env_h5_drvr, fapl, new_fapl);
nerrors += test_mf_align_alloc5(env_h5_drvr, fapl, new_fapl);
nerrors += test_mf_align_alloc6(env_h5_drvr, fapl, new_fapl);
- }
+ } /* end if */
if(nerrors)
goto error;