diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2010-10-21 23:12:56 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2010-10-21 23:12:56 (GMT) |
commit | cf7f386fd42ad520f6d2f3fc1ad1706bba791ae0 (patch) | |
tree | 24ae78f045403d9f115ac1ee3467541fc6eab745 /fortran/src/H5Tf.c | |
parent | f1c8df81fa128fc8bd4eeba7e24dc74de41dd419 (diff) | |
download | hdf5-cf7f386fd42ad520f6d2f3fc1ad1706bba791ae0.zip hdf5-cf7f386fd42ad520f6d2f3fc1ad1706bba791ae0.tar.gz hdf5-cf7f386fd42ad520f6d2f3fc1ad1706bba791ae0.tar.bz2 |
[svn-r19659] Description:
Bring r19639:19658 from trunk to revise_chunks branch.
Tested on:
FreeBSD/32 6.3 (duty) in debug mode
FreeBSD/64 6.3 (liberty) w/C++ & FORTRAN, in debug mode
Linux/32 2.6 (jam) w/PGI compilers, w/default API=1.8.x,
w/C++ & FORTRAN, w/threadsafe, in debug mode
Linux/64-amd64 2.6 (amani) w/Intel compilers, w/default API=1.6.x,
w/C++ & FORTRAN, in production mode
Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN,
w/szip filter, w/threadsafe, in production mode
Linux/PPC 2.6 (heiwa) w/C++ & FORTRAN, w/threadsafe, in debug mode
Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN,
in production mode
Linux/64-amd64 2.6 (abe) w/parallel, w/FORTRAN, in debug mode
Mac OS X/32 10.6.4 (amazon) in debug mode
Mac OS X/32 10.6.4 (amazon) w/C++ & FORTRAN, w/threadsafe,
in production mode
Mac OS X/32 10.6.4 (amazon) w/parallel, in debug mode
Diffstat (limited to 'fortran/src/H5Tf.c')
-rw-r--r-- | fortran/src/H5Tf.c | 27 |
1 files changed, 14 insertions, 13 deletions
diff --git a/fortran/src/H5Tf.c b/fortran/src/H5Tf.c index 13fea93..37cfca0 100644 --- a/fortran/src/H5Tf.c +++ b/fortran/src/H5Tf.c @@ -990,7 +990,7 @@ nh5tget_member_name_c ( hid_t_f *type_id ,int_f* idx, _fcd member_name, int_f *n char *c_name; c_type_id = *type_id; - c_index = *idx; + c_index = (unsigned)*idx; c_name = H5Tget_member_name(c_type_id, c_index); if (c_name == NULL ) return ret_value; @@ -1199,7 +1199,7 @@ nh5tget_member_type_c ( hid_t_f *type_id ,int_f* field_idx, hid_t_f * datatype) /*---------------------------------------------------------------------------- * Name: h5tcreate_c * Purpose: Call H5Tcreate to create a datatype - * Inputs: class - class type + * Inputs: cls - class type * size - size of the class memeber * Returns: 0 on success, -1 on failure * Programmer: Elena Pourmal @@ -1208,14 +1208,14 @@ nh5tget_member_type_c ( hid_t_f *type_id ,int_f* field_idx, hid_t_f * datatype) *---------------------------------------------------------------------------*/ int_f -nh5tcreate_c(int_f *class, size_t_f *size, hid_t_f *type_id) +nh5tcreate_c(int_f *cls, size_t_f *size, hid_t_f *type_id) { int ret_value = -1; H5T_class_t c_class; size_t c_size; c_size =(size_t) *size; - c_class = (H5T_class_t) *class; + c_class = (H5T_class_t) *cls; *type_id = (hid_t_f)H5Tcreate(c_class, c_size); if(*type_id < 0) return ret_value; @@ -1419,7 +1419,7 @@ nh5tenum_nameof_c(hid_t_f *type_id, int_f* value, _fcd name, size_t_f* namelen) int_f c_value; c_value = *value; c_namelen = ((size_t)*namelen) +1; - c_name = (char *)malloc(sizeof(char)*c_namelen); + c_name = (char *)HDmalloc(sizeof(char)*c_namelen); c_type_id = (hid_t)*type_id; error = H5Tenum_nameof(c_type_id, &c_value, c_name, c_namelen); HD5packFstring(c_name, _fcdtocp(name), strlen(c_name)); @@ -1617,7 +1617,7 @@ nh5tis_variable_str_c ( hid_t_f *type_id , int_f *flag ) * datatype member * Inputs: type_id - identifier of the dataspace * member_no - member's index - * Outputs: class - member's class + * Outputs: cls - member's class * and negative on failure. * Returns: 0 on success, -1 on failure * Programmer: Elena Pourmal @@ -1626,7 +1626,7 @@ nh5tis_variable_str_c ( hid_t_f *type_id , int_f *flag ) *---------------------------------------------------------------------------*/ int_f -nh5tget_member_class_c ( hid_t_f *type_id , int_f *member_no, int_f *class ) +nh5tget_member_class_c ( hid_t_f *type_id , int_f *member_no, int_f *cls ) { int ret_value = 0; hid_t c_type_id; @@ -1638,7 +1638,7 @@ nh5tget_member_class_c ( hid_t_f *type_id , int_f *member_no, int_f *class ) c_class = H5Tget_member_class(c_type_id, c_member_no); if ( c_class == H5T_NO_CLASS ) ret_value = -1; - *class = (int_f)c_class; + *cls = (int_f)c_class; return ret_value; } @@ -1766,18 +1766,18 @@ nh5tencode_c (_fcd buf, hid_t_f *obj_id, size_t_f *nalloc ) return ret_value; } - c_size = (size_t)*nalloc; /* * Allocate buffer */ - if ((c_buf = HDmalloc(c_size)) == NULL) + c_size = (size_t)*nalloc; + if(NULL == (c_buf = (unsigned char *)HDmalloc(c_size))) return ret_value; + /* * Call H5Tencode function. */ - if(H5Tencode((hid_t)*obj_id, c_buf, &c_size) < 0){ + if(H5Tencode((hid_t)*obj_id, c_buf, &c_size) < 0) return ret_value; - } /* copy the C buffer to the FORTRAN buffer. * Can not use HD5packFstring because we don't want to @@ -1788,7 +1788,8 @@ nh5tencode_c (_fcd buf, hid_t_f *obj_id, size_t_f *nalloc ) HDmemcpy(_fcdtocp(buf),(char *)c_buf,c_size); ret_value = 0; - if(c_buf) HDfree(c_buf); + if(c_buf) + HDfree(c_buf); return ret_value; } |