summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Young <dyoung@hdfgroup.org>2020-08-21 18:44:27 (GMT)
committerDavid Young <dyoung@hdfgroup.org>2020-08-21 18:44:27 (GMT)
commit563665c894c5cbe292907c609cc058b224f6ce57 (patch)
tree47db5be394aafe14dd0de5fca748ceea6dbf2f7e
parent0bbf92da01ec9d19bd498a9eb7f92c46b4b469ac (diff)
parent7af1fa67d6d2e441c72504ed9144576a797e1e3a (diff)
downloadhdf5-563665c894c5cbe292907c609cc058b224f6ce57.zip
hdf5-563665c894c5cbe292907c609cc058b224f6ce57.tar.gz
hdf5-563665c894c5cbe292907c609cc058b224f6ce57.tar.bz2
Merge branch 'feature/vfd_swmr' into multi
-rw-r--r--src/H5Fsuper_cache.c16
-rw-r--r--test/vfd_swmr_vlstr_writer.c4
-rw-r--r--test/vfd_swmr_zoo_writer.c4
3 files changed, 18 insertions, 6 deletions
diff --git a/src/H5Fsuper_cache.c b/src/H5Fsuper_cache.c
index d1227d0..0ea9080 100644
--- a/src/H5Fsuper_cache.c
+++ b/src/H5Fsuper_cache.c
@@ -1233,9 +1233,11 @@ H5F__cache_superblock_refresh(H5F_t *f, void * _thing, const void * _image,
* Allow this.
*/
UINT32DECODE(image, status_flags);
- if ( ( status_flags != sblock->status_flags ) &&
- ( status_flags != 0 ) )
- HGOTO_ERROR(H5E_FILE, H5E_BADVALUE, FAIL, "unexpected status_flags")
+ if (status_flags != sblock->status_flags && status_flags != 0) {
+ HGOTO_ERROR(H5E_FILE, H5E_BADVALUE, FAIL,
+ "read status_flags %" PRIx32 " expected %" PRIx32,
+ status_flags, sblock->status_flags)
+ }
/*
* If the superblock version # is greater than 0, read in the indexed
@@ -1308,9 +1310,11 @@ H5F__cache_superblock_refresh(H5F_t *f, void * _thing, const void * _image,
/* If the file has closed, the status flags will be zero.
* Allow this.
*/
- if ( ( status_flags != sblock->status_flags ) &&
- ( status_flags != 0 ) )
- HGOTO_ERROR(H5E_FILE, H5E_BADVALUE, FAIL, "unexpected status_flags")
+ if (status_flags != sblock->status_flags && status_flags != 0) {
+ HGOTO_ERROR(H5E_FILE, H5E_BADVALUE, FAIL,
+ "read status_flags %" PRIx32 " expected %" PRIx32,
+ status_flags, sblock->status_flags)
+ }
/* Base, superblock extension, end of file & root group object
* header addresses
diff --git a/test/vfd_swmr_vlstr_writer.c b/test/vfd_swmr_vlstr_writer.c
index cb52fcb..d635b7a 100644
--- a/test/vfd_swmr_vlstr_writer.c
+++ b/test/vfd_swmr_vlstr_writer.c
@@ -96,6 +96,7 @@ create_vl_dset(hid_t file, hid_t type, hid_t space, const char *name)
}
static void
+#ifndef H5C_COLLECT_CACHE_STATS
print_cache_hits(H5C_t *cache)
{
int i;
@@ -106,6 +107,9 @@ print_cache_hits(H5C_t *cache)
}
dbgf(3, "\n");
}
+#else
+print_cache_hits(H5C_t H5_ATTR_UNUSED *cache) { return; }
+#endif
static void
usage(const char *progname)
diff --git a/test/vfd_swmr_zoo_writer.c b/test/vfd_swmr_zoo_writer.c
index 12db3cd..3eb228a 100644
--- a/test/vfd_swmr_zoo_writer.c
+++ b/test/vfd_swmr_zoo_writer.c
@@ -60,6 +60,7 @@ static const hid_t badhid = H5I_INVALID_HID;
static bool writer;
static void
+#ifndef H5C_COLLECT_CACHE_STATS
print_cache_hits(H5C_t *cache)
{
int i;
@@ -70,6 +71,9 @@ print_cache_hits(H5C_t *cache)
}
dbgf(3, "\n");
}
+#else
+print_cache_hits(H5C_t H5_ATTR_UNUSED *cache) { return; }
+#endif
void
zoo_create_hook(hid_t fid)