summaryrefslogtreecommitdiffstats
path: root/fortran/src/H5Gf.c
diff options
context:
space:
mode:
authorElena Pourmal <epourmal@hdfgroup.org>2015-03-09 15:51:09 (GMT)
committerElena Pourmal <epourmal@hdfgroup.org>2015-03-09 15:51:09 (GMT)
commit1f4f709e8cdfaa4bc35d58c665008793d7e1cca1 (patch)
tree1e6de1167338d6b57b43ba6ce1d8f0852f05d324 /fortran/src/H5Gf.c
parent2a4ea9b24e5d28598b627fca39fb42a9baedfaa3 (diff)
downloadhdf5-1f4f709e8cdfaa4bc35d58c665008793d7e1cca1.zip
hdf5-1f4f709e8cdfaa4bc35d58c665008793d7e1cca1.tar.gz
hdf5-1f4f709e8cdfaa4bc35d58c665008793d7e1cca1.tar.bz2
[svn-r26401] Fixed warnings in the C stubs for Fortran wrappers. See Crucible review HDF5-238.
Tested on platypus with gcc/gfortran 4.9.2, jam and emu with the default compilers.
Diffstat (limited to 'fortran/src/H5Gf.c')
-rw-r--r--fortran/src/H5Gf.c37
1 files changed, 35 insertions, 2 deletions
diff --git a/fortran/src/H5Gf.c b/fortran/src/H5Gf.c
index 5ebb3e7..ad3ea49 100644
--- a/fortran/src/H5Gf.c
+++ b/fortran/src/H5Gf.c
@@ -178,7 +178,7 @@ nh5gget_obj_info_idx_c(hid_t_f *loc_id, _fcd name, int_f *namelen, int_f *idx,
char *c_name = NULL;
size_t c_obj_namelen;
char *c_obj_name = NULL;
- hsize_t c_idx = *idx;
+ hsize_t c_idx = (hsize_t)*idx;
hid_t gid = (-1); /* Temporary group ID */
int ret_value = -1;
@@ -191,7 +191,7 @@ nh5gget_obj_info_idx_c(hid_t_f *loc_id, _fcd name, int_f *namelen, int_f *idx,
/*
* Allocate buffer to hold name of the object
*/
- c_obj_namelen = *obj_namelen;
+ c_obj_namelen = (size_t)*obj_namelen;
if(c_obj_namelen)
if(NULL == (c_obj_name = (char *)HDmalloc(c_obj_namelen + 1)))
goto DONE;
@@ -352,6 +352,23 @@ nh5glink_c(hid_t_f *loc_id, int_f *link_type, _fcd current_name,
goto DONE;
break;
+ /* Cases below were added to remove the warnings in gcc 4.9.2 and probably other */
+ case H5L_TYPE_EXTERNAL:
+ ret_value = -1;
+ goto DONE;
+ break;
+
+ case H5L_TYPE_MAX:
+ ret_value = -1;
+ goto DONE;
+ break;
+
+ case H5L_TYPE_ERROR:
+ ret_value = -1;
+ goto DONE;
+ break;
+ /* End of the warnings fix */
+
default: /* Unknown/unhandled link type */
goto DONE;
} /* end switch */
@@ -421,6 +438,22 @@ nh5glink2_c(hid_t_f *cur_loc_id, _fcd cur_name, int_f *cur_namelen,
if(H5Lcreate_soft(c_cur_name, (hid_t)*new_loc_id, c_new_name, H5P_DEFAULT, H5P_DEFAULT) < 0)
goto DONE;
break;
+ /* Cases below were added to remove the warnings in gcc 4.9.2 and probably other */
+ case H5L_TYPE_EXTERNAL:
+ ret_value = -1;
+ goto DONE;
+ break;
+
+ case H5L_TYPE_MAX:
+ ret_value = -1;
+ goto DONE;
+ break;
+
+ case H5L_TYPE_ERROR:
+ ret_value = -1;
+ goto DONE;
+ break;
+ /* End of the warnings fix */
default: /* Unknown/unhandled link type */
goto DONE;