diff options
author | Sean McBride <sean@rogue-research.com> | 2023-07-18 15:35:05 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-07-18 15:35:05 (GMT) |
commit | 1903c4b1b0bd227b6713364792d241015b4edb5a (patch) | |
tree | 4ec8c69091b59707f28c6cea3ee3a0b158a80b73 /fortran | |
parent | aab497a6312a9d8434a7dc7b5a593713fc8fbce0 (diff) | |
download | hdf5-1903c4b1b0bd227b6713364792d241015b4edb5a.zip hdf5-1903c4b1b0bd227b6713364792d241015b4edb5a.tar.gz hdf5-1903c4b1b0bd227b6713364792d241015b4edb5a.tar.bz2 |
Fixed more warnings about extra semicolons (#3249)
* Require semi-colon after H5_CHECK_OVERFLOW calls
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
Diffstat (limited to 'fortran')
-rw-r--r-- | fortran/src/H5Af.c | 20 | ||||
-rw-r--r-- | fortran/src/H5Ef.c | 18 | ||||
-rw-r--r-- | fortran/src/H5Lf.c | 22 | ||||
-rw-r--r-- | fortran/src/H5Pf.c | 16 | ||||
-rw-r--r-- | fortran/src/H5Rf.c | 10 | ||||
-rw-r--r-- | fortran/src/H5Sf.c | 20 | ||||
-rw-r--r-- | fortran/test/t.c | 6 |
7 files changed, 56 insertions, 56 deletions
diff --git a/fortran/src/H5Af.c b/fortran/src/H5Af.c index ab4aa7a..9e27f87 100644 --- a/fortran/src/H5Af.c +++ b/fortran/src/H5Af.c @@ -220,14 +220,14 @@ h5adelete_by_idx_c(hid_t_f *loc_id, _fcd obj_name, size_t_f *obj_namelen, int_f * Convert FORTRAN name to C name */ if (NULL == (c_obj_name = HD5f2cstring(obj_name, (size_t)*obj_namelen))) - HGOTO_DONE(FAIL) + HGOTO_DONE(FAIL); /* * Call H5Adelete_by_name function. */ if (H5Adelete_by_idx((hid_t)*loc_id, c_obj_name, (H5_index_t)*idx_type, (H5_iter_order_t)*order, (hsize_t)*n, (hid_t)*lapl_id) < 0) - HGOTO_DONE(FAIL) + HGOTO_DONE(FAIL); done: if (c_obj_name) @@ -289,14 +289,14 @@ h5aget_name_by_idx_c(hid_t_f *loc_id, _fcd obj_name, size_t_f *obj_namelen, int_ * Convert FORTRAN name to C name */ if (NULL == (c_obj_name = HD5f2cstring(obj_name, (size_t)*obj_namelen))) - HGOTO_DONE(FAIL) + HGOTO_DONE(FAIL); /* * Allocate buffer to hold name of an attribute */ c_buf_size = (size_t)*size + 1; if (NULL == (c_buf = (char *)malloc(c_buf_size))) - HGOTO_DONE(FAIL) + HGOTO_DONE(FAIL); /* * Call H5Aget_name_by_idx function. @@ -304,7 +304,7 @@ h5aget_name_by_idx_c(hid_t_f *loc_id, _fcd obj_name, size_t_f *obj_namelen, int_ c_size = H5Aget_name_by_idx((hid_t)*loc_id, c_obj_name, (H5_index_t)*idx_type, (H5_iter_order_t)*order, (hsize_t)*n, c_buf, c_buf_size, (hid_t)*lapl_id); if (c_size < 0) - HGOTO_DONE(FAIL) + HGOTO_DONE(FAIL); /* * Convert C name to FORTRAN and place it in the given buffer @@ -415,14 +415,14 @@ h5aget_info_by_idx_c(hid_t_f *loc_id, _fcd obj_name, size_t_f *obj_namelen, int_ * Convert FORTRAN name to C name */ if (NULL == (c_obj_name = HD5f2cstring(obj_name, (size_t)*obj_namelen))) - HGOTO_DONE(FAIL) + HGOTO_DONE(FAIL); /* * Call H5Ainfo_by_idx function. */ if (H5Aget_info_by_idx((hid_t)*loc_id, c_obj_name, (H5_index_t)*idx_type, (H5_iter_order_t)*order, (hsize_t)*n, &ainfo, (hid_t)*lapl_id) < 0) - HGOTO_DONE(FAIL) + HGOTO_DONE(FAIL); /* Unpack the structure */ *corder_valid = 0; @@ -477,15 +477,15 @@ h5aget_info_by_name_c(hid_t_f *loc_id, _fcd obj_name, size_t_f *obj_namelen, _fc * Convert FORTRAN name to C name */ if (NULL == (c_obj_name = HD5f2cstring(obj_name, (size_t)*obj_namelen))) - HGOTO_DONE(FAIL) + HGOTO_DONE(FAIL); if (NULL == (c_attr_name = HD5f2cstring(attr_name, (size_t)*attr_namelen))) - HGOTO_DONE(FAIL) + HGOTO_DONE(FAIL); /* * Call H5Ainfo_by_name function. */ if (H5Aget_info_by_name((hid_t)*loc_id, c_obj_name, c_attr_name, &ainfo, (hid_t)*lapl_id) < 0) - HGOTO_DONE(FAIL) + HGOTO_DONE(FAIL); /* Unpack the structure */ *corder_valid = 0; diff --git a/fortran/src/H5Ef.c b/fortran/src/H5Ef.c index 7685a95..7e3a25f 100644 --- a/fortran/src/H5Ef.c +++ b/fortran/src/H5Ef.c @@ -43,7 +43,7 @@ h5eclear_c(hid_t_f *estack_id) * Call H5Eclear function. */ if (H5Eclear2((hid_t)*estack_id) < 0) - HGOTO_DONE(FAIL) + HGOTO_DONE(FAIL); done: return ret_value; @@ -72,15 +72,15 @@ h5eprint_c1(_fcd name, int_f *namelen) int_f ret_value = 0; if (NULL == (c_name = (char *)HD5f2cstring(name, (size_t)*namelen))) - HGOTO_DONE(FAIL) + HGOTO_DONE(FAIL); if (NULL == (file = fopen(c_name, "a"))) - HGOTO_DONE(FAIL) + HGOTO_DONE(FAIL); /* * Call H5Eprint2 function. */ if (H5Eprint2(H5E_DEFAULT, file) < 0) - HGOTO_DONE(FAIL) + HGOTO_DONE(FAIL); done: if (file) @@ -115,7 +115,7 @@ h5eprint_c2(void) * Call H5Eprint2 function. */ if (H5Eprint2(H5E_DEFAULT, NULL) < 0) - HGOTO_DONE(FAIL) + HGOTO_DONE(FAIL); done: return ret_value; @@ -147,7 +147,7 @@ h5eget_major_c(int_f *error_no, _fcd name, size_t_f *namelen) c_name = (char *)malloc(c_namelen + 1); if (!c_name) - HGOTO_DONE(FAIL) + HGOTO_DONE(FAIL); /* * Call H5Eget_msg function. @@ -155,7 +155,7 @@ h5eget_major_c(int_f *error_no, _fcd name, size_t_f *namelen) H5Eget_msg((hid_t)*error_no, NULL, c_name, c_namelen); HD5packFstring((char *)c_name, _fcdtocp(name), c_namelen); if (!strcmp(c_name, "Invalid major error number")) - HGOTO_DONE(FAIL) + HGOTO_DONE(FAIL); done: if (c_name) @@ -190,7 +190,7 @@ h5eget_minor_c(int_f *error_no, _fcd name, size_t_f *namelen) c_name = (char *)malloc(c_namelen + 1); if (!c_name) - HGOTO_DONE(FAIL) + HGOTO_DONE(FAIL); /* * Call H5Eget_msg function. @@ -198,7 +198,7 @@ h5eget_minor_c(int_f *error_no, _fcd name, size_t_f *namelen) H5Eget_msg((hid_t)*error_no, NULL, c_name, c_namelen); HD5packFstring((char *)c_name, _fcdtocp(name), c_namelen); if (!strcmp(c_name, "Invalid minor error number")) - HGOTO_DONE(FAIL) + HGOTO_DONE(FAIL); done: if (c_name) diff --git a/fortran/src/H5Lf.c b/fortran/src/H5Lf.c index 5982d4b..009f7e3 100644 --- a/fortran/src/H5Lf.c +++ b/fortran/src/H5Lf.c @@ -57,16 +57,16 @@ h5lcopy_c(hid_t_f *src_loc_id, _fcd src_name, size_t_f *src_namelen, hid_t_f *de * Convert FORTRAN name to C name */ if (NULL == (c_src_name = HD5f2cstring(src_name, (size_t)*src_namelen))) - HGOTO_DONE(FAIL) + HGOTO_DONE(FAIL); if (NULL == (c_dest_name = HD5f2cstring(dest_name, (size_t)*dest_namelen))) - HGOTO_DONE(FAIL) + HGOTO_DONE(FAIL); /* * Call H5Lcopy function. */ if (H5Lcopy((hid_t)*src_loc_id, c_src_name, (hid_t)*dest_loc_id, c_dest_name, (hid_t)*lcpl_id, (hid_t)*lapl_id) < 0) - HGOTO_DONE(FAIL) + HGOTO_DONE(FAIL); done: if (c_src_name) @@ -350,16 +350,16 @@ h5lmove_c(hid_t_f *src_loc_id, _fcd src_name, size_t_f *src_namelen, hid_t_f *de * Convert FORTRAN name to C name */ if (NULL == (c_src_name = HD5f2cstring(src_name, (size_t)*src_namelen))) - HGOTO_DONE(FAIL) + HGOTO_DONE(FAIL); if (NULL == (c_dest_name = HD5f2cstring(dest_name, (size_t)*dest_namelen))) - HGOTO_DONE(FAIL) + HGOTO_DONE(FAIL); /* * Call H5Lmove function. */ if (H5Lmove((hid_t)*src_loc_id, c_src_name, (hid_t)*dest_loc_id, c_dest_name, (hid_t)*lcpl_id, (hid_t)*lapl_id) < 0) - HGOTO_DONE(FAIL) + HGOTO_DONE(FAIL); done: if (c_src_name) @@ -407,7 +407,7 @@ h5lget_name_by_idx_c(hid_t_f *loc_id, _fcd group_name, size_t_f *group_namelen, * Convert FORTRAN name to C name */ if (NULL == (c_group_name = HD5f2cstring(group_name, (size_t)*group_namelen))) - HGOTO_DONE(FAIL) + HGOTO_DONE(FAIL); c_size = (size_t)*size + 1; @@ -415,12 +415,12 @@ h5lget_name_by_idx_c(hid_t_f *loc_id, _fcd group_name, size_t_f *group_namelen, * Allocate buffer to hold name of an attribute */ if (NULL == (c_name = (char *)malloc(c_size))) - HGOTO_DONE(FAIL) + HGOTO_DONE(FAIL); if ((c_size_link = H5Lget_name_by_idx((hid_t)*loc_id, c_group_name, (H5_index_t)*index_field, (H5_iter_order_t)*order, (hsize_t)*n, c_name, c_size, (hid_t)*lapl_id)) < 0) - HGOTO_DONE(FAIL) + HGOTO_DONE(FAIL); *size = (size_t_f)c_size_link; @@ -625,13 +625,13 @@ h5lget_val_c(hid_t_f *link_loc_id, _fcd link_name, size_t_f *link_namelen, size_ * Convert FORTRAN name to C name */ if (NULL == (c_link_name = HD5f2cstring(link_name, (size_t)*link_namelen))) - HGOTO_DONE(FAIL) + HGOTO_DONE(FAIL); /* * Call H5Lget_val */ if (H5Lget_val((hid_t)*link_loc_id, c_link_name, &linkval_buff, (size_t)*size, (hid_t)*lapl_id) < 0) - HGOTO_DONE(FAIL) + HGOTO_DONE(FAIL); done: if (c_link_name) diff --git a/fortran/src/H5Pf.c b/fortran/src/H5Pf.c index 917123f..0efd205 100644 --- a/fortran/src/H5Pf.c +++ b/fortran/src/H5Pf.c @@ -61,7 +61,7 @@ h5pcreate_c(hid_t_f *cls, hid_t_f *prp_id) c_prp_id = H5Pcreate((hid_t)*cls); if (c_prp_id < 0) - HGOTO_DONE(FAIL) + HGOTO_DONE(FAIL); *prp_id = (hid_t_f)c_prp_id; @@ -115,7 +115,7 @@ h5pcopy_c(hid_t_f *prp_id, hid_t_f *new_prp_id) c_new_prp_id = H5Pcopy((hid_t)*prp_id); if (c_new_prp_id < 0) - HGOTO_DONE(FAIL) + HGOTO_DONE(FAIL); *new_prp_id = (hid_t_f)c_new_prp_id; @@ -146,7 +146,7 @@ h5pequal_c(hid_t_f *plist1_id, hid_t_f *plist2_id, int_f *c_flag) c_c_flag = H5Pequal((hid_t)*plist1_id, (hid_t)*plist2_id); if (c_c_flag < 0) - HGOTO_DONE(FAIL) + HGOTO_DONE(FAIL); *c_flag = (int_f)c_c_flag; @@ -176,7 +176,7 @@ h5pget_class_c(hid_t_f *prp_id, hid_t_f *classtype) int_f ret_value = 0; if ((c_classtype = H5Pget_class((hid_t)*prp_id)) < 0) - HGOTO_DONE(FAIL) + HGOTO_DONE(FAIL); *classtype = (hid_t_f)c_classtype; @@ -4117,7 +4117,7 @@ h5pget_data_transform_c(hid_t_f *plist_id, _fcd expression, int_f *expression_le if (c_expression_len) { c_expression = (char *)malloc(c_expression_len); if (NULL == c_expression) - HGOTO_DONE(FAIL) + HGOTO_DONE(FAIL); } /* end if */ /* @@ -4125,7 +4125,7 @@ h5pget_data_transform_c(hid_t_f *plist_id, _fcd expression, int_f *expression_le */ ret = H5Pget_data_transform((hid_t)*plist_id, c_expression, c_expression_len); if (ret < 0) - HGOTO_DONE(FAIL) + HGOTO_DONE(FAIL); /* or strlen ? */ HD5packFstring(c_expression, _fcdtocp(expression), (size_t)*expression_len); @@ -4170,13 +4170,13 @@ h5pset_data_transform_c(hid_t_f *plist_id, _fcd expression, int_f *expression_le * Convert FORTRAN name to C name */ if (NULL == (c_expression = HD5f2cstring(expression, (size_t)*expression_len))) - HGOTO_DONE(FAIL) + HGOTO_DONE(FAIL); /* * Call H5Pset_data_transform function. */ if (H5Pset_data_transform((hid_t)*plist_id, c_expression) < 0) - HGOTO_DONE(FAIL) + HGOTO_DONE(FAIL); done: if (c_expression) diff --git a/fortran/src/H5Rf.c b/fortran/src/H5Rf.c index ad99418..d9ef5d0 100644 --- a/fortran/src/H5Rf.c +++ b/fortran/src/H5Rf.c @@ -50,13 +50,13 @@ h5rcreate_region_c(int_f *ref, hid_t_f *loc_id, _fcd name, int_f *namelen, hid_t * Convert FORTRAN name to C name */ if (NULL == (c_name = (char *)HD5f2cstring(name, (size_t)*namelen))) - HGOTO_DONE(FAIL) + HGOTO_DONE(FAIL); /* * Call H5Rcreate function. */ if (H5Rcreate(&ref_c, (hid_t)*loc_id, c_name, H5R_DATASET_REGION, (hid_t)*space_id) < 0) - HGOTO_DONE(FAIL) + HGOTO_DONE(FAIL); /* Copy the reference created */ memcpy(ref, &ref_c, H5R_DSET_REG_REF_BUF_SIZE); @@ -170,7 +170,7 @@ h5rget_region_region_c(hid_t_f *dset_id, int_f *ref, hid_t_f *space_id) * Call H5Rget_region function. */ if ((c_space_id = H5Rget_region((hid_t)*dset_id, H5R_DATASET_REGION, &ref_c)) < 0) - HGOTO_DONE(FAIL) + HGOTO_DONE(FAIL); /* Copy the dataspace ID */ *space_id = (hid_t_f)c_space_id; @@ -204,7 +204,7 @@ h5rget_region_ptr_c(hid_t_f *dset_id, void *ref, hid_t_f *space_id) * Call H5Rget_region function. */ if ((c_space_id = H5Rget_region((hid_t)*dset_id, H5R_DATASET_REGION, ref)) < 0) - HGOTO_DONE(FAIL) + HGOTO_DONE(FAIL); /* Copy the dataspace ID */ *space_id = (hid_t_f)c_space_id; @@ -240,7 +240,7 @@ h5rget_object_type_obj_c(hid_t_f *dset_id, haddr_t_f *ref, int_f *obj_type) * Call H5Rget_object_type function. */ if (H5Rget_obj_type2((hid_t)*dset_id, H5R_OBJECT, &ref_c, &c_obj_type) < 0) - HGOTO_DONE(FAIL) + HGOTO_DONE(FAIL); /* Copy the object type */ *obj_type = (int_f)c_obj_type; diff --git a/fortran/src/H5Sf.c b/fortran/src/H5Sf.c index e8524df..41616f8 100644 --- a/fortran/src/H5Sf.c +++ b/fortran/src/H5Sf.c @@ -57,7 +57,7 @@ h5screate_simple_c(int_f *rank, hsize_t_f *dims, hsize_t_f *maxdims, hid_t_f *sp c_space_id = H5Screate_simple(*rank, c_dims, c_maxdims); if (c_space_id < 0) - HGOTO_DONE(FAIL) + HGOTO_DONE(FAIL); *space_id = (hid_t_f)c_space_id; @@ -323,10 +323,10 @@ h5sget_select_bounds_c(hid_t_f *space_id, hsize_t_f *start, hsize_t_f *end) c_space_id = (hid_t)*space_id; rank = H5Sget_simple_extent_ndims(c_space_id); if (rank < 0) - HGOTO_DONE(FAIL) + HGOTO_DONE(FAIL); if (H5Sget_select_bounds(c_space_id, c_start, c_end) < 0) - HGOTO_DONE(FAIL) + HGOTO_DONE(FAIL); for (i = 0; i < rank; i++) { start[i] = (hsize_t_f)(c_start[rank - i - 1] + 1); @@ -644,7 +644,7 @@ h5soffset_simple_c(hid_t_f *space_id, hssize_t_f *offset) c_space_id = (hid_t)*space_id; rank = H5Sget_simple_extent_ndims(c_space_id); if (rank < 0) - HGOTO_DONE(FAIL) + HGOTO_DONE(FAIL); /* * Reverse dimensions due to C-FORTRAN storage order. @@ -653,7 +653,7 @@ h5soffset_simple_c(hid_t_f *space_id, hssize_t_f *offset) c_offset[i] = offset[rank - i - 1]; if (H5Soffset_simple(c_space_id, c_offset) < 0) - HGOTO_DONE(FAIL) + HGOTO_DONE(FAIL); done: return ret_value; @@ -693,7 +693,7 @@ h5sset_extent_simple_c(hid_t_f *space_id, int_f *rank, hsize_t_f *current_size, } /* end for */ if (H5Sset_extent_simple((hid_t)*space_id, (int)*rank, c_current_size, c_maximum_size) < 0) - HGOTO_DONE(FAIL) + HGOTO_DONE(FAIL); done: return ret_value; @@ -729,10 +729,10 @@ h5sget_simple_extent_dims_c(hid_t_f *space_id, hsize_t_f *dims, hsize_t_f *maxdi c_space_id = (hid_t)*space_id; rank = H5Sget_simple_extent_ndims(c_space_id); if (rank < 0) - HGOTO_DONE(FAIL) + HGOTO_DONE(FAIL); if (H5Sget_simple_extent_dims(c_space_id, c_dims, c_maxdims) < 0) - HGOTO_DONE(FAIL) + HGOTO_DONE(FAIL); /* * Reverse dimensions due to C-FORTRAN storage order. @@ -870,7 +870,7 @@ h5sselect_hyperslab_c(hid_t_f *space_id, int_f *op, hsize_t_f *start, hsize_t_f rank = H5Sget_simple_extent_ndims((hid_t)*space_id); if (rank < 0) - HGOTO_DONE(FAIL) + HGOTO_DONE(FAIL); /* * Reverse dimensions due to C-FORTRAN storage order. @@ -885,7 +885,7 @@ h5sselect_hyperslab_c(hid_t_f *space_id, int_f *op, hsize_t_f *start, hsize_t_f } /* end for */ if (H5Sselect_hyperslab((hid_t)*space_id, (H5S_seloper_t)*op, c_start, c_stride, c_count, c_block) < 0) - HGOTO_DONE(FAIL) + HGOTO_DONE(FAIL); done: return ret_value; diff --git a/fortran/test/t.c b/fortran/test/t.c index 3080447..1336540 100644 --- a/fortran/test/t.c +++ b/fortran/test/t.c @@ -46,15 +46,15 @@ nh5_fixname_c(_fcd base_name, size_t_f *base_namelen, hid_t_f *fapl, _fcd full_n * Convert FORTRAN name to C name */ if (NULL == (c_base_name = (char *)HD5f2cstring(base_name, (size_t)*base_namelen))) - HGOTO_DONE(FAIL) + HGOTO_DONE(FAIL); if (NULL == (c_full_name = (char *)malloc((size_t)*full_namelen + 1))) - HGOTO_DONE(FAIL) + HGOTO_DONE(FAIL); /* * Call h5_fixname function. */ if (NULL == h5_fixname(c_base_name, (hid_t)*fapl, c_full_name, (size_t)*full_namelen + 1)) - HGOTO_DONE(FAIL) + HGOTO_DONE(FAIL); HD5packFstring(c_full_name, _fcdtocp(full_name), (size_t)*full_namelen); done: |