diff options
author | Sean McBride <sean@rogue-research.com> | 2021-03-05 14:51:01 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-03-05 14:51:01 (GMT) |
commit | 6794428d232236e1c4605e8ca0face915f01286b (patch) | |
tree | 0d5d5133bbb372ec53710649379e2de5c734d40f /test | |
parent | f4e87791e1543d672dba07f7211cc01509b940b6 (diff) | |
download | hdf5-6794428d232236e1c4605e8ca0face915f01286b.zip hdf5-6794428d232236e1c4605e8ca0face915f01286b.tar.gz hdf5-6794428d232236e1c4605e8ca0face915f01286b.tar.bz2 |
Fixed clang-tidy readability-redundant-control-flow warnings (#428)
* Fixed clang-tidy readability-redundant-control-flow warnings
Just removed useless trailing return statements.
* Removed blank lines from h5diffgentest.c with clang-format v10.0.1.
Co-authored-by: Larry Knox <lrknox@hdfgroup.org>
Diffstat (limited to 'test')
-rw-r--r-- | test/cache.c | 34 | ||||
-rw-r--r-- | test/cache_common.c | 60 | ||||
-rw-r--r-- | test/cache_image.c | 10 | ||||
-rw-r--r-- | test/genall5.c | 25 | ||||
-rw-r--r-- | test/h5test.c | 8 | ||||
-rw-r--r-- | test/set_extent.c | 2 | ||||
-rw-r--r-- | test/tarray.c | 1 | ||||
-rw-r--r-- | test/tmisc.c | 3 | ||||
-rw-r--r-- | test/ttsafe.c | 2 | ||||
-rw-r--r-- | test/tvlstr.c | 6 |
10 files changed, 0 insertions, 151 deletions
diff --git a/test/cache.c b/test/cache.c index b88b30e..3f2a404 100644 --- a/test/cache.c +++ b/test/cache.c @@ -3210,8 +3210,6 @@ check_flush_cache__empty_cache(H5F_t *file_ptr) "flush with flags = 0x10 failed on empty cache.\n") } - return; - } /* check_flush_cache__empty_cache() */ /*------------------------------------------------------------------------- @@ -4413,8 +4411,6 @@ check_flush_cache__multi_entry(H5F_t *file_ptr) check_flush_cache__pe_multi_entry_test(file_ptr, test_num, flush_flags, spec_size, spec); } - return; - } /* check_flush_cache__multi_entry() */ /*------------------------------------------------------------------------- @@ -4599,8 +4595,6 @@ check_flush_cache__multi_entry_test(H5F_t *file_ptr, int test_num, unsigned int u++; } - return; - } /* check_flush_cache__multi_entry_test() */ /*------------------------------------------------------------------------- @@ -4794,8 +4788,6 @@ check_flush_cache__pe_multi_entry_test(H5F_t *file_ptr, int test_num, unsigned i u++; } - return; - } /* check_flush_cache__pe_multi_entry_test() */ /*------------------------------------------------------------------------- @@ -7991,8 +7983,6 @@ check_flush_cache__flush_ops(H5F_t *file_ptr) /* finally finish up with the flush ops eviction test */ check_flush_cache__flush_op_eviction_test(file_ptr); - return; - } /* check_flush_cache__flush_ops() */ /*------------------------------------------------------------------------- @@ -8394,8 +8384,6 @@ check_flush_cache__flush_op_test(H5F_t *file_ptr, int test_num, unsigned int flu i++; } - return; - } /* check_flush_cache__flush_op_test() */ /*------------------------------------------------------------------------- @@ -10546,8 +10534,6 @@ check_flush_cache__flush_op_eviction_test(H5F_t *file_ptr) reset_entries(); } - return; - } /* check_flush_cache__flush_op_eviction_test() */ /*------------------------------------------------------------------------- @@ -12171,8 +12157,6 @@ check_flush_cache__single_entry(H5F_t *file_ptr) } } - return; - } /* check_flush_cache__single_entry() */ /*------------------------------------------------------------------------- @@ -12312,8 +12296,6 @@ check_flush_cache__single_entry_test(H5F_t *file_ptr, int test_num, int entry_ty } } - return; - } /* check_flush_cache__single_entry_test() */ /*------------------------------------------------------------------------- @@ -12489,8 +12471,6 @@ check_flush_cache__pinned_single_entry_test(H5F_t *file_ptr, int test_num, int e } } - return; - } /* check_flush_cache__pinned_single_entry_test() */ /*------------------------------------------------------------------------- @@ -13639,8 +13619,6 @@ check_move_entry__run_test(H5F_t *file_ptr, unsigned test_num, struct move_entry /* put the entry back where it started from */ move_entry(cache_ptr, spec_ptr->entry_type, spec_ptr->entry_index, TRUE); - return; - } /* check_move_entry__run_test() */ /*------------------------------------------------------------------------- @@ -33880,8 +33858,6 @@ cedds__expunge_dirty_entry_in_flush_test(H5F_t *file_ptr) /* reset cache min clean size to its expected value */ cache_ptr->min_clean_size = (1 * 1024 * 1024); - return; - } /* cedds__expunge_dirty_entry_in_flush_test() */ /*------------------------------------------------------------------------- @@ -34240,8 +34216,6 @@ cedds__H5C_make_space_in_cache(H5F_t *file_ptr) /* reset cache min clean size to its expected value */ cache_ptr->min_clean_size = (1 * 1024 * 1024); - return; - } /* cedds__H5C_make_space_in_cache() */ /*------------------------------------------------------------------------- @@ -34638,8 +34612,6 @@ cedds__H5C__autoadjust__ageout__evict_aged_out_entries(H5F_t *file_ptr) /* reset cache min clean size to its expected value */ cache_ptr->min_clean_size = (1 * 1024 * 1024); - return; - } /* cedds__H5C__autoadjust__ageout__evict_aged_out_entries() */ /*------------------------------------------------------------------------- @@ -35016,8 +34988,6 @@ cedds__H5C_flush_invalidate_cache__bucket_scan(H5F_t *file_ptr) /* reset cache min clean size to its expected value */ cache_ptr->min_clean_size = (1 * 1024 * 1024); - return; - } /* cedds__H5C_flush_invalidate_cache__bucket_scan() */ /*------------------------------------------------------------------------- @@ -35480,8 +35450,6 @@ check_stats__smoke_check_1(H5F_t *file_ptr) /* reset cache min clean size to its expected value */ cache_ptr->min_clean_size = (1 * 1024 * 1024); - return; - } /* check_stats__smoke_check_1() */ #endif /* H5C_COLLECT_CACHE_STATS */ @@ -35889,8 +35857,6 @@ takedown_cache(H5F_t *file_ptr, hbool_t dump_stats, hbool_t dump_detailed_stats) } } - return; - } /* takedown_cache() */ /*------------------------------------------------------------------------- diff --git a/test/cache_common.c b/test/cache_common.c index 0d6136e..54b1cc5 100644 --- a/test/cache_common.c +++ b/test/cache_common.c @@ -434,8 +434,6 @@ addr_to_type_and_index(haddr_t addr, int32_t *type_ptr, int32_t *index_ptr) *type_ptr = type; *index_ptr = idx; - return; - } /* addr_to_type_and_index() */ /* Call back functions: */ @@ -1515,8 +1513,6 @@ add_flush_op(int target_type, int target_idx, int op_code, int type, int idx, hb (target_entry_ptr->flush_ops)[i].order_ptr = order_ptr; } - return; - } /* add_flush_op() */ /*------------------------------------------------------------------------- @@ -1586,8 +1582,6 @@ create_pinned_entry_dependency(H5F_t *file_ptr, int pinning_type, int pinning_id (pinned_entry_ptr->pinning_ref_count)++; } - return; - } /* create_pinned_entry_dependency() */ /*------------------------------------------------------------------------- @@ -1660,8 +1654,6 @@ dirty_entry(H5F_t *file_ptr, int32_t type, int32_t idx, hbool_t dirty_pin) } } - return; - } /* dirty_entry() */ /*------------------------------------------------------------------------- @@ -1805,8 +1797,6 @@ execute_flush_op(H5F_t *file_ptr, struct test_entry_t *entry_ptr, struct flush_o } } - return; - } /* execute_flush_op() */ /*------------------------------------------------------------------------- @@ -2032,8 +2022,6 @@ free_entry_arrays(void) HDfree(notify_entries); HDfree(orig_notify_entries); - return; - } /* free_entry_arrays() */ /*------------------------------------------------------------------------- @@ -2177,8 +2165,6 @@ reset_entries(void) } /* end for */ } /* end else */ - return; - } /* reset_entries() */ /*------------------------------------------------------------------------- @@ -2270,8 +2256,6 @@ resize_entry(H5F_t *file_ptr, int32_t type, int32_t idx, size_t new_size, hbool_ } } - return; - } /* resize_entry() */ /*------------------------------------------------------------------------- @@ -2323,8 +2307,6 @@ verify_clean(void) } } - return; - } /* verify_clean() */ /*------------------------------------------------------------------------- @@ -2621,8 +2603,6 @@ verify_entry_status(H5C_t *cache_ptr, int tag, int num_entries, struct expected_ i++; } /* while */ - return; - } /* verify_entry_status() */ /*------------------------------------------------------------------------- @@ -2676,8 +2656,6 @@ verify_unprotected(void) } } - return; - } /* verify_unprotected() */ /*------------------------------------------------------------------------- @@ -2741,8 +2719,6 @@ expunge_entry(H5F_t *file_ptr, int32_t type, int32_t idx) } } - return; - } /* expunge_entry() */ /*------------------------------------------------------------------------- @@ -2816,8 +2792,6 @@ flush_cache(H5F_t *file_ptr, hbool_t destroy_entries, hbool_t dump_stats, hbool_ } } - return; - } /* flush_cache() */ /*------------------------------------------------------------------------- @@ -2985,8 +2959,6 @@ insert_entry(H5F_t *file_ptr, int32_t type, int32_t idx, unsigned int flags) HDassert(((entry_ptr->header).type)->id == type); } /* end if */ - return; - } /* insert_entry() */ /*------------------------------------------------------------------------- @@ -3046,8 +3018,6 @@ mark_entry_dirty(int32_t type, int32_t idx) HDassert(((entry_ptr->header).type)->id == type); } - return; - } /* mark_entry_dirty() */ /*------------------------------------------------------------------------- @@ -3146,8 +3116,6 @@ move_entry(H5C_t *cache_ptr, int32_t type, int32_t idx, hbool_t main_addr) HDassert(entry_ptr->is_dirty); } - return; - } /* move_entry() */ /*------------------------------------------------------------------------- @@ -3314,8 +3282,6 @@ protect_entry_ro(H5F_t *file_ptr, int32_t type, int32_t idx) HDassert(((entry_ptr->header).type)->id == type); } - return; - } /* protect_entry_ro() */ /*------------------------------------------------------------------------- @@ -3372,8 +3338,6 @@ pin_entry(int32_t type, int32_t idx) } } /* end if */ - return; - } /* pin_entry() */ /*------------------------------------------------------------------------- @@ -3431,8 +3395,6 @@ unpin_entry(int32_t type, int32_t idx) HDassert(((entry_ptr->header).type)->id == type); } - return; - } /* unpin_entry() */ /*------------------------------------------------------------------------- @@ -3542,8 +3504,6 @@ unprotect_entry(H5F_t *file_ptr, int32_t type, int32_t idx, unsigned int flags) HDassert(entry_ptr->header.ro_ref_count == entry_ptr->ro_ref_count); } - return; - } /* unprotect_entry() */ /*------------------------------------------------------------------------- @@ -3972,8 +3932,6 @@ hl_row_major_scan_forward(H5F_t *file_ptr, int32_t max_index, hbool_t verbose, h H5C_stats(cache_ptr, "test cache", display_detailed_stats); } - return; - } /* hl_row_major_scan_forward() */ /*------------------------------------------------------------------------- @@ -4234,8 +4192,6 @@ row_major_scan_backward(H5F_t *file_ptr, int32_t max_index, int32_t lag, hbool_t H5C_stats(cache_ptr, "test cache", display_detailed_stats); } - return; - } /* row_major_scan_backward() */ /*------------------------------------------------------------------------- @@ -4328,8 +4284,6 @@ hl_row_major_scan_backward(H5F_t *file_ptr, int32_t max_index, hbool_t verbose, H5C_stats(cache_ptr, "test cache", display_detailed_stats); } - return; - } /* hl_row_major_scan_backward() */ /*------------------------------------------------------------------------- @@ -4422,8 +4376,6 @@ col_major_scan_forward(H5F_t *file_ptr, int32_t max_index, int32_t lag, hbool_t H5C_stats(cache_ptr, "test cache", display_detailed_stats); } - return; - } /* col_major_scan_forward() */ /*------------------------------------------------------------------------- @@ -4527,8 +4479,6 @@ hl_col_major_scan_forward(H5F_t *file_ptr, int32_t max_index, hbool_t verbose, h H5C_stats(cache_ptr, "test cache", display_detailed_stats); } - return; - } /* hl_col_major_scan_forward() */ /*------------------------------------------------------------------------- @@ -4633,8 +4583,6 @@ col_major_scan_backward(H5F_t *file_ptr, int32_t max_index, int32_t lag, hbool_t if (verbose) HDfprintf(stdout, "%s: exiting.\n", FUNC); - return; - } /* col_major_scan_backward() */ /*------------------------------------------------------------------------- @@ -4738,8 +4686,6 @@ hl_col_major_scan_backward(H5F_t *file_ptr, int32_t max_index, hbool_t verbose, H5C_stats(cache_ptr, "test cache", display_detailed_stats); } - return; - } /* hl_col_major_scan_backward() */ /*------------------------------------------------------------------------- @@ -5108,8 +5054,6 @@ check_and_validate_cache_hit_rate(hid_t file_id, double *hit_rate_ptr, hbool_t d failure_mssg = "Unexpectedly low hit rate."; } - return; - } /* check_and_validate_cache_hit_rate() */ /*------------------------------------------------------------------------- @@ -5227,8 +5171,6 @@ check_and_validate_cache_size(hid_t file_id, size_t *max_size_ptr, size_t *min_c (long)min_clean_size, (long)cur_size, (long)cur_num_entries); } - return; - } /* check_and_validate_cache_size() */ H5_ATTR_PURE hbool_t @@ -5389,8 +5331,6 @@ validate_mdc_config(hid_t file_id, H5AC_cache_config_t *ext_config_ptr, hbool_t } } - return; - } /* validate_mdc_config() */ #if 0 /* debugging functions -- normally commented out */ diff --git a/test/cache_image.c b/test/cache_image.c index ecb8c05..9c8f855 100644 --- a/test/cache_image.c +++ b/test/cache_image.c @@ -387,8 +387,6 @@ create_datasets(hid_t file_id, int min_dset, int max_dset) } } - return; - } /* create_datasets() */ /*------------------------------------------------------------------------- @@ -460,8 +458,6 @@ delete_datasets(hid_t file_id, int min_dset, int max_dset) if (show_progress) HDfprintf(stdout, "%s: cp = %d.\n", fcn_name, cp++); - return; - } /* delete_datasets() */ /*------------------------------------------------------------------------- @@ -850,8 +846,6 @@ open_hdf5_file(hbool_t create_file, hbool_t mdci_sbem_expected, hbool_t read_onl if (show_progress) HDfprintf(stdout, "%s: cp = %d -- exiting.\n", fcn_name, cp++); - return; - } /* open_hdf5_file() */ /*------------------------------------------------------------------------- @@ -960,8 +954,6 @@ attempt_swmr_open_hdf5_file(const hbool_t create_file, const hbool_t set_mdci_fa if (show_progress) HDfprintf(stdout, "%s: cp = %d.\n", fcn_name, cp++); - return; - } /* attempt_swmr_open_hdf5_file() */ /*------------------------------------------------------------------------- @@ -1199,8 +1191,6 @@ verify_datasets(hid_t file_id, int min_dset, int max_dset) } } - return; - } /* verify_datasets() */ /****************************************************************************/ diff --git a/test/genall5.c b/test/genall5.c index b5ff862..a6331f6 100644 --- a/test/genall5.c +++ b/test/genall5.c @@ -103,8 +103,6 @@ ns_grp_0(hid_t fid, const char *group_name) HDassert(ret >= 0); } - return; - } /* ns_grp_0 */ /*------------------------------------------------------------------------- @@ -222,7 +220,6 @@ vrfy_ns_grp_0(hid_t fid, const char *group_name) HDassert(ret >= 0); } - return; } /* vrfy_ns_grp_0() */ /*------------------------------------------------------------------------- @@ -363,8 +360,6 @@ ns_grp_c(hid_t fid, const char *group_name, unsigned nlinks) HDassert(ret >= 0); } - return; - } /* ns_grp_c() */ /*------------------------------------------------------------------------- @@ -640,7 +635,6 @@ vrfy_ns_grp_c(hid_t fid, const char *group_name, unsigned nlinks) HDassert(ret >= 0); } - return; } /* vrfy_ns_grp_c() */ /*------------------------------------------------------------------------- @@ -776,7 +770,6 @@ ns_grp_d(hid_t fid, const char *group_name, unsigned nlinks) HDassert(ret >= 0); } - return; } /* ns_grp_d() */ /*------------------------------------------------------------------------- @@ -1050,8 +1043,6 @@ vrfy_ns_grp_d(hid_t fid, const char *group_name, unsigned nlinks) HDassert(ret >= 0); } - return; - } /* vrfy_ns_grp_d() */ /*------------------------------------------------------------------------- @@ -1140,7 +1131,6 @@ os_grp_0(hid_t fid, const char *group_name) } } - return; } /* os_grp_0() */ /*------------------------------------------------------------------------- @@ -1257,7 +1247,6 @@ vrfy_os_grp_0(hid_t fid, const char *group_name) HDassert(ret >= 0); } - return; } /* vrfy_os_grp_0() */ /*------------------------------------------------------------------------- @@ -1377,7 +1366,6 @@ os_grp_n(hid_t fid, const char *group_name, int proc_num, unsigned nlinks) } } - return; } /* os_grp_n() */ /*------------------------------------------------------------------------- @@ -1603,7 +1591,6 @@ vrfy_os_grp_n(hid_t fid, const char *group_name, int proc_num, unsigned nlinks) HDassert(ret >= 0); } - return; } /* vrfy_os_grp_n() */ /*------------------------------------------------------------------------- @@ -1700,7 +1687,6 @@ ds_ctg_i(hid_t fid, const char *dset_name, hbool_t write_data) HDassert(ret >= 0); } - return; } /* ds_ctg_i */ /*------------------------------------------------------------------------- @@ -1919,8 +1905,6 @@ vrfy_ds_ctg_i(hid_t fid, const char *dset_name, hbool_t write_data) HDassert(ret >= 0); } - return; - } /* vrfy_ds_ctg_i() */ /*------------------------------------------------------------------------- @@ -2047,7 +2031,6 @@ ds_chk_i(hid_t fid, const char *dset_name, hbool_t write_data) HDassert(ret >= 0); } - return; } /* ds_chk_i */ /*------------------------------------------------------------------------- @@ -2281,7 +2264,6 @@ vrfy_ds_chk_i(hid_t fid, const char *dset_name, hbool_t write_data) HDassert(ret >= 0); } - return; } /* vrfy_ds_chk_i() */ /*------------------------------------------------------------------------- @@ -2409,8 +2391,6 @@ ds_cpt_i(hid_t fid, const char *dset_name, hbool_t write_data) HDassert(ret >= 0); } - return; - } /* ds_cpt_i() */ /*------------------------------------------------------------------------- @@ -2624,7 +2604,6 @@ vrfy_ds_cpt_i(hid_t fid, const char *dset_name, hbool_t write_data) HDassert(ret >= 0); } - return; } /* vrfy_ds_cpt_i() */ /*------------------------------------------------------------------------- @@ -2773,7 +2752,6 @@ ds_ctg_v(hid_t fid, const char *dset_name, hbool_t write_data) HDassert(ret >= 0); } - return; } /* ds_ctg_v() */ /*------------------------------------------------------------------------- @@ -3038,7 +3016,6 @@ vrfy_ds_ctg_v(hid_t fid, const char *dset_name, hbool_t write_data) HDassert(ret >= 0); } - return; } /* vrfy_ds_ctg_v() */ /*------------------------------------------------------------------------- @@ -3266,7 +3243,6 @@ create_zoo(hid_t fid, const char *base_path, int proc_num) vrfy_ds_ctg_v(fid, full_path, TRUE); } - return; } /* create_zoo() */ /*------------------------------------------------------------------------- @@ -3414,5 +3390,4 @@ validate_zoo(hid_t fid, const char *base_path, int proc_num) vrfy_ds_ctg_v(fid, full_path, TRUE); } - return; } /* validate_zoo() */ diff --git a/test/h5test.c b/test/h5test.c index 49df75ef..6526c94 100644 --- a/test/h5test.c +++ b/test/h5test.c @@ -171,8 +171,6 @@ h5_clean_files(const char *base_name[], hid_t fapl) /* Close the FAPL used to access the file */ H5Pclose(fapl); - - return; } /* end h5_clean_files() */ /*------------------------------------------------------------------------- @@ -249,7 +247,6 @@ h5_delete_test_file(const char *base_name, hid_t fapl) HDremove(filename); } /* end driver selection tree */ - return; } /* end h5_delete_test_file() */ H5_GCC_DIAG_ON("format-nonliteral") @@ -282,7 +279,6 @@ h5_delete_all_test_files(const char *base_name[], hid_t fapl) h5_delete_test_file(base_name[i], fapl); } /* end for */ - return; } /* end h5_delete_all_test_files() */ /*------------------------------------------------------------------------- @@ -341,8 +337,6 @@ h5_test_shutdown(void) /* Restore the original error reporting routine */ h5_restore_err(); - - return; } /* end h5_test_shutdown() */ /*------------------------------------------------------------------------- @@ -449,8 +443,6 @@ h5_test_init(void) HDassert(err_func == NULL); H5Eget_auto2(H5E_DEFAULT, &err_func, NULL); H5Eset_auto2(H5E_DEFAULT, h5_errors, NULL); - - return; } /* end h5_test_init() */ /*------------------------------------------------------------------------- diff --git a/test/set_extent.c b/test/set_extent.c index 31fc5d9..6d639ad 100644 --- a/test/set_extent.c +++ b/test/set_extent.c @@ -2677,6 +2677,4 @@ test_random_rank4_dump(unsigned ndim_sets, hsize_t dim_log[][4], hsize_t cdims[4 (unsigned)dim_log[i][1], (unsigned)dim_log[i][2], (unsigned)dim_log[i][3]); if (j >= 0) HDprintf(" First incorrect value read: ( %d, %d, %d, %d )\n", j, k, l, m); - - return; } /* end test_random_rank4_dump */ diff --git a/test/tarray.c b/test/tarray.c index 089360d..0ea86e22 100644 --- a/test/tarray.c +++ b/test/tarray.c @@ -1087,7 +1087,6 @@ test_array_free_custom(void *_mem, void *info) HDfree(mem); } /* end if */ - return; } /* end test_array_free_custom() */ /*------------------------------------------------------------------------- diff --git a/test/tmisc.c b/test/tmisc.c index 68fa06a..99cce68 100644 --- a/test/tmisc.c +++ b/test/tmisc.c @@ -517,7 +517,6 @@ test_misc2_write_attribute(void) HDfree(string_att1); HDfree(string_att2); - return; } static void @@ -563,8 +562,6 @@ test_misc2_read_attribute(const char *filename, const char *att_name) ret = H5Fclose(file); CHECK(ret, FAIL, "H5Fclose"); - - return; } /**************************************************************** ** diff --git a/test/ttsafe.c b/test/ttsafe.c index 7b9a375..067a715 100644 --- a/test/ttsafe.c +++ b/test/ttsafe.c @@ -70,8 +70,6 @@ tts_is_threadsafe(void) if (is_ts != should_be) TestErrPrintf("Thread-safety value incorrect - test failed\n"); - - return; } /* Routine to generate attribute names for numeric values */ diff --git a/test/tvlstr.c b/test/tvlstr.c index 77b55a3..0503e62 100644 --- a/test/tvlstr.c +++ b/test/tvlstr.c @@ -659,8 +659,6 @@ test_write_vl_string_attribute(void) ret = H5Fclose(file); CHECK(ret, FAIL, "H5Fclose"); - - return; } /**************************************************************** @@ -739,8 +737,6 @@ test_read_vl_string_attribute(void) ret = H5Fclose(file); CHECK(ret, FAIL, "H5Fclose"); - - return; } /* Helper routine for test_vl_rewrite() */ @@ -864,8 +860,6 @@ test_vl_rewrite(void) ret = H5Fclose(file2); CHECK(ret, FAIL, "H5Fclose"); - - return; } /* end test_vl_rewrite() */ /**************************************************************** |