diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/H5FDmpio.c | 2 | ||||
-rw-r--r-- | src/H5HFcache.c | 3 | ||||
-rw-r--r-- | src/H5HL.c | 8 |
3 files changed, 7 insertions, 6 deletions
diff --git a/src/H5FDmpio.c b/src/H5FDmpio.c index 5c3bf05..96b4b2f 100644 --- a/src/H5FDmpio.c +++ b/src/H5FDmpio.c @@ -2126,7 +2126,7 @@ H5FD_mpio_communicator(const H5FD_t *_file) HDassert(H5FD_MPIO==file->pub.driver_id); FUNC_LEAVE_NOAPI(file->comm) -} +} /* end H5FD_mpio_communicator() */ #endif /* H5_HAVE_PARALLEL */ diff --git a/src/H5HFcache.c b/src/H5HFcache.c index 88973a5..4f3dfc3 100644 --- a/src/H5HFcache.c +++ b/src/H5HFcache.c @@ -1924,7 +1924,7 @@ H5HF__cache_dblock_pre_serialize(const H5F_t *f, hid_t dxpl_id, void *_thing, H5HF_hdr_t *hdr; /* Shared fractal heap information */ H5HF_direct_t *dblock = (H5HF_direct_t *)_thing; /* Direct block info */ H5HF_indirect_t *par_iblock; /* Parent indirect block */ - unsigned par_entry; /* Entry in parent indirect block */ + unsigned par_entry = 0; /* Entry in parent indirect block */ void *write_buf; /* Pointer to buffer to write out */ size_t write_size; /* Size of buffer to write out */ uint8_t *image; /* Pointer into raw data buffer */ @@ -2224,6 +2224,7 @@ H5HF__cache_dblock_pre_serialize(const H5F_t *f, hid_t dxpl_id, void *_thing, else { /* the direct block's parent is an indirect block */ /* Sanity check */ HDassert(par_iblock); + HDassert(par_iblock->ents); HDassert(H5F_addr_eq(par_iblock->ents[par_entry].addr, addr)); /* Allocate 'normal' space for the direct block */ @@ -514,11 +514,11 @@ H5HL_protect(H5F_t *f, hid_t dxpl_id, haddr_t addr, unsigned flags) done: /* Release the prefix from the cache, now pinned */ - if(prfx && H5AC_unprotect(f, dxpl_id, H5AC_LHEAP_PRFX, heap->prfx_addr, prfx, prfx_cache_flags) < 0) + if(prfx && heap && H5AC_unprotect(f, dxpl_id, H5AC_LHEAP_PRFX, heap->prfx_addr, prfx, prfx_cache_flags) < 0) HDONE_ERROR(H5E_HEAP, H5E_CANTUNPROTECT, NULL, "unable to release local heap prefix") /* Release the data block from the cache, now pinned */ - if(dblk && H5AC_unprotect(f, dxpl_id, H5AC_LHEAP_DBLK, heap->dblk_addr, dblk, dblk_cache_flags) < 0) + if(dblk && heap && H5AC_unprotect(f, dxpl_id, H5AC_LHEAP_DBLK, heap->dblk_addr, dblk, dblk_cache_flags) < 0) HDONE_ERROR(H5E_HEAP, H5E_CANTUNPROTECT, NULL, "unable to release local heap data block") FUNC_LEAVE_NOAPI(ret_value) @@ -1117,11 +1117,11 @@ H5HL_delete(H5F_t *f, hid_t dxpl_id, haddr_t addr) done: /* Release the data block from the cache, now deleted */ - if(dblk && H5AC_unprotect(f, dxpl_id, H5AC_LHEAP_DBLK, heap->dblk_addr, dblk, cache_flags) < 0) + if(dblk && heap && H5AC_unprotect(f, dxpl_id, H5AC_LHEAP_DBLK, heap->dblk_addr, dblk, cache_flags) < 0) HDONE_ERROR(H5E_HEAP, H5E_CANTUNPROTECT, FAIL, "unable to release local heap data block") /* Release the prefix from the cache, now deleted */ - if(prfx && H5AC_unprotect(f, dxpl_id, H5AC_LHEAP_PRFX, heap->prfx_addr, prfx, cache_flags) < 0) + if(prfx && heap && H5AC_unprotect(f, dxpl_id, H5AC_LHEAP_PRFX, heap->prfx_addr, prfx, cache_flags) < 0) HDONE_ERROR(H5E_HEAP, H5E_CANTUNPROTECT, FAIL, "unable to release local heap prefix") FUNC_LEAVE_NOAPI(ret_value) |