summaryrefslogtreecommitdiffstats
path: root/fortran
diff options
context:
space:
mode:
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]);
}
}