diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2001-11-04 03:23:30 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2001-11-04 03:23:30 (GMT) |
commit | 965e3bc3e20cefeb81b0b88002c1dc42d197c2ff (patch) | |
tree | 6fe49900b179c79bf8904760ce6b60953d70021e /tools/h4toh5 | |
parent | bd74bf3ff0139edfcd565989458cbbcaeaf6bfb6 (diff) | |
download | hdf5-965e3bc3e20cefeb81b0b88002c1dc42d197c2ff.zip hdf5-965e3bc3e20cefeb81b0b88002c1dc42d197c2ff.tar.gz hdf5-965e3bc3e20cefeb81b0b88002c1dc42d197c2ff.tar.bz2 |
[svn-r4591] Purpose:
Code cleanup
Description:
Fix a bunch of warnings
Platforms tested:
Linux 2.2 (eirene)
Diffstat (limited to 'tools/h4toh5')
-rw-r--r-- | tools/h4toh5/h4toh5main.c | 10 | ||||
-rw-r--r-- | tools/h4toh5/h4toh5sds.c | 26 | ||||
-rw-r--r-- | tools/h4toh5/h4toh5vdata.c | 10 | ||||
-rw-r--r-- | tools/h4toh5/h4toh5vgroup.c | 12 |
4 files changed, 25 insertions, 33 deletions
diff --git a/tools/h4toh5/h4toh5main.c b/tools/h4toh5/h4toh5main.c index 4b89656..51099d8 100644 --- a/tools/h4toh5/h4toh5main.c +++ b/tools/h4toh5/h4toh5main.c @@ -744,7 +744,7 @@ int h4toh5lonevgs(int32 file_id,int32 sd_id,hid_t h5group,hid_t h5_dimg,hid_t h5 } /* converting integer number into string format. */ - if(conv_int_str(ref_array[lone_vg_number],refstr) == FAIL) { + if(conv_int_str((int)ref_array[lone_vg_number],refstr) == FAIL) { printf("ref. is negative, error in converting\n"); Vdetach(vgroup_id); free(ref_array); @@ -942,7 +942,7 @@ int h4toh5vgrings(int32 file_id,int32 sd_id,hid_t h5group,hid_t h5_dimg,hid_t h5 } /* convert reference number into string format. */ - if(conv_int_str(ref_num,refstr) == FAIL) { + if(conv_int_str((uint16)ref_num,refstr) == FAIL) { printf("ref. is negative, error in converting\n"); Vdetach(vgroup_id); return FAIL; @@ -1100,7 +1100,7 @@ int h4toh5lonevds(int32 file_id, hid_t h5group,int h4_attr){ } /* converting reference number into string format.*/ - if(conv_int_str(ref_vdata_array[lone_vd_number],refstr)==FAIL) { + if(conv_int_str((uint16)ref_vdata_array[lone_vd_number],refstr)==FAIL) { printf("error in converting int to string.\n"); free(ref_vdata_array); VSdetach(vdata_id); @@ -1237,7 +1237,7 @@ int h4toh5unvisitedsds(int32 file_id,int32 sd_id,hid_t h5root,hid_t h5_dimg,int } /* convert object reference number into string format. */ - if(conv_int_str(obj_ref,refstr) == FAIL) { + if(conv_int_str((uint16)obj_ref,refstr) == FAIL) { printf("error in converting integer into string.\n"); SDendaccess(sds_id); return FAIL; @@ -1360,7 +1360,7 @@ int h4toh5unvisitedimages(int32 file_id,hid_t h5_root,hid_t h5_palg,int h4_attr) return FAIL; } - if(conv_int_str(obj_ref,refstr)== FAIL) { + if(conv_int_str((uint16)obj_ref,refstr)== FAIL) { printf("error in converting object reference number"); printf(" into string at h4toh5unvisitedimages routine.\n"); GRendaccess(ri_id); diff --git a/tools/h4toh5/h4toh5sds.c b/tools/h4toh5/h4toh5sds.c index 4e2a9d9..3163c0b 100644 --- a/tools/h4toh5/h4toh5sds.c +++ b/tools/h4toh5/h4toh5sds.c @@ -92,10 +92,10 @@ int Sds_h4_to_h5(int32 file_id,int32 sds_id,hid_t h5_group,hid_t h5_dimgroup,int hid_t h5ty_id; hid_t h5_memtype; hid_t create_plist; - hid_t write_plist; +/* hid_t write_plist; */ hsize_t h5dims[MAX_VAR_DIMS]; hsize_t max_h5dims[MAX_VAR_DIMS]; - hsize_t bufsize; +/* hsize_t bufsize; */ char* h5csds_name; herr_t ret; @@ -856,7 +856,7 @@ hid_t h5dim_nameaid; hid_t attribID; hid_t create_plist; - int dim_index; +/* int dim_index; */ hsize_t h5dimscas[1]; hsize_t max_h5dimscas[1]; hsize_t h5dim_dims[1]; @@ -1288,7 +1288,7 @@ int convert_sdsfillvalue(int32 file_id,int32 sds_id,hid_t h5_group,hid_t h5_dimg int32* sds_stride; int32 count_sdsdata; int32 sds_ref; - int32 istat; +/* int32 istat; */ int i; int32 num_sdsattrs; void* fill_value; @@ -1300,9 +1300,7 @@ int convert_sdsfillvalue(int32 file_id,int32 sds_id,hid_t h5_group,hid_t h5_dimg char sdslabel[MAX_NC_NAME]; size_t h4size; size_t h4memsize; - HDF_CHUNK_DEF c_def_out; hsize_t* chunk_dims; - int32 c_flags; /* define varibles for hdf5. */ @@ -1311,10 +1309,10 @@ int convert_sdsfillvalue(int32 file_id,int32 sds_id,hid_t h5_group,hid_t h5_dimg hid_t h5ty_id; hid_t h5_memtype; hid_t create_plist; - hid_t write_plist; +/* hid_t write_plist; */ hsize_t h5dims[MAX_VAR_DIMS]; hsize_t max_h5dims[MAX_VAR_DIMS]; - hsize_t bufsize; +/* hsize_t bufsize; */ char* h5csds_name; if (SDgetinfo(sds_id,sdsname,&sds_rank,sds_dimsizes,&sds_dtype, @@ -1704,8 +1702,9 @@ uint16 get_SDref(int32 file_id,uint16 tag,int32 sds_ref){ } sd_ref = di.ref; - if(!found) ; - /* printf("cannot find sd_ref\n");*/ +/* if(!found) + printf("cannot find sd_ref\n"); +*/ DFdifree(GroupID); return sd_ref; @@ -1721,15 +1720,10 @@ static int convert_zerosdsunlimit(int32 file_id, int32 sds_dtype; int32 sds_rank; int32 sds_dimsizes[MAX_VAR_DIMS]; - int32* sds_start; - int32* sds_edge; - int32* sds_stride; - int32 count_sdsdata; int32 sds_ref; int32 istat; int i; int32 num_sdsattrs; - void* fill_value; int check_sdsname; int check_gloattr; @@ -1756,10 +1750,8 @@ static int convert_zerosdsunlimit(int32 file_id, hid_t h5ty_id; hid_t h5_memtype; hid_t create_plist; - hid_t write_plist; hsize_t h5dims[MAX_VAR_DIMS]; hsize_t max_h5dims[MAX_VAR_DIMS]; - hsize_t bufsize; char* h5csds_name; if (SDgetinfo(sds_id,sdsname,&sds_rank,sds_dimsizes,&sds_dtype, diff --git a/tools/h4toh5/h4toh5vdata.c b/tools/h4toh5/h4toh5vdata.c index e4efd1d..07a2fa5 100644 --- a/tools/h4toh5/h4toh5vdata.c +++ b/tools/h4toh5/h4toh5vdata.c @@ -420,7 +420,7 @@ int Vdata_h4_to_h5(int32 file_id,int32 vdata_id, hid_t group_id,int h4_attr) { } } - if(h4_transnumattr(h5dset,HDF4_REF_NUM,vdata_ref)==FAIL){ + if(h4_transnumattr(h5dset,HDF4_REF_NUM,(uint16)vdata_ref)==FAIL){ printf("error in transfering vdata attributes.\n"); free(h5memtype); free(h5type); @@ -527,7 +527,7 @@ int vdata_transattrs(int32 vdata_id,hid_t h5dset,int snum_vdattrs, strcat(svdattr_name,":"); strcat(svdattr_name,"HDF4_VDATA_ATTR_"); - if(conv_int_str(field_index,refstr)==FAIL) { + if(conv_int_str((uint16)field_index,refstr)==FAIL) { printf("error in converting vdata field index to string.\n"); return FAIL; } @@ -570,7 +570,7 @@ int vdata_transattrs(int32 vdata_id,hid_t h5dset,int snum_vdattrs, return FAIL; } - if ((sh5str_memtype = mkstr(count_svdadata*sh4_amemsize, + if ((sh5str_memtype = mkstr((int)(count_svdadata*sh4_amemsize), H5T_STR_SPACEPAD))<0) { printf("error in making memory string for vdata attribute. \n"); free(svd_adata); @@ -731,7 +731,7 @@ int gen_h5comptype(int32 vdata_id,int32 nfields, if(sh5type[i] == H5T_STRING) { - if ((h5str_type = mkstr(sh4size[i]*fieldorder,H5T_STR_SPACEPAD))<0) { + if ((h5str_type = mkstr((int)(sh4size[i]*fieldorder),H5T_STR_SPACEPAD))<0) { printf("error in making string of hdf5 string. \n"); return FAIL; } @@ -741,7 +741,7 @@ int gen_h5comptype(int32 vdata_id,int32 nfields, if (sh5memtype[i] == H5T_STRING) { - if((h5str_type = mkstr(sh4memsize[i]*fieldorder,H5T_STR_SPACEPAD))<0){ + if((h5str_type = mkstr((int)(sh4memsize[i]*fieldorder),H5T_STR_SPACEPAD))<0){ printf("error in making string for VDATA in memory. \n"); return FAIL; } diff --git a/tools/h4toh5/h4toh5vgroup.c b/tools/h4toh5/h4toh5vgroup.c index 9d3bbef..7fed1c9 100644 --- a/tools/h4toh5/h4toh5vgroup.c +++ b/tools/h4toh5/h4toh5vgroup.c @@ -171,7 +171,7 @@ int Vgroup_h4_to_h5(int32 file_id,int32 vgroup_id,int32 sd_id,hid_t h5_group,hid return FAIL; } - if(conv_int_str(obj_ref,refstr)== FAIL) { + if(conv_int_str((uint16)obj_ref,refstr)== FAIL) { printf("failed to convert object reference number "); printf("into string format at vgroup_h4_to_h5 routine.\n"); H5Gclose(h5_pgroup); @@ -262,7 +262,7 @@ int convert_vgroup(int32 file_id,int32 sd_id, int32 obj_ref, char* h5lgroup_name; int check_vgroup; - if(conv_int_str(obj_ref,refstr)== FAIL) { + if(conv_int_str((uint16)obj_ref,refstr)== FAIL) { printf("converting integer into string format.\n"); return FAIL; } @@ -408,7 +408,7 @@ int convert_vdata(int32 file_id,int32 obj_ref,char * h5pgroup_name, return FAIL; } - if(conv_int_str(obj_ref,refstr)== FAIL) { + if(conv_int_str((uint16)obj_ref,refstr)== FAIL) { printf("converting integer into string format.\n"); VSdetach(vdata_id); return FAIL; @@ -558,7 +558,7 @@ int convert_sds(int32 file_id,int32 sd_id,int32 obj_ref,char * h5pgroup_name, return FAIL; } - if(conv_int_str(obj_ref,refstr)== FAIL) { + if(conv_int_str((uint16)obj_ref,refstr)== FAIL) { printf("error in converting reference number into string type.\n"); return FAIL; } @@ -695,12 +695,12 @@ int convert_image(int32 file_id,int32 obj_ref,char * h5pgroup_name, return FAIL; } - if(conv_int_str(obj_ref,refstr)== FAIL) { + if(conv_int_str((uint16)obj_ref,refstr)== FAIL) { printf("converting integer into string format.\n"); return FAIL; } - gr_index= GRreftoindex(gr_id,obj_ref); + gr_index= GRreftoindex(gr_id,(uint16)obj_ref); if(gr_index == FAIL) { printf("error in getting gr index.\n"); return FAIL; |