summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Young <dyoung@hdfgroup.org>2020-05-18 17:46:33 (GMT)
committerDavid Young <dyoung@hdfgroup.org>2020-05-20 14:37:20 (GMT)
commit0103e8f1e0105cf44e1e34b61e24365b392cbeff (patch)
tree399379aa9284beb647644855ca6a92dad752d5a5
parent13bbc96261fea33d652deac567c0d822afc8aaa3 (diff)
downloadhdf5-0103e8f1e0105cf44e1e34b61e24365b392cbeff.zip
hdf5-0103e8f1e0105cf44e1e34b61e24365b392cbeff.tar.gz
hdf5-0103e8f1e0105cf44e1e34b61e24365b392cbeff.tar.bz2
Move declarations before statements, ugh.
-rw-r--r--src/H5Fvfd_swmr.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/H5Fvfd_swmr.c b/src/H5Fvfd_swmr.c
index 9760794..abb29ed 100644
--- a/src/H5Fvfd_swmr.c
+++ b/src/H5Fvfd_swmr.c
@@ -1149,6 +1149,10 @@ H5F_vfd_swmr_reader_end_of_tick(H5F_t *f, bool entering_api)
f->shared->tick_num + f->shared->vfd_swmr_config.max_lag);
if ( tmp_tick_num != f->shared->tick_num ) {
+ const H5FD_vfd_swmr_idx_entry_t *new_mdf_idx;
+ const H5FD_vfd_swmr_idx_entry_t *old_mdf_idx;
+ uint32_t new_mdf_idx_entries_used;
+ uint32_t old_mdf_idx_entries_used;
/* swap the old and new metadata file indexes */
@@ -1196,12 +1200,10 @@ H5F_vfd_swmr_reader_end_of_tick(H5F_t *f, bool entering_api)
f->shared->mdf_idx_entries_used, f->shared->mdf_idx_len);
#endif /* JRM */
- const H5FD_vfd_swmr_idx_entry_t * const new_mdf_idx =
- f->shared->mdf_idx;
- const H5FD_vfd_swmr_idx_entry_t * const old_mdf_idx =
- f->shared->old_mdf_idx;
- const uint32_t new_mdf_idx_entries_used = f->shared->mdf_idx_entries_used;
- const uint32_t old_mdf_idx_entries_used = f->shared->old_mdf_idx_entries_used;
+ new_mdf_idx = f->shared->mdf_idx;
+ old_mdf_idx = f->shared->old_mdf_idx;
+ new_mdf_idx_entries_used = f->shared->mdf_idx_entries_used;
+ old_mdf_idx_entries_used = f->shared->old_mdf_idx_entries_used;
change = malloc(sizeof(change[0]) *
(old_mdf_idx_entries_used + new_mdf_idx_entries_used));