Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge Fixes the last of the -Wextra-semi-stmt warnings #3326 #3338

Merged
merged 1 commit into from
Aug 3, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion doc/getting-started-with-hdf5-development.md
Original file line number Diff line number Diff line change
Expand Up @@ -713,7 +713,7 @@ error:
{
H5Fclose(fid);
}
H5E_END_TRY;
H5E_END_TRY

return FAIL;
}
Expand Down
40 changes: 20 additions & 20 deletions src/H5Cpkg.h
Original file line number Diff line number Diff line change
Expand Up @@ -531,26 +531,26 @@ do { \

#else /* H5C_COLLECT_CACHE_STATS */

#define H5C__RESET_CACHE_ENTRY_STATS(entry_ptr)
#define H5C__UPDATE_STATS_FOR_DIRTY_PIN(cache_ptr, entry_ptr) {}
#define H5C__UPDATE_STATS_FOR_UNPROTECT(cache_ptr)
#define H5C__UPDATE_STATS_FOR_MOVE(cache_ptr, entry_ptr)
#define H5C__UPDATE_STATS_FOR_ENTRY_SIZE_CHANGE(cache_ptr, entry_ptr, new_size)
#define H5C__UPDATE_STATS_FOR_HT_INSERTION(cache_ptr)
#define H5C__UPDATE_STATS_FOR_HT_DELETION(cache_ptr)
#define H5C__UPDATE_STATS_FOR_HT_SEARCH(cache_ptr, success, depth)
#define H5C__UPDATE_STATS_FOR_INSERTION(cache_ptr, entry_ptr)
#define H5C__UPDATE_STATS_FOR_CLEAR(cache_ptr, entry_ptr) {}
#define H5C__UPDATE_STATS_FOR_FLUSH(cache_ptr, entry_ptr)
#define H5C__UPDATE_STATS_FOR_EVICTION(cache_ptr, entry_ptr, take_ownership)
#define H5C__UPDATE_STATS_FOR_PROTECT(cache_ptr, entry_ptr, hit)
#define H5C__UPDATE_STATS_FOR_PIN(cache_ptr, entry_ptr)
#define H5C__UPDATE_STATS_FOR_UNPIN(cache_ptr, entry_ptr)
#define H5C__UPDATE_STATS_FOR_PREFETCH(cache_ptr, dirty)
#define H5C__UPDATE_STATS_FOR_PREFETCH_HIT(cache_ptr)
#define H5C__UPDATE_STATS_FOR_SLIST_SCAN_RESTART(cache_ptr)
#define H5C__UPDATE_STATS_FOR_LRU_SCAN_RESTART(cache_ptr)
#define H5C__UPDATE_STATS_FOR_INDEX_SCAN_RESTART(cache_ptr)
#define H5C__RESET_CACHE_ENTRY_STATS(entry_ptr) do {} while(0)
#define H5C__UPDATE_STATS_FOR_DIRTY_PIN(cache_ptr, entry_ptr) do {} while(0)
#define H5C__UPDATE_STATS_FOR_UNPROTECT(cache_ptr) do {} while(0)
#define H5C__UPDATE_STATS_FOR_MOVE(cache_ptr, entry_ptr) do {} while(0)
#define H5C__UPDATE_STATS_FOR_ENTRY_SIZE_CHANGE(cache_ptr, entry_ptr, new_size) do {} while(0)
#define H5C__UPDATE_STATS_FOR_HT_INSERTION(cache_ptr) do {} while(0)
#define H5C__UPDATE_STATS_FOR_HT_DELETION(cache_ptr) do {} while(0)
#define H5C__UPDATE_STATS_FOR_HT_SEARCH(cache_ptr, success, depth) do {} while(0)
#define H5C__UPDATE_STATS_FOR_INSERTION(cache_ptr, entry_ptr) do {} while(0)
#define H5C__UPDATE_STATS_FOR_CLEAR(cache_ptr, entry_ptr) do {} while(0)
#define H5C__UPDATE_STATS_FOR_FLUSH(cache_ptr, entry_ptr) do {} while(0)
#define H5C__UPDATE_STATS_FOR_EVICTION(cache_ptr, entry_ptr, take_ownership) do {} while(0)
#define H5C__UPDATE_STATS_FOR_PROTECT(cache_ptr, entry_ptr, hit) do {} while(0)
#define H5C__UPDATE_STATS_FOR_PIN(cache_ptr, entry_ptr) do {} while(0)
#define H5C__UPDATE_STATS_FOR_UNPIN(cache_ptr, entry_ptr) do {} while(0)
#define H5C__UPDATE_STATS_FOR_PREFETCH(cache_ptr, dirty) do {} while(0)
#define H5C__UPDATE_STATS_FOR_PREFETCH_HIT(cache_ptr) do {} while(0)
#define H5C__UPDATE_STATS_FOR_SLIST_SCAN_RESTART(cache_ptr) do {} while(0)
#define H5C__UPDATE_STATS_FOR_LRU_SCAN_RESTART(cache_ptr) do {} while(0)
#define H5C__UPDATE_STATS_FOR_INDEX_SCAN_RESTART(cache_ptr) do {} while(0)

#endif /* H5C_COLLECT_CACHE_STATS */

Expand Down
4 changes: 2 additions & 2 deletions src/H5Epublic.h
Original file line number Diff line number Diff line change
Expand Up @@ -149,10 +149,10 @@ H5_DLLVAR hid_t H5E_ERR_CLS_g;
* And goto a label after pushing error onto stack.
*/
#define H5Epush_goto(func, cls, maj, min, str, label) \
{ \
do { \
H5Epush2(H5E_DEFAULT, __FILE__, func, __LINE__, cls, maj, min, str); \
goto label; \
}
} while (0)

/**
* Error stack traversal direction
Expand Down
12 changes: 6 additions & 6 deletions src/H5FDmulti.c
Original file line number Diff line number Diff line change
Expand Up @@ -1115,11 +1115,11 @@ H5FD_multi_open(const char *name, unsigned flags, hid_t fapl_id, haddr_t maxaddr
close_fapl = fapl_id = H5Pcreate(H5P_FILE_ACCESS);
if (env && !strcmp(env, "split")) {
if (H5Pset_fapl_split(fapl_id, NULL, H5P_DEFAULT, NULL, H5P_DEFAULT) < 0)
H5Epush_goto(func, H5E_ERR_CLS, H5E_FILE, H5E_CANTSET, "can't set property value", error)
H5Epush_goto(func, H5E_ERR_CLS, H5E_FILE, H5E_CANTSET, "can't set property value", error);
}
else {
if (H5Pset_fapl_multi(fapl_id, NULL, NULL, NULL, NULL, TRUE) < 0)
H5Epush_goto(func, H5E_ERR_CLS, H5E_FILE, H5E_CANTSET, "can't set property value", error)
H5Epush_goto(func, H5E_ERR_CLS, H5E_FILE, H5E_CANTSET, "can't set property value", error);
}

fa = (const H5FD_multi_fapl_t *)H5Pget_driver_info(fapl_id);
Expand All @@ -1142,11 +1142,11 @@ H5FD_multi_open(const char *name, unsigned flags, hid_t fapl_id, haddr_t maxaddr
file->name = my_strdup(name);
if (close_fapl >= 0)
if (H5Pclose(close_fapl) < 0)
H5Epush_goto(func, H5E_ERR_CLS, H5E_FILE, H5E_CANTCLOSEOBJ, "can't close property list", error)
H5Epush_goto(func, H5E_ERR_CLS, H5E_FILE, H5E_CANTCLOSEOBJ, "can't close property list", error);

/* Compute derived properties and open member files */
if (compute_next(file) < 0) H5Epush_goto(func, H5E_ERR_CLS, H5E_INTERNAL, H5E_BADVALUE,
"compute_next() failed", error);
/* Compute derived properties and open member files */
if (compute_next(file) < 0)
H5Epush_goto(func, H5E_ERR_CLS, H5E_INTERNAL, H5E_BADVALUE, "compute_next() failed", error);
if (open_members(file) < 0)
H5Epush_goto(func, H5E_ERR_CLS, H5E_INTERNAL, H5E_BADVALUE, "open_members() failed", error);

Expand Down
2 changes: 1 addition & 1 deletion src/H5Fint.c
Original file line number Diff line number Diff line change
Expand Up @@ -1833,7 +1833,7 @@ H5F_open(const char *name, unsigned flags, hid_t fcpl_id, hid_t fapl_id)
{
lf = H5FD_open(name, tent_flags, fapl_id, HADDR_UNDEF);
}
H5E_END_TRY;
H5E_END_TRY
}

/*
Expand Down
26 changes: 13 additions & 13 deletions test/API/H5_api_async_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,7 @@ test_one_dataset_io(void)
H5ESwait(es_id, H5_API_TEST_WAIT_FOREVER, &num_in_progress, &op_failed);
H5ESclose(es_id);
}
H5E_END_TRY;
H5E_END_TRY

return 1;
} /* end test_one_dataset_io() */
Expand Down Expand Up @@ -564,7 +564,7 @@ test_multi_dataset_io(void)
H5ESwait(es_id, H5_API_TEST_WAIT_FOREVER, &num_in_progress, &op_failed);
H5ESclose(es_id);
}
H5E_END_TRY;
H5E_END_TRY

return 1;
} /* end test_multi_dataset_io() */
Expand Down Expand Up @@ -873,7 +873,7 @@ test_multi_file_dataset_io(void)
H5ESwait(es_id, H5_API_TEST_WAIT_FOREVER, &num_in_progress, &op_failed);
H5ESclose(es_id);
}
H5E_END_TRY;
H5E_END_TRY

return 1;
} /* end test_multi_file_dataset_io() */
Expand Down Expand Up @@ -1182,7 +1182,7 @@ test_multi_file_grp_dset_io(void)
H5ESwait(es_id, H5_API_TEST_WAIT_FOREVER, &num_in_progress, &op_failed);
H5ESclose(es_id);
}
H5E_END_TRY;
H5E_END_TRY

return 1;
} /* end test_multi_file_grp_dset_io() */
Expand Down Expand Up @@ -1396,7 +1396,7 @@ test_set_extent(void)
H5ESwait(es_id, H5_API_TEST_WAIT_FOREVER, &num_in_progress, &op_failed);
H5ESclose(es_id);
}
H5E_END_TRY;
H5E_END_TRY

return 1;
} /* end test_set_extent() */
Expand Down Expand Up @@ -1516,7 +1516,7 @@ test_attribute_exists(void)
H5ESwait(es_id, H5_API_TEST_WAIT_FOREVER, &num_in_progress, &op_failed);
H5ESclose(es_id);
}
H5E_END_TRY;
H5E_END_TRY

return 1;
} /* end test_attribute_io() */
Expand Down Expand Up @@ -1659,7 +1659,7 @@ test_attribute_io(void)
H5ESwait(es_id, H5_API_TEST_WAIT_FOREVER, &num_in_progress, &op_failed);
H5ESclose(es_id);
}
H5E_END_TRY;
H5E_END_TRY

return 1;
} /* end test_attribute_io() */
Expand Down Expand Up @@ -1794,7 +1794,7 @@ test_attribute_io_tconv(void)
H5ESwait(es_id, H5_API_TEST_WAIT_FOREVER, &num_in_progress, &op_failed);
H5ESclose(es_id);
}
H5E_END_TRY;
H5E_END_TRY

return 1;
} /* end test_attribute_io_tconv() */
Expand Down Expand Up @@ -2110,7 +2110,7 @@ test_attribute_io_compound(void)
H5ESwait(es_id, H5_API_TEST_WAIT_FOREVER, &num_in_progress, &op_failed);
H5ESclose(es_id);
}
H5E_END_TRY;
H5E_END_TRY

return 1;
} /* end test_attribute_io_compound() */
Expand Down Expand Up @@ -2277,7 +2277,7 @@ test_group(void)
H5ESwait(es_id, H5_API_TEST_WAIT_FOREVER, &num_in_progress, &op_failed);
H5ESclose(es_id);
}
H5E_END_TRY;
H5E_END_TRY

return 1;
} /* end test_group() */
Expand Down Expand Up @@ -2474,7 +2474,7 @@ test_link(void)
H5ESwait(es_id, H5_API_TEST_WAIT_FOREVER, &num_in_progress, &op_failed);
H5ESclose(es_id);
}
H5E_END_TRY;
H5E_END_TRY

return 1;
} /* end test_link() */
Expand Down Expand Up @@ -2589,7 +2589,7 @@ test_ocopy_orefresh(void)
H5ESwait(es_id, H5_API_TEST_WAIT_FOREVER, &num_in_progress, &op_failed);
H5ESclose(es_id);
}
H5E_END_TRY;
H5E_END_TRY

return 1;
} /* end test_ocopy_orefresh() */
Expand Down Expand Up @@ -2660,7 +2660,7 @@ test_file_reopen(void)
H5ESwait(es_id, H5_API_TEST_WAIT_FOREVER, &num_in_progress, &op_failed);
H5ESclose(es_id);
}
H5E_END_TRY;
H5E_END_TRY

return 1;
} /* end test_file_reopen() */
Expand Down
Loading