summaryrefslogtreecommitdiffstats
path: root/testpar
diff options
context:
space:
mode:
authorQuincey Koziol <quincey@koziol.cc>2023-05-15 18:54:58 (GMT)
committerGitHub <noreply@github.com>2023-05-15 18:54:58 (GMT)
commit940bdafacb32147b5b20d6d8994c89b696592f6f (patch)
tree4bc329c767039f2aef7808104a43f2a840ba8e32 /testpar
parent20e72f98b2063aa349cdec8b56ca6e4ab54a15cc (diff)
downloadhdf5-940bdafacb32147b5b20d6d8994c89b696592f6f.zip
hdf5-940bdafacb32147b5b20d6d8994c89b696592f6f.tar.gz
hdf5-940bdafacb32147b5b20d6d8994c89b696592f6f.tar.bz2
Remove unnecessary fields from cache structs (#2951)
* Remove unnecessary 'magic' field from cache structs Signed-off-by: Quincey Koziol <quincey@koziol.cc> * Committing clang-format changes --------- Signed-off-by: Quincey Koziol <quincey@koziol.cc> Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
Diffstat (limited to 'testpar')
-rw-r--r--testpar/t_cache.c23
-rw-r--r--testpar/t_file.c3
2 files changed, 2 insertions, 24 deletions
diff --git a/testpar/t_cache.c b/testpar/t_cache.c
index 4d3aff5..2507c7e 100644
--- a/testpar/t_cache.c
+++ b/testpar/t_cache.c
@@ -2293,13 +2293,11 @@ datum_serialize(const H5F_t *f, void H5_ATTR_NDEBUG_UNUSED *image_ptr, size_t le
HDassert(f);
HDassert(f->shared);
HDassert(f->shared->cache);
- HDassert(f->shared->cache->magic == H5C__H5C_T_MAGIC);
HDassert(f->shared->cache->aux_ptr);
aux_ptr = (H5AC_aux_t *)(f->shared->cache->aux_ptr);
HDassert(aux_ptr);
- HDassert(aux_ptr->magic == H5AC__H5AC_AUX_T_MAGIC);
entry_ptr->aux_ptr = aux_ptr;
@@ -2526,7 +2524,6 @@ datum_notify(H5C_notify_action_t action, void *thing)
}
HDassert(entry_ptr->aux_ptr);
- HDassert(entry_ptr->aux_ptr->magic == H5AC__H5AC_AUX_T_MAGIC);
aux_ptr = entry_ptr->aux_ptr;
entry_ptr->aux_ptr = NULL;
@@ -2898,8 +2895,7 @@ insert_entry(H5C_t *cache_ptr, H5F_t *file_ptr, int32_t idx, unsigned int flags)
aux_ptr = ((H5AC_aux_t *)(cache_ptr->aux_ptr));
- if (!((aux_ptr != NULL) && (aux_ptr->magic == H5AC__H5AC_AUX_T_MAGIC) &&
- (aux_ptr->dirty_bytes == 0))) {
+ if (!(aux_ptr != NULL && aux_ptr->dirty_bytes == 0)) {
nerrors++;
if (verbose) {
@@ -3525,8 +3521,7 @@ move_entry(H5F_t *file_ptr, int32_t old_idx, int32_t new_idx)
aux_ptr = ((H5AC_aux_t *)(file_ptr->shared->cache->aux_ptr));
- if (!((aux_ptr != NULL) && (aux_ptr->magic == H5AC__H5AC_AUX_T_MAGIC) &&
- (aux_ptr->dirty_bytes == 0))) {
+ if (!(aux_ptr != NULL && aux_ptr->dirty_bytes == 0)) {
nerrors++;
if (verbose) {
@@ -3750,12 +3745,6 @@ setup_cache_for_test(hid_t *fid_ptr, H5F_t **file_ptr_ptr, H5C_t **cache_ptr_ptr
HDfprintf(stdout, "%d:%s: Can't get cache_ptr.\n", world_mpi_rank, __func__);
}
}
- else if (cache_ptr->magic != H5C__H5C_T_MAGIC) {
- nerrors++;
- if (verbose) {
- HDfprintf(stdout, "%d:%s: Bad cache_ptr magic.\n", world_mpi_rank, __func__);
- }
- }
else {
cache_ptr->ignore_tags = TRUE;
*fid_ptr = fid;
@@ -3805,14 +3794,6 @@ setup_cache_for_test(hid_t *fid_ptr, H5F_t **file_ptr_ptr, H5C_t **cache_ptr_ptr
HDfprintf(stdout, "%d:%s: cache_ptr->aux_ptr == NULL.\n", world_mpi_rank, __func__);
}
}
- else if (((H5AC_aux_t *)(cache_ptr->aux_ptr))->magic != H5AC__H5AC_AUX_T_MAGIC) {
-
- nerrors++;
- if (verbose) {
- HDfprintf(stdout, "%d:%s: cache_ptr->aux_ptr->magic != H5AC__H5AC_AUX_T_MAGIC.\n",
- world_mpi_rank, __func__);
- }
- }
else if (((H5AC_aux_t *)(cache_ptr->aux_ptr))->metadata_write_strategy != metadata_write_strategy) {
nerrors++;
diff --git a/testpar/t_file.c b/testpar/t_file.c
index 90ae22d..716379b 100644
--- a/testpar/t_file.c
+++ b/testpar/t_file.c
@@ -467,7 +467,6 @@ create_file(const char *filename, hid_t fcpl, hid_t fapl, int metadata_write_str
VRFY((f != NULL), "");
cache_ptr = f->shared->cache;
- VRFY((cache_ptr->magic == H5C__H5C_T_MAGIC), "");
cache_ptr->ignore_tags = TRUE;
H5C_stats__reset(cache_ptr);
@@ -634,7 +633,6 @@ open_file(const char *filename, hid_t fapl, int metadata_write_strategy, hsize_t
VRFY((f != NULL), "");
cache_ptr = f->shared->cache;
- VRFY((cache_ptr->magic == H5C__H5C_T_MAGIC), "");
MPI_Barrier(MPI_COMM_WORLD);
@@ -713,7 +711,6 @@ open_file(const char *filename, hid_t fapl, int metadata_write_strategy, hsize_t
entry_ptr = cache_ptr->index[i];
while (entry_ptr != NULL) {
- HDassert(entry_ptr->magic == H5C__H5C_CACHE_ENTRY_T_MAGIC);
HDassert(entry_ptr->is_dirty == FALSE);
if (!entry_ptr->is_pinned && !entry_ptr->is_protected) {