summaryrefslogtreecommitdiffstats
path: root/tools/lib/h5tools.c
diff options
context:
space:
mode:
authorAllen Byrne <byrn@hdfgroup.org>2012-05-25 17:39:07 (GMT)
committerAllen Byrne <byrn@hdfgroup.org>2012-05-25 17:39:07 (GMT)
commiteb5b8163f93e4694ae834bac6f002f6ef895ffe8 (patch)
treeeb33855fc79c4fd1defd4a48b8f0552cf1589d3f /tools/lib/h5tools.c
parentd7bfa3617fefb3d1e0262d8940d687bfa9717667 (diff)
downloadhdf5-eb5b8163f93e4694ae834bac6f002f6ef895ffe8.zip
hdf5-eb5b8163f93e4694ae834bac6f002f6ef895ffe8.tar.gz
hdf5-eb5b8163f93e4694ae834bac6f002f6ef895ffe8.tar.bz2
[svn-r22411] reduce compiler warnings by removing unreferenced variables and adding cast
Tested: local linux
Diffstat (limited to 'tools/lib/h5tools.c')
-rw-r--r--tools/lib/h5tools.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/tools/lib/h5tools.c b/tools/lib/h5tools.c
index 17639bc..24aa81a 100644
--- a/tools/lib/h5tools.c
+++ b/tools/lib/h5tools.c
@@ -1051,6 +1051,7 @@ void
init_acc_pos(h5tools_context_t *ctx, hsize_t *dims)
{
int i;
+ unsigned j;
HDassert(ctx->ndims);
@@ -1058,8 +1059,8 @@ init_acc_pos(h5tools_context_t *ctx, hsize_t *dims)
for (i = (ctx->ndims - 2); i >= 0; i--) {
ctx->acc[i] = ctx->acc[i + 1] * dims[i + 1];
}
- for (i = 0; i < ctx->ndims; i++)
- ctx->pos[i] = 0;
+ for (j = 0; j < ctx->ndims; j++)
+ ctx->pos[j] = 0;
}
/*-------------------------------------------------------------------------
@@ -1525,7 +1526,7 @@ render_bin_output_region_data_blocks(hid_t region_id, FILE *stream,
if((type_size = H5Tget_size(type_id)) == 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Tget_size failed");
- if((region_buf = HDmalloc(type_size * numelem)) == NULL)
+ if((region_buf = HDmalloc(type_size * (size_t)numelem)) == NULL)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "Could not allocate region buffer");
/* Select (x , x , ..., x ) x (y , y , ..., y ) hyperslab for reading memory dataset */
@@ -1670,7 +1671,7 @@ render_bin_output_region_data_points(hid_t region_space, hid_t region_id,
if((type_size = H5Tget_size(type_id)) == 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Tget_size failed");
- if((region_buf = HDmalloc(type_size * npoints)) == NULL)
+ if((region_buf = HDmalloc(type_size * (size_t)npoints)) == NULL)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "Could not allocate buffer for region");
/* Allocate space for the dimension array */