summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMuQun Yang <ymuqun@hdfgroup.org>2002-05-03 22:37:26 (GMT)
committerMuQun Yang <ymuqun@hdfgroup.org>2002-05-03 22:37:26 (GMT)
commit686a62c1d7d6784f469164395403a7fdf6502b5b (patch)
treef66b6c491444afbed6800dc1710957f5ee82aca0
parent0673d765124194b1a592913059ef32f93d2b1a13 (diff)
downloadhdf5-686a62c1d7d6784f469164395403a7fdf6502b5b.zip
hdf5-686a62c1d7d6784f469164395403a7fdf6502b5b.tar.gz
hdf5-686a62c1d7d6784f469164395403a7fdf6502b5b.tar.bz2
[svn-r5354]
Purpose: code clean up to erase windows warnings Description: Solution: Platforms tested: w2000, linux
-rw-r--r--tools/lib/h5tools.c8
-rw-r--r--tools/lib/h5tools_str.c8
2 files changed, 8 insertions, 8 deletions
diff --git a/tools/lib/h5tools.c b/tools/lib/h5tools.c
index df96d64..30de394 100644
--- a/tools/lib/h5tools.c
+++ b/tools/lib/h5tools.c
@@ -608,7 +608,7 @@ h5tools_dump_simple_subset(FILE *stream, const h5dump_t *info, hid_t dset,
{
herr_t ret; /*the value to return */
hid_t f_space; /*file data space */
- hsize_t elmtno, i; /*counters */
+ hsize_t i; /*counters */
hssize_t zero = 0; /*vector of zeros */
unsigned int flags; /*buffer extent flags */
hsize_t total_size[H5S_MAX_RANK];/*total size of dataset*/
@@ -651,7 +651,7 @@ h5tools_dump_simple_subset(FILE *stream, const h5dump_t *info, hid_t dset,
ctx.p_min_idx[i] = 0;
H5Sget_simple_extent_dims(f_space, total_size, NULL);
- ctx.size_last_dim = total_size[ctx.ndims - 1];
+ ctx.size_last_dim = (int)total_size[ctx.ndims - 1];
count = sset->count[ctx.ndims - 1];
sset->count[ctx.ndims - 1] = 1;
@@ -821,7 +821,7 @@ h5tools_dump_simple_dset(FILE *stream, const h5dump_t *info, hid_t dset,
ctx.p_min_idx[i] = 0;
H5Sget_simple_extent_dims(f_space, total_size, NULL);
- ctx.size_last_dim = total_size[ctx.ndims - 1];
+ ctx.size_last_dim = (int)total_size[ctx.ndims - 1];
/* calculate the number of elements we're going to print */
p_nelmts = 1;
@@ -978,7 +978,7 @@ h5tools_dump_simple_mem(FILE *stream, const h5dump_t *info, hid_t obj_id,
if (nelmts == 0)
return SUCCEED; /*nothing to print*/
- ctx.size_last_dim = ctx.p_max_idx[ctx.ndims - 1];
+ ctx.size_last_dim = (int)(ctx.p_max_idx[ctx.ndims - 1]);
/* Print it */
h5tools_dump_simple_data(stream, info, obj_id, &ctx,
diff --git a/tools/lib/h5tools_str.c b/tools/lib/h5tools_str.c
index d389b57..7aaea6a 100644
--- a/tools/lib/h5tools_str.c
+++ b/tools/lib/h5tools_str.c
@@ -808,7 +808,7 @@ h5tools_str_sprint(h5tools_str_t *str, const h5dump_t *info, hid_t container,
}
} else if (H5Tget_class(type) == H5T_ARRAY) {
int k, ndims;
- hsize_t i, dims[H5S_MAX_RANK];
+ hsize_t i, dims[H5S_MAX_RANK],temp_nelmts;
/* Get the array's base datatype for each element */
memb = H5Tget_super(type);
@@ -818,9 +818,9 @@ h5tools_str_sprint(h5tools_str_t *str, const h5dump_t *info, hid_t container,
assert(ndims >= 1 && ndims <= H5S_MAX_RANK);
/* Calculate the number of array elements */
- for (k = 0, nelmts = 1; k < ndims; k++)
- nelmts *= dims[k];
-
+ for (k = 0, temp_nelmts = 1; k < ndims; k++)
+ temp_nelmts *=dims[k];
+ H5_ASSIGN_OVERFLOW(nelmts,temp_nelmts,hsize_t,size_t);
/* Print the opening bracket */
h5tools_str_append(str, "%s", OPT(info->arr_pre, "["));