summaryrefslogtreecommitdiffstats
path: root/hl/fortran/src
diff options
context:
space:
mode:
authorSean McBride <sean@rogue-research.com>2023-07-18 15:35:05 (GMT)
committerGitHub <noreply@github.com>2023-07-18 15:35:05 (GMT)
commit1903c4b1b0bd227b6713364792d241015b4edb5a (patch)
tree4ec8c69091b59707f28c6cea3ee3a0b158a80b73 /hl/fortran/src
parentaab497a6312a9d8434a7dc7b5a593713fc8fbce0 (diff)
downloadhdf5-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 'hl/fortran/src')
-rw-r--r--hl/fortran/src/H5DSfc.c22
-rw-r--r--hl/fortran/src/H5IMfc.c4
-rw-r--r--hl/fortran/src/H5TBfc.c90
3 files changed, 58 insertions, 58 deletions
diff --git a/hl/fortran/src/H5DSfc.c b/hl/fortran/src/H5DSfc.c
index fc38d99..7b5dfe9 100644
--- a/hl/fortran/src/H5DSfc.c
+++ b/hl/fortran/src/H5DSfc.c
@@ -39,14 +39,14 @@ h5dsset_scale_c(hid_t_f *dsid, _fcd dimname, size_t_f *dimnamelen)
if (*dimnamelen != 0)
if (NULL == (c_dimname = (char *)HD5f2cstring(dimname, (size_t)*dimnamelen)))
- HGOTO_DONE(FAIL)
+ HGOTO_DONE(FAIL);
/*
* call H5DSset_scale function.
*/
if (H5DSset_scale((hid_t)*dsid, c_dimname) < 0)
- HGOTO_DONE(FAIL)
+ HGOTO_DONE(FAIL);
done:
if (c_dimname)
@@ -77,7 +77,7 @@ h5dsattach_scale_c(hid_t_f *did, hid_t_f *dsid, int_f *idx)
*/
if (H5DSattach_scale((hid_t)*did, (hid_t)*dsid, (unsigned)*idx) < 0)
- HGOTO_DONE(FAIL)
+ HGOTO_DONE(FAIL);
done:
return ret_value;
@@ -105,7 +105,7 @@ h5dsdetach_scale_c(hid_t_f *did, hid_t_f *dsid, int_f *idx)
*/
if (H5DSdetach_scale((hid_t)*did, (hid_t)*dsid, (unsigned)*idx) < 0)
- HGOTO_DONE(FAIL)
+ HGOTO_DONE(FAIL);
done:
return ret_value;
@@ -134,7 +134,7 @@ h5dsis_attached_c(hid_t_f *did, hid_t_f *dsid, int_f *idx, int_f *is_attached)
*/
if ((c_is_attached = H5DSis_attached((hid_t)*did, (hid_t)*dsid, (unsigned)*idx)) < 0)
- HGOTO_DONE(FAIL)
+ HGOTO_DONE(FAIL);
*is_attached = (int_f)c_is_attached;
@@ -165,7 +165,7 @@ h5dsis_scale_c(hid_t_f *did, int_f *is_scale)
*/
if ((c_is_scale = H5DSis_scale((hid_t)*did)) < 0)
- HGOTO_DONE(FAIL)
+ HGOTO_DONE(FAIL);
*is_scale = (int_f)c_is_scale;
@@ -196,14 +196,14 @@ h5dsset_label_c(hid_t_f *did, int_f *idx, _fcd label, size_t_f *labellen)
*/
if (NULL == (c_label = (char *)HD5f2cstring(label, (size_t)*labellen)))
- HGOTO_DONE(FAIL)
+ HGOTO_DONE(FAIL);
/*
* call H5DSset_label function.
*/
if (H5DSset_label((hid_t)*did, (unsigned)*idx, c_label) < 0)
- HGOTO_DONE(FAIL)
+ HGOTO_DONE(FAIL);
done:
if (c_label)
@@ -242,7 +242,7 @@ h5dsget_label_c(hid_t_f *did, int_f *idx, _fcd label, size_t_f *size)
*/
if ((size_c = H5DSget_label((hid_t)*did, (unsigned)*idx, c_label, (size_t)*size + 1)) < 0)
- HGOTO_DONE(FAIL)
+ HGOTO_DONE(FAIL);
/*
* Convert C name to FORTRAN and place it in the given buffer
@@ -288,7 +288,7 @@ h5dsget_scale_name_c(hid_t_f *did, _fcd name, size_t_f *size)
*/
if ((size_c = H5DSget_scale_name((hid_t)*did, c_scale_name, (size_t)*size + 1)) < 0)
- HGOTO_DONE(FAIL)
+ HGOTO_DONE(FAIL);
/*
* Convert C name to FORTRAN and place it in the given buffer
@@ -324,7 +324,7 @@ h5dsget_num_scales_c(hid_t_f *did, int_f *idx, int_f *num_scales)
*/
if ((*num_scales = (int_f)H5DSget_num_scales((hid_t)*did, (unsigned)*idx)) < 0)
- HGOTO_DONE(FAIL)
+ HGOTO_DONE(FAIL);
done:
return ret_value;
diff --git a/hl/fortran/src/H5IMfc.c b/hl/fortran/src/H5IMfc.c
index a165ced..9d8baf2 100644
--- a/hl/fortran/src/H5IMfc.c
+++ b/hl/fortran/src/H5IMfc.c
@@ -297,7 +297,7 @@ h5immake_palette_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, hsize_t_f *dim
* convert FORTRAN name to C name
*/
if (NULL == (c_name = (char *)HD5f2cstring(name, (size_t)*namelen)))
- HGOTO_DONE(FAIL)
+ HGOTO_DONE(FAIL);
for (i = 0; i < rank; i++)
c_dims[i] = (hsize_t)dims[i];
@@ -306,7 +306,7 @@ h5immake_palette_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, hsize_t_f *dim
* call H5IMmake_palette function.
*/
if (H5IMmake_palettef((hid_t)*loc_id, c_name, c_dims, (int_f *)buf) < 0)
- HGOTO_DONE(FAIL)
+ HGOTO_DONE(FAIL);
done:
if (c_name)
diff --git a/hl/fortran/src/H5TBfc.c b/hl/fortran/src/H5TBfc.c
index 6c378b3..9c25777 100644
--- a/hl/fortran/src/H5TBfc.c
+++ b/hl/fortran/src/H5TBfc.c
@@ -54,13 +54,13 @@ h5tbmake_table_c(size_t_f *namelen1, _fcd name1, hid_t_f *loc_id, size_t_f *name
* convert FORTRAN name to C name
*/
if (NULL == (c_name = (char *)HD5f2cstring(name, (size_t)*namelen)))
- HGOTO_DONE(FAIL)
+ HGOTO_DONE(FAIL);
if (NULL == (c_name1 = (char *)HD5f2cstring(name1, (size_t)*namelen1)))
- HGOTO_DONE(FAIL)
+ HGOTO_DONE(FAIL);
if (NULL == (c_field_offset = (size_t *)malloc(sizeof(size_t) * (size_t)c_nfields)))
- HGOTO_DONE(FAIL)
+ HGOTO_DONE(FAIL);
if (NULL == (c_field_types = (hid_t *)malloc(sizeof(hid_t) * (size_t)c_nfields)))
- HGOTO_DONE(FAIL)
+ HGOTO_DONE(FAIL);
for (i = 0; i < num_elem; i++) {
c_field_offset[i] = (size_t)field_offset[i];
@@ -71,19 +71,19 @@ h5tbmake_table_c(size_t_f *namelen1, _fcd name1, hid_t_f *loc_id, size_t_f *name
* allocate array of character pointers
*/
if (NULL == (c_field_names = (char **)calloc((size_t)num_elem, sizeof(char *))))
- HGOTO_DONE(FAIL)
+ HGOTO_DONE(FAIL);
/* copy data to long C string */
if (NULL ==
(tmp = (char *)HD5f2cstring(field_names, (size_t) * (max_char_size_field_names) * (size_t)num_elem)))
- HGOTO_DONE(FAIL)
+ HGOTO_DONE(FAIL);
/*
* move data from temporary buffer
*/
tmp_p = tmp;
for (i = 0; i < num_elem; i++) {
if (NULL == (c_field_names[i] = (char *)malloc((size_t)char_len_field_names[i] + 1)))
- HGOTO_DONE(FAIL)
+ HGOTO_DONE(FAIL);
memcpy(c_field_names[i], tmp_p, (size_t)char_len_field_names[i]);
c_field_names[i][char_len_field_names[i]] = '\0';
tmp_p = tmp_p + *max_char_size_field_names;
@@ -95,7 +95,7 @@ h5tbmake_table_c(size_t_f *namelen1, _fcd name1, hid_t_f *loc_id, size_t_f *name
if (H5TBmake_table(c_name1, (hid_t)*loc_id, c_name, c_nfields, (hsize_t)*nrecords, (size_t)*type_size,
(const char **)c_field_names, c_field_offset, c_field_types, (hsize_t)*chunk_size,
NULL, *compress, NULL) < 0)
- HGOTO_DONE(FAIL)
+ HGOTO_DONE(FAIL);
done:
if (c_name)
@@ -155,13 +155,13 @@ h5tbmake_table_ptr_c(size_t_f *namelen1, _fcd name1, hid_t_f *loc_id, size_t_f *
* convert FORTRAN name to C name
*/
if (NULL == (c_name = (char *)HD5f2cstring(name, (size_t)*namelen)))
- HGOTO_DONE(FAIL)
+ HGOTO_DONE(FAIL);
if (NULL == (c_name1 = (char *)HD5f2cstring(name1, (size_t)*namelen1)))
- HGOTO_DONE(FAIL)
+ HGOTO_DONE(FAIL);
if (NULL == (c_field_offset = (size_t *)malloc(sizeof(size_t) * (size_t)c_nfields)))
- HGOTO_DONE(FAIL)
+ HGOTO_DONE(FAIL);
if (NULL == (c_field_types = (hid_t *)malloc(sizeof(hid_t) * (size_t)c_nfields)))
- HGOTO_DONE(FAIL)
+ HGOTO_DONE(FAIL);
for (i = 0; i < num_elem; i++) {
c_field_offset[i] = (size_t)field_offset[i];
@@ -172,19 +172,19 @@ h5tbmake_table_ptr_c(size_t_f *namelen1, _fcd name1, hid_t_f *loc_id, size_t_f *
* allocate array of character pointers
*/
if (NULL == (c_field_names = (char **)calloc((size_t)num_elem, sizeof(char *))))
- HGOTO_DONE(FAIL)
+ HGOTO_DONE(FAIL);
/* copy data to long C string */
if (NULL ==
(tmp = (char *)HD5f2cstring(field_names, (size_t) * (max_char_size_field_names) * (size_t)num_elem)))
- HGOTO_DONE(FAIL)
+ HGOTO_DONE(FAIL);
/*
* move data from temporary buffer
*/
tmp_p = tmp;
for (i = 0; i < num_elem; i++) {
if (NULL == (c_field_names[i] = (char *)malloc((size_t)char_len_field_names[i] + 1)))
- HGOTO_DONE(FAIL)
+ HGOTO_DONE(FAIL);
memcpy(c_field_names[i], tmp_p, (size_t)char_len_field_names[i]);
c_field_names[i][char_len_field_names[i]] = '\0';
tmp_p = tmp_p + *max_char_size_field_names;
@@ -196,7 +196,7 @@ h5tbmake_table_ptr_c(size_t_f *namelen1, _fcd name1, hid_t_f *loc_id, size_t_f *
if (H5TBmake_table(c_name1, (hid_t)*loc_id, c_name, c_nfields, (hsize_t)*nrecords, (size_t)*type_size,
(const char **)c_field_names, c_field_offset, c_field_types, (hsize_t)*chunk_size,
fill_data, *compress, data) < 0)
- HGOTO_DONE(FAIL)
+ HGOTO_DONE(FAIL);
done:
if (c_name)
@@ -246,12 +246,12 @@ h5tbread_table_c(hid_t_f *loc_id, _fcd name, size_t_f *namelen, hsize_t_f *nfiel
* convert FORTRAN name to C name
*/
if (NULL == (c_name = (char *)HD5f2cstring(name, (size_t)*namelen)))
- HGOTO_DONE(FAIL)
+ HGOTO_DONE(FAIL);
if (NULL == (c_dst_offset = (size_t *)malloc(sizeof(size_t) * (size_t)c_nfields)))
- HGOTO_DONE(FAIL)
+ HGOTO_DONE(FAIL);
if (NULL == (c_dst_sizes = (size_t *)malloc(sizeof(size_t) * (size_t)c_nfields)))
- HGOTO_DONE(FAIL)
+ HGOTO_DONE(FAIL);
for (i = 0; i < c_nfields; i++) {
c_dst_offset[i] = (size_t)dst_offset[i];
@@ -262,7 +262,7 @@ h5tbread_table_c(hid_t_f *loc_id, _fcd name, size_t_f *namelen, hsize_t_f *nfiel
* call H5TBread_table function.
*/
if (H5TBread_table((hid_t)*loc_id, c_name, (size_t)*dst_size, c_dst_offset, c_dst_sizes, dst_buf) < 0)
- HGOTO_DONE(FAIL)
+ HGOTO_DONE(FAIL);
done:
if (c_name)
@@ -300,16 +300,16 @@ h5tbwrite_field_name_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, size_t_f *
* convert FORTRAN name to C name
*/
if (NULL == (c_name = (char *)HD5f2cstring(name, (size_t)*namelen)))
- HGOTO_DONE(FAIL)
+ HGOTO_DONE(FAIL);
if (NULL == (c_name1 = (char *)HD5f2cstring(field_name, (size_t)*namelen1)))
- HGOTO_DONE(FAIL)
+ HGOTO_DONE(FAIL);
/*
* call H5TBwrite_fields_name function.
*/
if (H5TBwrite_fields_name((hid_t)*loc_id, c_name, c_name1, (hsize_t)*start, (hsize_t)*nrecords,
c_type_size[0], 0, c_type_size, buf) < 0)
- HGOTO_DONE(FAIL)
+ HGOTO_DONE(FAIL);
done:
if (c_name)
@@ -344,16 +344,16 @@ h5tbread_field_name_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, size_t_f *n
* convert FORTRAN name to C name
*/
if (NULL == (c_name = (char *)HD5f2cstring(name, (size_t)*namelen)))
- HGOTO_DONE(FAIL)
+ HGOTO_DONE(FAIL);
if (NULL == (c_name1 = (char *)HD5f2cstring(field_name, (size_t)*namelen1)))
- HGOTO_DONE(FAIL)
+ HGOTO_DONE(FAIL);
/*
* call H5TBread_fields_name function.
*/
if (H5TBread_fields_name((hid_t)*loc_id, c_name, c_name1, (hsize_t)*start, (hsize_t)*nrecords,
c_type_size[0], 0, c_type_size, buf) < 0)
- HGOTO_DONE(FAIL)
+ HGOTO_DONE(FAIL);
done:
if (c_name)
@@ -388,14 +388,14 @@ h5tbwrite_field_index_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, int_f *fi
* convert FORTRAN name to C name
*/
if (NULL == (c_name = (char *)HD5f2cstring(name, (size_t)*namelen)))
- HGOTO_DONE(FAIL)
+ HGOTO_DONE(FAIL);
/*
* call H5TBwrite_fields_name function.
*/
if (H5TBwrite_fields_index((hid_t)*loc_id, c_name, (hsize_t)1, &c_field_index, (hsize_t)*start,
(hsize_t)*nrecords, c_type_size, 0, &c_type_size, buf) < 0)
- HGOTO_DONE(FAIL)
+ HGOTO_DONE(FAIL);
done:
if (c_name)
@@ -428,14 +428,14 @@ h5tbread_field_index_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, int_f *fie
* convert FORTRAN name to C name
*/
if (NULL == (c_name = (char *)HD5f2cstring(name, (size_t)*namelen)))
- HGOTO_DONE(FAIL)
+ HGOTO_DONE(FAIL);
/*
* call H5TBread_fields_index function.
*/
if (H5TBread_fields_index((hid_t)*loc_id, c_name, (hsize_t)1, &c_field_index, (hsize_t)*start,
(hsize_t)*nrecords, c_type_size, 0, &c_type_size, buf) < 0)
- HGOTO_DONE(FAIL)
+ HGOTO_DONE(FAIL);
done:
if (c_name)
@@ -467,16 +467,16 @@ h5tbinsert_field_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, size_t_f *name
* convert FORTRAN name to C name
*/
if (NULL == (c_name = (char *)HD5f2cstring(name, (size_t)*namelen)))
- HGOTO_DONE(FAIL)
+ HGOTO_DONE(FAIL);
if (NULL == (c_name1 = (char *)HD5f2cstring(field_name, (size_t)*namelen1)))
- HGOTO_DONE(FAIL)
+ HGOTO_DONE(FAIL);
/*
* call H5TBinsert_field function.
*/
if (H5TBinsert_field((hid_t)*loc_id, c_name, c_name1, (hid_t)*field_type, (hsize_t)*position, NULL, buf) <
0)
- HGOTO_DONE(FAIL)
+ HGOTO_DONE(FAIL);
done:
if (c_name)
@@ -509,15 +509,15 @@ h5tbdelete_field_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, size_t_f *name
* convert FORTRAN name to C name
*/
if (NULL == (c_name = (char *)HD5f2cstring(name, (size_t)*namelen)))
- HGOTO_DONE(FAIL)
+ HGOTO_DONE(FAIL);
if (NULL == (c_name1 = (char *)HD5f2cstring(field_name, (size_t)*namelen1)))
- HGOTO_DONE(FAIL)
+ HGOTO_DONE(FAIL);
/*
* call H5TBinsert_field function.
*/
if (H5TBdelete_field((hid_t)*loc_id, c_name, c_name1) < 0)
- HGOTO_DONE(FAIL)
+ HGOTO_DONE(FAIL);
done:
if (c_name)
@@ -551,14 +551,14 @@ h5tbget_table_info_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, hsize_t_f *n
* convert FORTRAN name to C name
*/
if (NULL == (c_name = (char *)HD5f2cstring(name, (size_t)*namelen)))
- HGOTO_DONE(FAIL)
+ HGOTO_DONE(FAIL);
/*
* call H5TBread_fields_index function.
*/
if (H5TBget_table_info((hid_t)*loc_id, c_name, &c_nfields, &c_nrecords) < 0)
- HGOTO_DONE(FAIL)
+ HGOTO_DONE(FAIL);
*nfields = (hsize_t_f)c_nfields;
*nrecords = (hsize_t_f)c_nrecords;
@@ -610,30 +610,30 @@ h5tbget_field_info_c(hid_t_f *loc_id, size_t_f *namelen, _fcd name, hsize_t_f *n
* convert FORTRAN name to C name
*/
if (NULL == (c_name = (char *)HD5f2cstring(name, (size_t)*namelen)))
- HGOTO_DONE(FAIL)
+ HGOTO_DONE(FAIL);
if (NULL == (c_field_offsets = (size_t *)malloc(sizeof(size_t) * (size_t)c_nfields)))
- HGOTO_DONE(FAIL)
+ HGOTO_DONE(FAIL);
if (NULL == (c_field_sizes = (size_t *)malloc(sizeof(size_t) * (size_t)c_nfields)))
- HGOTO_DONE(FAIL)
+ HGOTO_DONE(FAIL);
if (NULL == (c_field_names = (char **)calloc((size_t)c_nfields, sizeof(char *))))
- HGOTO_DONE(FAIL)
+ HGOTO_DONE(FAIL);
for (i = 0; i < c_nfields; i++)
if (NULL == (c_field_names[i] = (char *)malloc(sizeof(char) * HLTB_MAX_FIELD_LEN)))
- HGOTO_DONE(FAIL)
+ HGOTO_DONE(FAIL);
/*
* call H5TBget_field_info function.
*/
if (H5TBget_field_info((hid_t)*loc_id, c_name, c_field_names, c_field_sizes, c_field_offsets,
&c_type_size) < 0)
- HGOTO_DONE(FAIL)
+ HGOTO_DONE(FAIL);
/* return values */
/* names array */
if (NULL == (tmp = (char *)malloc((c_lenmax * (size_t)c_nfields) + 1)))
- HGOTO_DONE(FAIL)
+ HGOTO_DONE(FAIL);
tmp_p = tmp;
memset(tmp, ' ', c_lenmax * (size_t)c_nfields);
tmp[c_lenmax * c_nfields] = '\0';