summaryrefslogtreecommitdiffstats
path: root/fortran/src
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2003-10-13 19:21:41 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2003-10-13 19:21:41 (GMT)
commit9bc89569d6990a1ebbe8fa595a23d5df59575c7f (patch)
tree68f37a5fbec8709187c2b4fe9521d0ce8434388b /fortran/src
parented23cda102d6c9312d863d4a2b5b2b0ec12f7224 (diff)
downloadhdf5-9bc89569d6990a1ebbe8fa595a23d5df59575c7f.zip
hdf5-9bc89569d6990a1ebbe8fa595a23d5df59575c7f.tar.gz
hdf5-9bc89569d6990a1ebbe8fa595a23d5df59575c7f.tar.bz2
[svn-r7611] Purpose:
Code cleanup Description: Cleaned up various compiler warnings Platforms tested: FreeBSD 4.9 (sleipnir) Linux 2.4 (verbena) w/FORTRAN too minor for h5committest
Diffstat (limited to 'fortran/src')
-rw-r--r--fortran/src/H5Af.c2
-rw-r--r--fortran/src/H5Df.c96
-rw-r--r--fortran/src/H5If.c2
-rw-r--r--fortran/src/H5Pf.c38
-rw-r--r--fortran/src/H5Sf.c7
-rw-r--r--fortran/src/H5Tf.c22
-rw-r--r--fortran/src/H5f90kit.c4
7 files changed, 86 insertions, 85 deletions
diff --git a/fortran/src/H5Af.c b/fortran/src/H5Af.c
index 7bba6d7..696b8ed 100644
--- a/fortran/src/H5Af.c
+++ b/fortran/src/H5Af.c
@@ -571,7 +571,7 @@ nh5aget_name_c(hid_t_f *attr_id, size_t_f *bufsize, _fcd buf)
* Allocate buffer to hold name of an attribute
*/
c_bufsize = *bufsize;
- c_buf = (char *)HDmalloc((int)c_bufsize +1);
+ c_buf = (char *)HDmalloc(c_bufsize +1);
if (c_buf == NULL) return ret_value;
/*
diff --git a/fortran/src/H5Df.c b/fortran/src/H5Df.c
index 04b38b2..22ce62c 100644
--- a/fortran/src/H5Df.c
+++ b/fortran/src/H5Df.c
@@ -741,23 +741,23 @@ nh5dread_ref_obj_c_b (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space
/*
* Allocate temporary buffer.
*/
- buf_c = (hobj_ref_t*)HDmalloc(sizeof(hobj_ref_t)*(n));
+ buf_c = (hobj_ref_t*)HDmalloc(sizeof(hobj_ref_t)*(size_t)n);
if ( buf_c != NULL ) {
- /*
- * Call H5Dread function.
- */
- c_dset_id = (hid_t)*dset_id;
- c_mem_type_id = (hid_t)*mem_type_id;
- c_mem_space_id = (hid_t)*mem_space_id;
- c_file_space_id = (hid_t)*file_space_id;
- ret = H5Dread(c_dset_id, c_mem_type_id, c_mem_space_id, c_file_space_id, c_xfer_prp, buf_c);
- if (ret >=0) {
- for (i = 0; i < n; i++) {
- HDmemcpy(buf, &buf_c[i], H5R_OBJ_REF_BUF_SIZE);
- buf = buf + REF_OBJ_BUF_LEN_F;
- }
- }
- if ( buf_c != NULL ) HDfree(buf_c);
+ /*
+ * Call H5Dread function.
+ */
+ c_dset_id = (hid_t)*dset_id;
+ c_mem_type_id = (hid_t)*mem_type_id;
+ c_mem_space_id = (hid_t)*mem_space_id;
+ c_file_space_id = (hid_t)*file_space_id;
+ ret = H5Dread(c_dset_id, c_mem_type_id, c_mem_space_id, c_file_space_id, c_xfer_prp, buf_c);
+ if (ret >=0) {
+ for (i = 0; i < n; i++) {
+ HDmemcpy(buf, &buf_c[i], H5R_OBJ_REF_BUF_SIZE);
+ buf = buf + REF_OBJ_BUF_LEN_F;
+ }
+ }
+ if ( buf_c != NULL ) HDfree(buf_c);
}
if (ret < 0) return ret_value;
ret_value = 0;
@@ -859,23 +859,23 @@ nh5dread_ref_reg_c_b (hid_t_f *dset_id, hid_t_f *mem_type_id, hid_t_f *mem_space
/*
* Allocate temporary buffer.
*/
- buf_c = (hdset_reg_ref_t *)HDmalloc(sizeof(hdset_reg_ref_t)*(n));
+ buf_c = (hdset_reg_ref_t *)HDmalloc(sizeof(hdset_reg_ref_t)*(size_t)n);
if ( buf_c != NULL ) {
- /*
- * Call H5Dread function.
- */
- c_dset_id = (hid_t)*dset_id;
- c_mem_type_id = (hid_t)*mem_type_id;
- c_mem_space_id = (hid_t)*mem_space_id;
- c_file_space_id = (hid_t)*file_space_id;
- ret = H5Dread(c_dset_id, c_mem_type_id, c_mem_space_id, c_file_space_id, c_xfer_prp, buf_c);
- if (ret >=0) {
- for (i = 0; i < n; i++) {
- HDmemcpy(buf, buf_c[i].heapid, H5R_DSET_REG_REF_BUF_SIZE);
- buf = buf + REF_REG_BUF_LEN_F;
- }
- }
- if ( buf_c != NULL ) HDfree(buf_c);
+ /*
+ * Call H5Dread function.
+ */
+ c_dset_id = (hid_t)*dset_id;
+ c_mem_type_id = (hid_t)*mem_type_id;
+ c_mem_space_id = (hid_t)*mem_space_id;
+ c_file_space_id = (hid_t)*file_space_id;
+ ret = H5Dread(c_dset_id, c_mem_type_id, c_mem_space_id, c_file_space_id, c_xfer_prp, buf_c);
+ if (ret >=0) {
+ for (i = 0; i < n; i++) {
+ HDmemcpy(buf, buf_c[i].heapid, H5R_DSET_REG_REF_BUF_SIZE);
+ buf = buf + REF_REG_BUF_LEN_F;
+ }
+ }
+ if ( buf_c != NULL ) HDfree(buf_c);
}
if (ret < 0) return ret_value;
ret_value = 0;
@@ -1093,7 +1093,7 @@ nh5dvlen_get_max_len_c ( hid_t_f *dset_id , hid_t_f *type_id, hid_t_f *space_id
num_elem = H5Sget_select_npoints(c_space_id);
if( num_elem < 0) return ret_value;
- c_buf = (hvl_t *)malloc(sizeof(hvl_t)*num_elem);
+ c_buf = (hvl_t *)malloc(sizeof(hvl_t)*(size_t)num_elem);
if (c_buf == NULL) return ret_value;
status = H5Dread(c_dset_id, c_type_id, H5S_ALL, c_space_id, H5P_DEFAULT, c_buf);
if(status < 0) goto DONE;
@@ -1142,7 +1142,7 @@ nh5dwrite_vl_integer_c ( hid_t_f *dset_id , hid_t_f *mem_type_id, hid_t_f *mem_
size_t max_len;
hvl_t *c_buf;
- int i;
+ hsize_t i;
hsize_t num_elem;
max_len = (size_t)dims[0];
@@ -1154,7 +1154,7 @@ nh5dwrite_vl_integer_c ( hid_t_f *dset_id , hid_t_f *mem_type_id, hid_t_f *mem_
c_file_space_id = (hid_t)*file_space_id;
c_xfer_prp = (hid_t)*xfer_prp;
- c_buf = (hvl_t *)malloc(num_elem * sizeof(hvl_t));
+ c_buf = (hvl_t *)malloc((size_t)num_elem * sizeof(hvl_t));
if (c_buf == NULL) return ret_value;
tmp = (int *)buf;
for (i=0; i < num_elem; i++) {
@@ -1219,7 +1219,7 @@ nh5dread_vl_integer_c ( hid_t_f *dset_id , hid_t_f *mem_type_id, hid_t_f *mem_s
num_elem = H5Sget_select_npoints(c_mem_space_id);
if(num_elem != dims[1]) return ret_value;
- c_buf = (hvl_t *)malloc(num_elem * sizeof(hvl_t));
+ c_buf = (hvl_t *)malloc((size_t)num_elem * sizeof(hvl_t));
if (c_buf == NULL) return ret_value;
/*
* Call H5Dread function.
@@ -1269,7 +1269,7 @@ nh5dwrite_vl_string_c( hid_t_f *dset_id , hid_t_f *mem_type_id, hid_t_f *mem_sp
size_t max_len;
char **c_buf;
- int i;
+ hsize_t i;
hsize_t num_elem;
max_len = (size_t)dims[0];
@@ -1284,11 +1284,11 @@ nh5dwrite_vl_string_c( hid_t_f *dset_id , hid_t_f *mem_type_id, hid_t_f *mem_sp
/*
* Allocate arra of character pointers
*/
- c_buf = (char **)malloc(num_elem * sizeof(char *));
+ c_buf = (char **)malloc((size_t)num_elem * sizeof(char *));
if (c_buf == NULL) return ret_value;
/* Copy data to long C string */
- tmp = (char *)HD5f2cstring(buf, max_len*num_elem);
+ tmp = (char *)HD5f2cstring(buf, (int)(max_len*num_elem));
if (tmp == NULL) { free(c_buf);
return ret_value;
}
@@ -1297,8 +1297,8 @@ nh5dwrite_vl_string_c( hid_t_f *dset_id , hid_t_f *mem_type_id, hid_t_f *mem_sp
*/
tmp_p = tmp;
for (i=0; i < num_elem; i++) {
- c_buf[i] = (char *) malloc(len[i]+1);
- memcpy(c_buf[i], tmp_p, len[i]);
+ c_buf[i] = (char *) malloc((size_t)len[i]+1);
+ memcpy(c_buf[i], tmp_p, (size_t)len[i]);
c_buf[i][len[i]] = '\0';
tmp_p = tmp_p + max_len;
}
@@ -1348,7 +1348,7 @@ nh5dread_vl_string_c( hid_t_f *dset_id , hid_t_f *mem_type_id, hid_t_f *mem_spa
size_t max_len;
char **c_buf;
- int i;
+ hsize_t i;
hsize_t num_elem;
max_len = (size_t)dims[0];
@@ -1363,7 +1363,7 @@ nh5dread_vl_string_c( hid_t_f *dset_id , hid_t_f *mem_type_id, hid_t_f *mem_spa
/*
* Allocate array of character pointers
*/
- c_buf = (char **)malloc(num_elem * sizeof(char *));
+ c_buf = (char **)malloc((size_t)num_elem * sizeof(char *));
if (c_buf == NULL) return ret_value;
/*
@@ -1374,7 +1374,7 @@ nh5dread_vl_string_c( hid_t_f *dset_id , hid_t_f *mem_type_id, hid_t_f *mem_spa
return ret_value;
}
/* Copy data to long C string */
- tmp = (char *)malloc(max_len*num_elem +1);
+ tmp = (char *)malloc((size_t)(max_len*num_elem) +1);
tmp_p = tmp;
for (i=0; i<max_len*num_elem; i++) tmp[i] = ' ';
tmp[max_len*num_elem] = '\0';
@@ -1383,7 +1383,7 @@ nh5dread_vl_string_c( hid_t_f *dset_id , hid_t_f *mem_type_id, hid_t_f *mem_spa
len[i] = (size_t_f)strlen(c_buf[i]);
tmp_p = tmp_p + max_len;
}
- HD5packFstring(tmp, _fcdtocp(buf), max_len*num_elem);
+ HD5packFstring(tmp, _fcdtocp(buf), (int)(max_len*num_elem));
ret_value = 0;
H5Dvlen_reclaim(c_mem_type_id, c_mem_space_id, H5P_DEFAULT, c_buf);
free(c_buf);
@@ -1428,7 +1428,7 @@ nh5dwrite_vl_real_c ( hid_t_f *dset_id , hid_t_f *mem_type_id, hid_t_f *mem_spa
size_t max_len;
hvl_t *c_buf;
- int i;
+ hsize_t i;
hsize_t num_elem;
max_len = (size_t)dims[0];
@@ -1440,7 +1440,7 @@ nh5dwrite_vl_real_c ( hid_t_f *dset_id , hid_t_f *mem_type_id, hid_t_f *mem_spa
c_file_space_id = (hid_t)*file_space_id;
c_xfer_prp = (hid_t)*xfer_prp;
- c_buf = (hvl_t *)malloc(num_elem * sizeof(hvl_t));
+ c_buf = (hvl_t *)malloc((size_t)num_elem * sizeof(hvl_t));
if (c_buf == NULL) return ret_value;
#if defined (_UNICOS)
tmp = (double *)buf;
@@ -1509,7 +1509,7 @@ nh5dread_vl_real_c ( hid_t_f *dset_id , hid_t_f *mem_type_id, hid_t_f *mem_spac
num_elem = H5Sget_select_npoints(c_mem_space_id);
if(num_elem != dims[1]) return ret_value;
- c_buf = (hvl_t *)malloc(num_elem * sizeof(hvl_t));
+ c_buf = (hvl_t *)malloc((size_t)num_elem * sizeof(hvl_t));
if (c_buf == NULL) return ret_value;
/*
* Call H5Dread function.
diff --git a/fortran/src/H5If.c b/fortran/src/H5If.c
index 9811788..1de90d6 100644
--- a/fortran/src/H5If.c
+++ b/fortran/src/H5If.c
@@ -67,7 +67,7 @@ nh5iget_name_c(hid_t_f *obj_id, _fcd buf, size_t_f *buf_size, size_t_f *name_siz
* Allocate buffer to hold name of an attribute
*/
c_buf_size = (size_t)*buf_size;
- c_buf = (char *)HDmalloc((int)c_buf_size +1);
+ c_buf = (char *)HDmalloc(c_buf_size +1);
if (c_buf == NULL) return ret_value;
/*
diff --git a/fortran/src/H5Pf.c b/fortran/src/H5Pf.c
index 04aba5b..616de60 100644
--- a/fortran/src/H5Pf.c
+++ b/fortran/src/H5Pf.c
@@ -224,11 +224,11 @@ nh5pset_deflate_c ( hid_t_f *prp_id , int_f *level)
{
int ret_value = 0;
hid_t c_prp_id;
- int c_level;
+ unsigned c_level;
herr_t status;
c_prp_id = (hid_t)*prp_id;
- c_level = (int)*level;
+ c_level = (unsigned)*level;
status = H5Pset_deflate(c_prp_id, c_level);
if ( status < 0 ) ret_value = -1;
return ret_value;
@@ -1412,7 +1412,7 @@ nh5pset_filter_c (hid_t_f *prp_id, int_f* filter, int_f* flags, size_t_f* cd_nel
unsigned int c_flags;
H5Z_filter_t c_filter;
unsigned int * c_cd_values;
- int i;
+ unsigned i;
c_filter = (H5Z_filter_t)*filter;
c_flags = (unsigned)*flags;
@@ -1498,7 +1498,7 @@ nh5pget_filter_c(hid_t_f *prp_id, int_f* filter_number, int_f* flags, size_t_f*
H5Z_filter_t c_filter;
unsigned int * c_cd_values;
char* c_name;
- int i;
+ unsigned i;
c_cd_nelmts_in = (size_t)*cd_nelmts;
c_namelen = (size_t)*namelen;
@@ -1523,7 +1523,7 @@ nh5pget_filter_c(hid_t_f *prp_id, int_f* filter_number, int_f* flags, size_t_f*
*filter_id = (int_f)c_filter;
*cd_nelmts = (size_t_f)c_cd_nelmts;
*flags = (int_f)c_flags;
- HD5packFstring(c_name, _fcdtocp(name), strlen(c_name));
+ HD5packFstring(c_name, _fcdtocp(name), (int)strlen(c_name));
for (i = 0; i < c_cd_nelmts_in; i++)
cd_values[i] = (int_f)c_cd_values[i];
@@ -1656,7 +1656,7 @@ nh5pget_external_c(hid_t_f *prp_id, int_f *idx, size_t_f* name_size, _fcd name,
*offset = (int_f)c_offset;
*bytes = (hsize_t_f)size;
- HD5packFstring(c_name, _fcdtocp(name), strlen(c_name));
+ HD5packFstring(c_name, _fcdtocp(name), (int)strlen(c_name));
ret_value = 0;
DONE:
@@ -1813,10 +1813,10 @@ nh5pset_buffer_c ( hid_t_f *prp_id , hsize_t_f *size)
{
int ret_value = 0;
hid_t c_prp_id;
- hsize_t c_size;
+ size_t c_size;
c_prp_id = (hid_t)*prp_id;
- c_size = (hsize_t)*size;
+ c_size = (size_t)*size;
if ( H5Pset_buffer(c_prp_id, c_size, NULL, NULL) < 0 ) ret_value = -1;
return ret_value;
}
@@ -1841,7 +1841,7 @@ nh5pget_buffer_c ( hid_t_f *prp_id , hsize_t_f *size)
c_prp_id = (hid_t)*prp_id;
c_size = H5Pget_buffer(c_prp_id, NULL, NULL);
- if ( c_size < 0 ) return ret_value;
+ if ( c_size <= 0 ) return ret_value;
*size = (hsize_t)c_size;
ret_value = 0;
return ret_value;
@@ -2916,8 +2916,8 @@ nh5pset_fapl_multi_c ( hid_t_f *prp_id , int_f *memb_map, hid_t_f *memb_fapl, _f
if (tmp ==NULL) return ret_value;
tmp_p = tmp;
for (i=0; i < H5FD_MEM_NTYPES; i++) {
- c_memb_name[i] = (char *) malloc(len[i] + 1);
- memcpy((char *)c_memb_name[i], tmp_p, len[i]);
+ c_memb_name[i] = (char *) malloc((size_t)len[i] + 1);
+ memcpy((char *)c_memb_name[i], tmp_p, (size_t)len[i]);
tmp_pp = (char *)c_memb_name[i];
tmp_pp[len[i]] = '\0';
tmp_p = tmp_p + c_lenmax;
@@ -3011,9 +3011,9 @@ nh5pget_fapl_multi_c ( hid_t_f *prp_id , int_f *memb_map, hid_t_f *memb_fapl, _f
herr_t status;
char *tmp, *tmp_p;
int i;
- int c_lenmax;
- int length = 0;
- c_lenmax = (int)*lenmax;
+ size_t c_lenmax;
+ size_t length = 0;
+ c_lenmax = (size_t)*lenmax;
c_prp_id = (hid_t)*prp_id;
/*
@@ -3028,7 +3028,7 @@ nh5pget_fapl_multi_c ( hid_t_f *prp_id , int_f *memb_map, hid_t_f *memb_fapl, _f
*/
tmp = (char *)malloc(c_lenmax*H5FD_MEM_NTYPES + 1);
tmp_p = tmp;
- for (i=0; i < c_lenmax*H5FD_MEM_NTYPES; i++) tmp[i] = ' ';
+ memset(tmp,' ', c_lenmax*H5FD_MEM_NTYPES);
tmp[c_lenmax*H5FD_MEM_NTYPES] = '\0';
for (i=0; i < H5FD_MEM_NTYPES; i++) {
memcpy(tmp_p, c_memb_name[i], strlen(c_memb_name[i]));
@@ -3036,7 +3036,7 @@ nh5pget_fapl_multi_c ( hid_t_f *prp_id , int_f *memb_map, hid_t_f *memb_fapl, _f
length = H5_MAX(length, strlen(c_memb_name[i]));
tmp_p = tmp_p + c_lenmax;
}
-HD5packFstring(tmp, _fcdtocp(memb_name), c_lenmax*H5FD_MEM_NTYPES);
+HD5packFstring(tmp, _fcdtocp(memb_name), (int)(c_lenmax*H5FD_MEM_NTYPES));
/*
* Take care of other arguments
@@ -3152,7 +3152,7 @@ nh5pget_filter_by_id_c(hid_t_f *prp_id, int_f* filter_id, int_f* flags, size_t_f
size_t c_cd_nelmts_in;
unsigned int * c_cd_values;
char* c_name;
- int i;
+ unsigned i;
herr_t status;
c_cd_nelmts_in = (size_t)*cd_nelmts;
c_cd_nelmts = (size_t)*cd_nelmts;
@@ -3176,7 +3176,7 @@ nh5pget_filter_by_id_c(hid_t_f *prp_id, int_f* filter_id, int_f* flags, size_t_f
*cd_nelmts = (size_t_f)c_cd_nelmts;
*flags = (int_f)c_flags;
- HD5packFstring(c_name, _fcdtocp(name), strlen(c_name));
+ HD5packFstring(c_name, _fcdtocp(name), (int)strlen(c_name));
for (i = 0; i < c_cd_nelmts_in; i++)
cd_values[i] = (int_f)c_cd_values[i];
@@ -3213,7 +3213,7 @@ nh5pmodify_filter_c (hid_t_f *prp_id, int_f* filter, int_f* flags, size_t_f* cd_
unsigned int c_flags;
H5Z_filter_t c_filter;
unsigned int * c_cd_values;
- int i;
+ unsigned i;
c_filter = (H5Z_filter_t)*filter;
c_flags = (unsigned)*flags;
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);
diff --git a/fortran/src/H5Tf.c b/fortran/src/H5Tf.c
index 51f66ba..3beadcd 100644
--- a/fortran/src/H5Tf.c
+++ b/fortran/src/H5Tf.c
@@ -981,19 +981,19 @@ nh5tget_nmembers_c ( hid_t_f *type_id , int_f * num_members)
*---------------------------------------------------------------------------*/
int_f
-nh5tget_member_name_c ( hid_t_f *type_id ,int_f* index, _fcd member_name, int_f *namelen)
+nh5tget_member_name_c ( hid_t_f *type_id ,int_f* idx, _fcd member_name, int_f *namelen)
{
int ret_value = -1;
hid_t c_type_id;
- int c_index;
+ unsigned c_index;
char *c_name;
c_type_id = *type_id;
- c_index = *index;
+ c_index = *idx;
c_name = H5Tget_member_name(c_type_id, c_index);
if (c_name == NULL ) return ret_value;
- HD5packFstring(c_name, _fcdtocp(member_name), strlen(c_name));
+ HD5packFstring(c_name, _fcdtocp(member_name), (int)strlen(c_name));
*namelen = (int_f)strlen(c_name);
HDfree(c_name);
ret_value = 0;
@@ -1013,7 +1013,7 @@ nh5tget_member_name_c ( hid_t_f *type_id ,int_f* index, _fcd member_name, int_f
* Modifications:
*---------------------------------------------------------------------------*/
int_f
-nh5tget_member_index_c (hid_t_f *type_id, _fcd name, int_f *namelen, int_f *index)
+nh5tget_member_index_c (hid_t_f *type_id, _fcd name, int_f *namelen, int_f *idx)
{
int ret_value = -1;
char *c_name;
@@ -1035,7 +1035,7 @@ nh5tget_member_index_c (hid_t_f *type_id, _fcd name, int_f *namelen, int_f *inde
c_index = H5Tget_member_index(c_type_id, c_name);
if (c_index < 0) goto DONE;
- *index = (int_f)c_index;
+ *idx = (int_f)c_index;
DONE:
HDfree(c_name);
ret_value = 0;
@@ -1064,7 +1064,7 @@ nh5tget_member_offset_c ( hid_t_f *type_id ,int_f* member_no, size_t_f * offset)
int ret_value = -1;
size_t c_offset;
hid_t c_type_id;
- int c_member_no;
+ unsigned c_member_no;
c_type_id = *type_id;
c_member_no = *member_no;
@@ -1193,7 +1193,7 @@ nh5tget_member_type_c ( hid_t_f *type_id ,int_f* field_idx, hid_t_f * datatype)
{
int ret_value = -1;
hid_t c_type_id;
- int c_field_idx;
+ unsigned c_field_idx;
c_type_id = *type_id;
c_field_idx = *field_idx;
@@ -1443,7 +1443,7 @@ nh5tenum_nameof_c(hid_t_f *type_id, int_f* value, _fcd name, size_t_f* namelen)
c_name = (char *)malloc(sizeof(char)*c_namelen);
c_type_id = *type_id;
error = H5Tenum_nameof(c_type_id, &c_value, c_name, c_namelen);
- HD5packFstring(c_name, _fcdtocp(name), strlen(c_name));
+ HD5packFstring(c_name, _fcdtocp(name), (int)strlen(c_name));
HDfree(c_name);
if(error < 0) return ret_value;
@@ -1506,7 +1506,7 @@ nh5tget_member_value_c(hid_t_f *type_id, int_f* member_no, int_f* value)
{
int ret_value = -1;
hid_t c_type_id;
- int c_member_no;
+ unsigned c_member_no;
int c_value;
herr_t error;
@@ -1577,7 +1577,7 @@ nh5tget_tag_c(hid_t_f* type_id, _fcd tag, int_f* taglen)
c_tag = H5Tget_tag(c_type_id);
if (c_tag == NULL ) return ret_value;
- HD5packFstring(c_tag, _fcdtocp(tag), strlen(c_tag));
+ HD5packFstring(c_tag, _fcdtocp(tag), (int)strlen(c_tag));
*taglen = strlen(c_tag);
HDfree(c_tag);
ret_value = 0;
diff --git a/fortran/src/H5f90kit.c b/fortran/src/H5f90kit.c
index 0f8fed4..5ea1bb6 100644
--- a/fortran/src/H5f90kit.c
+++ b/fortran/src/H5f90kit.c
@@ -78,10 +78,10 @@ HD5f2cstring(_fcd fdesc, int len)
/* This should be equivalent to the above test -QAK */
for(i=len-1; i>=0 && !isgraph((int)str[i]); i--)
/*EMPTY*/;
- cstr = (char *) HDmalloc( (i + 2));
+ cstr = (char *) HDmalloc( (size_t)(i + 2));
if (cstr == NULL) return NULL;
cstr[i + 1] = '\0';
- HDmemcpy(cstr,str,i+1);
+ HDmemcpy(cstr,str,(size_t)(i+1));
return cstr;
} /* HD5f2cstring */