diff options
author | MuQun Yang <ymuqun@hdfgroup.org> | 2001-07-05 14:38:06 (GMT) |
---|---|---|
committer | MuQun Yang <ymuqun@hdfgroup.org> | 2001-07-05 14:38:06 (GMT) |
commit | e6379c6d3da0e9b81e3a1a14fbf64c2043fbc972 (patch) | |
tree | 0707564f101e04eeda06bf676c2649c822cf0732 | |
parent | 3f49c1a9debb911f40b44ee7e37c0b2dcfc09c9f (diff) | |
download | hdf5-e6379c6d3da0e9b81e3a1a14fbf64c2043fbc972.zip hdf5-e6379c6d3da0e9b81e3a1a14fbf64c2043fbc972.tar.gz hdf5-e6379c6d3da0e9b81e3a1a14fbf64c2043fbc972.tar.bz2 |
[svn-r4109]
Purpose:
a bug fix
Description:
declaration of chunk_dims is wrong. In HDF4, chunk dimensional size is defined
as int32, but in HDF5 it is defined as hsize_t. It causes problem in T3E.
Solution:
define chunk_dims as hsize_t and cast int32 into hsize_t
Platforms tested:
eirene
-rw-r--r-- | tools/h4toh5/h4toh5image.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/tools/h4toh5/h4toh5image.c b/tools/h4toh5/h4toh5image.c index 47c5363..6fddf05 100644 --- a/tools/h4toh5/h4toh5image.c +++ b/tools/h4toh5/h4toh5image.c @@ -64,7 +64,7 @@ int Image_h4_to_h5(int32 file_id,int32 ri_id,hid_t h5_group,hid_t h5_palgroup,in char* h5cimage_name; void* image_data; HDF_CHUNK_DEF c_def_out; - int32 chunk_dims[2]; + hsize_t chunk_dims[2]; int32 c_flags; /* for checking compression */ @@ -294,10 +294,10 @@ int Image_h4_to_h5(int32 file_id,int32 ri_id,hid_t h5_group,hid_t h5_palgroup,in if(c_def_out.comp.comp_type == COMP_CODE_RLE || c_def_out.comp.comp_type == COMP_CODE_NBIT || c_def_out.comp.comp_type == COMP_CODE_SKPHUFF || c_def_out.comp.comp_type == COMP_CODE_DEFLATE || c_def_out.comp.comp_type == COMP_CODE_JPEG) { - chunk_dims[0] = c_def_out.chunk_lengths[0]; - chunk_dims[1] = c_def_out.chunk_lengths[1]; + chunk_dims[0] = (hsize_t)c_def_out.chunk_lengths[0]; + chunk_dims[1] = (hsize_t)c_def_out.chunk_lengths[1]; - if(H5Pset_chunk(create_plist, 2, (hsize_t *)chunk_dims)<0) { + if(H5Pset_chunk(create_plist, 2, chunk_dims)<0) { printf("failed to set up chunking information for "); printf("property list.\n"); free(image_data); |