summaryrefslogtreecommitdiffstats
path: root/fortran
diff options
context:
space:
mode:
authorAllen Byrne <byrn@hdfgroup.org>2019-07-30 21:58:24 (GMT)
committerAllen Byrne <byrn@hdfgroup.org>2019-07-30 21:58:24 (GMT)
commita873d149e535a32cc1125fb744b0344112096d48 (patch)
tree4cf3224af16a9e1953c439ff6880a6b3076eb0c8 /fortran
parent1b2941af4351b39f915efd158fdfdda2e70ba589 (diff)
downloadhdf5-a873d149e535a32cc1125fb744b0344112096d48.zip
hdf5-a873d149e535a32cc1125fb744b0344112096d48.tar.gz
hdf5-a873d149e535a32cc1125fb744b0344112096d48.tar.bz2
Cleanup when merging to other branches
Diffstat (limited to 'fortran')
-rw-r--r--fortran/src/H5Sf.c9
-rw-r--r--fortran/src/H5_f.c2
-rw-r--r--fortran/src/H5match_types.c6
3 files changed, 7 insertions, 10 deletions
diff --git a/fortran/src/H5Sf.c b/fortran/src/H5Sf.c
index 2eae0d9..0bafc58 100644
--- a/fortran/src/H5Sf.c
+++ b/fortran/src/H5Sf.c
@@ -1033,22 +1033,21 @@ h5scombine_hyperslab_c ( hid_t_f *space_id , int_f *op, hsize_t_f *start, hsize_
hsize_t *c_block = NULL;
H5S_seloper_t c_op;
- herr_t status;
int rank;
int i;
rank = H5Sget_simple_extent_ndims(*space_id);
if (rank < 0 ) return ret_value;
- c_start = (hsize_t *)HDmalloc(sizeof(hsize_t)*rank);
+ c_start = (hsize_t *)HDmalloc(sizeof(hsize_t)*(unsigned)rank);
if (c_start == NULL) goto DONE;
- c_count = (hsize_t *)HDmalloc(sizeof(hsize_t)*rank);
+ c_count = (hsize_t *)HDmalloc(sizeof(hsize_t)*(unsigned)rank);
if (c_count == NULL) goto DONE;
- c_stride = (hsize_t *)HDmalloc(sizeof(hsize_t)*rank);
+ c_stride = (hsize_t *)HDmalloc(sizeof(hsize_t)*(unsigned)rank);
if (c_stride == NULL) goto DONE;
- c_block = (hsize_t *)HDmalloc(sizeof(hsize_t)*rank);
+ c_block = (hsize_t *)HDmalloc(sizeof(hsize_t)*(unsigned)rank);
if (c_block == NULL) goto DONE;
diff --git a/fortran/src/H5_f.c b/fortran/src/H5_f.c
index 69ba8b3..08b0212 100644
--- a/fortran/src/H5_f.c
+++ b/fortran/src/H5_f.c
@@ -632,7 +632,6 @@ h5init_flags_c( int_f *h5d_flags, size_t_f *h5d_size_flags,
h5s_flags[15] = (int_f)H5S_SEL_POINTS;
h5s_flags[16] = (int_f)H5S_SEL_HYPERSLABS;
h5s_flags[17] = (int_f)H5S_SEL_ALL;
-
/*
* H5T flags
*/
@@ -671,7 +670,6 @@ h5init_flags_c( int_f *h5d_flags, size_t_f *h5d_size_flags,
h5t_flags[32] = (int_f)H5T_ARRAY;
h5t_flags[33] = (int_f)H5T_DIR_ASCEND;
h5t_flags[34] = (int_f)H5T_DIR_DESCEND;
-
/*
* H5Z flags
*/
diff --git a/fortran/src/H5match_types.c b/fortran/src/H5match_types.c
index 57f7dda..e39e85a 100644
--- a/fortran/src/H5match_types.c
+++ b/fortran/src/H5match_types.c
@@ -143,7 +143,7 @@ void writeToFilesChr(const char* c_typedef, const char* fortran_type, const char
int main(void)
{
int i;
- char chrA[32],chrB[32];
+ char chrA[64],chrB[64];
int IntKinds[] = H5_FORTRAN_INTEGER_KINDS;
int IntKinds_SizeOf[] = H5_FORTRAN_INTEGER_KINDS_SIZEOF;
@@ -347,8 +347,8 @@ int main(void)
for(i=0;i<H5_FORTRAN_NUM_REAL_KINDS;i++) {
if (RealKinds[i] > 0) {
- sprintf(chrA, "Fortran_REAL_%s", Real_C_TYPES[i]);
- sprintf(chrB, "real_%s_f", Real_C_TYPES[i]);
+ snprintf(chrA, sizeof(chrA), "Fortran_REAL_%s", Real_C_TYPES[i]);
+ snprintf(chrB, sizeof(chrB), "real_%s_f", Real_C_TYPES[i]);
writeToFiles("float",chrA, chrB, RealKinds[i]);
}
}