From 53fe9189e1ea34ecfd209bb181b758a980bb5318 Mon Sep 17 00:00:00 2001 From: David Young Date: Mon, 31 Aug 2020 15:57:59 -0500 Subject: Improve/expand the comments on the file->writer assertions. --- src/H5FDvfd_swmr.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/H5FDvfd_swmr.c b/src/H5FDvfd_swmr.c index 724568f..898adaf 100644 --- a/src/H5FDvfd_swmr.c +++ b/src/H5FDvfd_swmr.c @@ -975,6 +975,9 @@ H5FD_vfd_swmr_write(H5FD_t *_file, H5FD_mem_t type, { H5FD_vfd_swmr_t *file = (H5FD_vfd_swmr_t *)_file; + /* This routine should only be called if the VFD instance is opened + * for writing. + */ HDassert(file->writer); return H5FD_write(file->hdf5_file_lf, type, addr, size, buf); @@ -997,12 +1000,8 @@ H5FD_vfd_swmr_truncate(H5FD_t *_file, hid_t H5_ATTR_UNUSED dxpl_id, { H5FD_vfd_swmr_t *file = (H5FD_vfd_swmr_t *)_file; /* VFD SWMR file struct */ - /* The VFD SWMR vfd should only be used by the VFD SWMR reader, - * and thus this file should only be opened R/O. - * - * Thus this function should never be called and should return error - * - * For now, just assert FALSE. + /* This routine should only be called if the VFD instance is opened + * for writing. */ HDassert(file->writer); -- cgit v0.12