summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2007-03-27 03:06:48 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2007-03-27 03:06:48 (GMT)
commitc64ac252cdd9fe40b96313e2435551f16428b9d6 (patch)
tree9ff6633ac3ee8fe9529620a0ecfc99bbbab451f8 /tools
parentddf436469153cc5deb7cadfdb9a1b985c605774f (diff)
downloadhdf5-c64ac252cdd9fe40b96313e2435551f16428b9d6.zip
hdf5-c64ac252cdd9fe40b96313e2435551f16428b9d6.tar.gz
hdf5-c64ac252cdd9fe40b96313e2435551f16428b9d6.tar.bz2
[svn-r13549] Description:
Check in changes from Elena and I to get pgcc compiler working again. Primarily (all?) changes to move from using 'hsize_t' as array index to using something else ('size_t') mostly. Tested on: Linux/32 2.4 kagiso w/pgcc
Diffstat (limited to 'tools')
-rw-r--r--tools/lib/h5tools.c20
-rw-r--r--tools/lib/h5tools_str.c6
2 files changed, 14 insertions, 12 deletions
diff --git a/tools/lib/h5tools.c b/tools/lib/h5tools.c
index 322fb27..8f04e76 100644
--- a/tools/lib/h5tools.c
+++ b/tools/lib/h5tools.c
@@ -735,7 +735,9 @@ h5tools_dump_simple_subset(FILE *stream, const h5tool_format_t *info, hid_t dset
{
herr_t ret; /* the value to return */
hid_t f_space; /* file data space */
- hsize_t i, j, n; /* counters */
+ size_t i; /* counters */
+ size_t j; /* counters */
+ hsize_t n; /* counters */
hsize_t zero = 0; /* vector of zeros */
unsigned int flags; /* buffer extent flags */
hsize_t total_size[H5S_MAX_RANK];/* total size of dataset*/
@@ -780,7 +782,7 @@ h5tools_dump_simple_subset(FILE *stream, const h5tool_format_t *info, hid_t dset
/* assume entire data space to be printed */
if (ctx.ndims > 0)
- for (i = 0; i < ctx.ndims; i++)
+ for (i = 0; i < (size_t)ctx.ndims; i++)
ctx.p_min_idx[i] = 0;
H5Sget_simple_extent_dims(f_space, total_size, NULL);
@@ -794,7 +796,7 @@ h5tools_dump_simple_subset(FILE *stream, const h5tool_format_t *info, hid_t dset
/* get the offset count */
outer_count = 1;
if (ctx.ndims > 2)
- for (i = 0; i < ctx.ndims - 2; i++)
+ for (i = 0; i < (size_t)ctx.ndims - 2; i++)
outer_count *= sset->count[ i ];
if(ctx.ndims>0)
@@ -802,7 +804,7 @@ h5tools_dump_simple_subset(FILE *stream, const h5tool_format_t *info, hid_t dset
/* initialize temporary start, count and maximum start */
- for (i = 0; i < ctx.ndims; i++)
+ for (i = 0; i < (size_t)ctx.ndims; i++)
{
temp_start[ i ] = sset->start[ i ];
temp_count[ i ] = sset->count[ i ];
@@ -811,7 +813,7 @@ h5tools_dump_simple_subset(FILE *stream, const h5tool_format_t *info, hid_t dset
}
if (ctx.ndims > 2)
{
- for (i = 0; i < ctx.ndims - 2; i++)
+ for (i = 0; i < (size_t)ctx.ndims - 2; i++)
{
max_start[ i ] = temp_start[ i ] + sset->count[ i ];
temp_count[ i ] = 1;
@@ -896,10 +898,10 @@ h5tools_dump_simple_subset(FILE *stream, const h5tool_format_t *info, hid_t dset
the element position at the start of hyperslab */
H5Sget_select_bounds(f_space,low,high);
elmtno=0;
- for (i = 0; i < ctx.ndims-1; i++)
+ for (i = 0; i < (size_t)ctx.ndims-1; i++)
{
hsize_t offset = 1; /* accumulation of the previous dimensions */
- for (j = i+1; j < ctx.ndims; j++)
+ for (j = i+1; j < (size_t)ctx.ndims; j++)
offset *= total_size[j];
elmtno+= low[i] * offset;
}
@@ -989,7 +991,7 @@ h5tools_dump_simple_dset(FILE *stream, const h5tool_format_t *info, hid_t dset,
{
hid_t f_space; /* file data space */
hsize_t elmtno; /* counter */
- hsize_t i; /* counter */
+ size_t i; /* counter */
int carry; /* counter carry value */
hsize_t zero[8]; /* vector of zeros */
unsigned int flags; /* buffer extent flags */
@@ -1037,7 +1039,7 @@ h5tools_dump_simple_dset(FILE *stream, const h5tool_format_t *info, hid_t dset,
/* Assume entire data space to be printed */
if (ctx.ndims > 0)
- for (i = 0; i < ctx.ndims; i++)
+ for (i = 0; i < (size_t)ctx.ndims; i++)
ctx.p_min_idx[i] = 0;
H5Sget_simple_extent_dims(f_space, total_size, NULL);
diff --git a/tools/lib/h5tools_str.c b/tools/lib/h5tools_str.c
index b4c5cc3..57758a1 100644
--- a/tools/lib/h5tools_str.c
+++ b/tools/lib/h5tools_str.c
@@ -312,7 +312,7 @@ h5tools_str_prefix(h5tools_str_t *str/*in,out*/, const h5tool_format_t *info,
hsize_t max_idx[], h5tools_context_t *ctx)
{
hsize_t p_prod[H5S_MAX_RANK];
- hsize_t i = 0;
+ size_t i = 0;
hsize_t curr_pos=elmtno;
h5tools_str_reset(str);
@@ -325,7 +325,7 @@ h5tools_str_prefix(h5tools_str_t *str/*in,out*/, const h5tool_format_t *info,
for (i = ndims - 1, p_prod[ndims - 1] = 1; i > 0; --i)
p_prod[i - 1] = (max_idx[i] - min_idx[i]) * p_prod[i];
- for ( i = 0; i < (hsize_t)ndims; i++)
+ for ( i = 0; i < (size_t)ndims; i++)
{
ctx->pos[i] = curr_pos/ctx->acc[i];
curr_pos -= ctx->acc[i]*ctx->pos[i];
@@ -333,7 +333,7 @@ h5tools_str_prefix(h5tools_str_t *str/*in,out*/, const h5tool_format_t *info,
assert( curr_pos == 0 );
/* Print the index values */
- for (i = 0; i < (hsize_t)ndims; i++) {
+ for (i = 0; i < (size_t)ndims; i++) {
if (i)
h5tools_str_append(str, "%s", OPT(info->idx_sep, ","));