diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2006-10-23 20:40:14 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2006-10-23 20:40:14 (GMT) |
commit | e40557304fcfc662bb1a445abca516ee4b246d94 (patch) | |
tree | c9f1692443a62e0c481c7c0278e39d7b83d1b419 /src/H5Tnative.c | |
parent | 1062b4f9d7080a3e439df7d3d527aee43f96d085 (diff) | |
download | hdf5-e40557304fcfc662bb1a445abca516ee4b246d94.zip hdf5-e40557304fcfc662bb1a445abca516ee4b246d94.tar.gz hdf5-e40557304fcfc662bb1a445abca516ee4b246d94.tar.bz2 |
[svn-r12803] Description:
Finish new version of the I/O pipeline message, which is much smaller than
the previous version. This version is used with the "use the latest version
of the format" flag.
Closed several memory leaks/overruns (found with valgrind).
Also, lots of compiler & formatting cleanups.
Tested on:
Linux/32 2.6 (chicago)
Linux/64 2.6 (chicago2)
Diffstat (limited to 'src/H5Tnative.c')
-rw-r--r-- | src/H5Tnative.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/H5Tnative.c b/src/H5Tnative.c index fb525dc..13dbae1 100644 --- a/src/H5Tnative.c +++ b/src/H5Tnative.c @@ -200,7 +200,7 @@ H5T_get_native_type(H5T_t *dtype, H5T_direction_t direction, size_t *struct_alig if(H5T_IS_VL_STRING(dtype->shared)) { /* Update size, offset and compound alignment for parent. */ - if(H5T_cmp_offset(comp_size, offset, sizeof(char *), 1, H5T_POINTER_COMP_ALIGN_g, struct_align)<0) + if(H5T_cmp_offset(comp_size, offset, sizeof(char *), (size_t)1, H5T_POINTER_COMP_ALIGN_g, struct_align)<0) HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "cannot compute compound offset") } else { /* Update size, offset and compound alignment for parent. */ @@ -249,7 +249,7 @@ H5T_get_native_type(H5T_t *dtype, H5T_direction_t direction, size_t *struct_alig ref_size = sizeof(hdset_reg_ref_t); } - if(H5T_cmp_offset(comp_size, offset, ref_size, 1, align, struct_align)<0) + if(H5T_cmp_offset(comp_size, offset, ref_size, (size_t)1, align, struct_align)<0) HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "cannot compute compound offset") } break; @@ -368,7 +368,7 @@ H5T_get_native_type(H5T_t *dtype, H5T_direction_t direction, size_t *struct_alig HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "cannot get member value") HDmemcpy(memb_value, tmp_memb_value, H5T_get_size(super_type)); - if(H5Tconvert(super_type_id, nat_super_type_id, 1, memb_value, NULL, H5P_DEFAULT)<0) + if(H5Tconvert(super_type_id, nat_super_type_id, (size_t)1, memb_value, NULL, H5P_DEFAULT)<0) HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "cannot get member value") if(H5T_enum_insert(new_type, memb_name, memb_value)<0) @@ -468,7 +468,7 @@ H5T_get_native_type(H5T_t *dtype, H5T_direction_t direction, size_t *struct_alig vl_align = H5T_HVL_COMP_ALIGN_g; vl_size = sizeof(hvl_t); - if(H5T_cmp_offset(comp_size, offset, vl_size, 1, vl_align, struct_align)<0) + if(H5T_cmp_offset(comp_size, offset, vl_size, (size_t)1, vl_align, struct_align)<0) HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "cannot compute compound offset") ret_value = new_type; @@ -660,7 +660,7 @@ H5T_get_native_integer(size_t prec, H5T_sign_t sign, H5T_direction_t direction, HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "cannot copy type") /* compute size and offset of compound type member. */ - if(H5T_cmp_offset(comp_size, offset, native_size, 1, align, struct_align)<0) + if(H5T_cmp_offset(comp_size, offset, native_size, (size_t)1, align, struct_align)<0) HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "cannot compute compound offset") done: @@ -810,7 +810,7 @@ H5T_get_native_float(size_t size, H5T_direction_t direction, size_t *struct_alig HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "cannot retrieve float type") /* compute offset of compound type member. */ - if(H5T_cmp_offset(comp_size, offset, native_size, 1, align, struct_align)<0) + if(H5T_cmp_offset(comp_size, offset, native_size, (size_t)1, align, struct_align)<0) HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "cannot compute compound offset") done: |