summaryrefslogtreecommitdiffstats
path: root/fortran/src/H5Ff.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2010-05-27 19:20:58 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2010-05-27 19:20:58 (GMT)
commit2f5164b1047a705e81fff46f1b8107426cbcc61b (patch)
tree96d67dc8a91cd7f14ec205d10239e60e653640b5 /fortran/src/H5Ff.c
parent006aa8245212decdc7f9b6d25283e409502c3b1a (diff)
downloadhdf5-2f5164b1047a705e81fff46f1b8107426cbcc61b.zip
hdf5-2f5164b1047a705e81fff46f1b8107426cbcc61b.tar.gz
hdf5-2f5164b1047a705e81fff46f1b8107426cbcc61b.tar.bz2
[svn-r18915] Description:
Clean up a couple of compiler warnings (in Windows). Tested on: Mac OS X/32 10.6.3 (amazon) w/debug (too minor to require h5committest)
Diffstat (limited to 'fortran/src/H5Ff.c')
-rw-r--r--fortran/src/H5Ff.c50
1 files changed, 27 insertions, 23 deletions
diff --git a/fortran/src/H5Ff.c b/fortran/src/H5Ff.c
index 51a53a8..9640444 100644
--- a/fortran/src/H5Ff.c
+++ b/fortran/src/H5Ff.c
@@ -444,32 +444,36 @@ nh5fget_obj_count_c ( hid_t_f *file_id , int_f *obj_type, size_t_f * obj_count)
* number of open objects
* Thursday, September 25, 2008 EIP
*---------------------------------------------------------------------------*/
-
int_f
-nh5fget_obj_ids_c ( hid_t_f *file_id , int_f *obj_type, size_t_f *max_objs, hid_t_f *obj_ids, size_t_f *num_objs)
+nh5fget_obj_ids_c(hid_t_f *file_id, int_f *obj_type, size_t_f *max_objs,
+ hid_t_f *obj_ids, size_t_f *num_objs)
{
- int ret_value = 0;
- hid_t c_file_id;
- unsigned c_obj_type;
- int i;
- size_t c_max_objs;
- ssize_t c_num_objs;
- hid_t *c_obj_ids;
-
- c_file_id = (hid_t)*file_id;
- c_obj_type = (unsigned) *obj_type;
- c_max_objs = (size_t)*max_objs;
- c_obj_ids = (hid_t *)HDmalloc(sizeof(hid_t)*c_max_objs);
-
- c_num_objs = H5Fget_obj_ids(c_file_id, c_obj_type, c_max_objs, c_obj_ids);
- if ( c_num_objs < 0 ) ret_value = -1;
- for (i=0; i< c_max_objs; i++) obj_ids[i] = (hid_t_f)c_obj_ids[i];
-
- HDfree(c_obj_ids);
- *num_objs = (size_t_f)c_num_objs;
-
- return ret_value;
+ int ret_value = 0;
+ hid_t c_file_id;
+ unsigned c_obj_type;
+ size_t u;
+ size_t c_max_objs;
+ ssize_t c_num_objs;
+ hid_t *c_obj_ids;
+
+ c_file_id = (hid_t)*file_id;
+ c_obj_type = (unsigned) *obj_type;
+ c_max_objs = (size_t)*max_objs;
+ c_obj_ids = (hid_t *)HDmalloc(sizeof(hid_t)*c_max_objs);
+
+ c_num_objs = H5Fget_obj_ids(c_file_id, c_obj_type, c_max_objs, c_obj_ids);
+ if(c_num_objs < 0)
+ ret_value = -1;
+ for(u = 0; u < c_max_objs; u++)
+ obj_ids[u] = (hid_t_f)c_obj_ids[u];
+
+ HDfree(c_obj_ids);
+ *num_objs = (size_t_f)c_num_objs;
+
+ return ret_value;
}
+
+
/*----------------------------------------------------------------------------
* Name: h5fget_freespace_c
* Purpose: Call H5Fget_freespace to get amount of free space within a file