diff options
author | Pedro Vicente Nunes <pvn@hdfgroup.org> | 2008-09-18 16:06:28 (GMT) |
---|---|---|
committer | Pedro Vicente Nunes <pvn@hdfgroup.org> | 2008-09-18 16:06:28 (GMT) |
commit | fffa1adc9aa4f0e2b099f130750346b4526c15d1 (patch) | |
tree | 6ca70ab4c60b13361d6932307b2e20ac721f58b7 /tools/h5repack/h5repack.c | |
parent | c3b40626a0e49bc8169d0dd0cbb956a8297f5999 (diff) | |
download | hdf5-fffa1adc9aa4f0e2b099f130750346b4526c15d1.zip hdf5-fffa1adc9aa4f0e2b099f130750346b4526c15d1.tar.gz hdf5-fffa1adc9aa4f0e2b099f130750346b4526c15d1.tar.bz2 |
[svn-r15652] Cleaned compiler warnings
Bug fix: do not print print compression ratio when the requested filter is NONE
Tested: windows, linux
Diffstat (limited to 'tools/h5repack/h5repack.c')
-rw-r--r-- | tools/h5repack/h5repack.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/tools/h5repack/h5repack.c b/tools/h5repack/h5repack.c index 8408778..2d3ff65 100644 --- a/tools/h5repack/h5repack.c +++ b/tools/h5repack/h5repack.c @@ -101,9 +101,9 @@ int h5repack_init (pack_opt_t *options, for ( n = 0; n < H5_REPACK_MAX_NFILTERS; n++) { options->filter_g[n].filtn = -1; - options->filter_g[n].cd_nelmts = -1; + options->filter_g[n].cd_nelmts = 0; for ( k = 0; k < CD_VALUES; k++) - options->filter_g[n].cd_values[k] = -1; + options->filter_g[n].cd_values[k] = 0; } return (options_table_init(&(options->op_tbl))); @@ -520,18 +520,18 @@ static int check_objects(const char* fname, /* chunk size must be smaller than pixels per block */ case H5Z_FILTER_SZIP: { - int j; - int csize = 1; - int ppb = options->op_tbl->objs[i].filter->cd_values[0]; - hsize_t dims[H5S_MAX_RANK]; - int rank; - hid_t did; - hid_t sid; + int j; + hsize_t csize = 1; + unsigned ppb = options->op_tbl->objs[i].filter->cd_values[0]; + hsize_t dims[H5S_MAX_RANK]; + int rank; + hid_t did; + hid_t sid; if(options->op_tbl->objs[i].chunk.rank > 0) { rank = options->op_tbl->objs[i].chunk.rank; for(j = 0; j < rank; j++) - csize *= (int)options->op_tbl->objs[i].chunk.chunk_lengths[j]; + csize *= options->op_tbl->objs[i].chunk.chunk_lengths[j]; } else { if((did = H5Dopen2(fid, name, H5P_DEFAULT)) < 0) @@ -544,7 +544,7 @@ static int check_objects(const char* fname, if(H5Sget_simple_extent_dims(sid, dims, NULL) < 0) goto out; for(j = 0; j < rank; j++) - csize *= (int)dims[j]; + csize *= dims[j]; if(H5Sclose(sid) < 0) goto out; if(H5Dclose(did) < 0) |