summaryrefslogtreecommitdiffstats
path: root/fortran/src/H5Sf.c
diff options
context:
space:
mode:
Diffstat (limited to 'fortran/src/H5Sf.c')
-rw-r--r--fortran/src/H5Sf.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/fortran/src/H5Sf.c b/fortran/src/H5Sf.c
index 0a50d25..8153707 100644
--- a/fortran/src/H5Sf.c
+++ b/fortran/src/H5Sf.c
@@ -220,7 +220,8 @@ nh5sget_select_hyper_blocklist_c( hid_t_f *space_id ,hsize_t_f * startblock,
hid_t c_space_id;
hsize_t c_num_blocks;
- int i, rank;
+ hsize_t i;
+ int rank;
hsize_t c_startblock, *c_buf;
c_space_id = *space_id;
@@ -230,7 +231,7 @@ nh5sget_select_hyper_blocklist_c( hid_t_f *space_id ,hsize_t_f * startblock,
if (rank < 0 ) return ret_value;
c_startblock = (hsize_t)*startblock;
- c_buf = (hsize_t*)malloc(sizeof(hsize_t)*c_num_blocks*2*rank);
+ c_buf = (hsize_t*)malloc(sizeof(hsize_t)*(size_t)(c_num_blocks*2*rank));
if (!c_buf) return ret_value;
ret_value = H5Sget_select_hyper_blocklist(c_space_id, c_startblock,
@@ -328,7 +329,7 @@ nh5sget_select_elem_pointlist_c( hid_t_f *space_id ,hsize_t_f * startpoint,
if (rank < 0 ) return ret_value;
c_startpoint = (hsize_t)*startpoint;
- c_buf = (hsize_t*)malloc(sizeof(hsize_t)*c_num_points*rank);
+ c_buf = (hsize_t*)malloc(sizeof(hsize_t)*(size_t)(c_num_points*rank));
if (!c_buf) return ret_value;
ret_value = H5Sget_select_elem_pointlist(c_space_id, c_startpoint,
c_num_points, c_buf);