summaryrefslogtreecommitdiffstats
path: root/tools/misc
diff options
context:
space:
mode:
authorVailin Choi <vchoi@hdfgroup.org>2007-07-14 20:37:49 (GMT)
committerVailin Choi <vchoi@hdfgroup.org>2007-07-14 20:37:49 (GMT)
commit035152a58577e39ecd104e252032800923963648 (patch)
treeb43dfa0048e576e44c9cd126aecc45ca829a496b /tools/misc
parent7ff9aa3538d0ec7d1492ff79befe5f21afbf2b61 (diff)
downloadhdf5-035152a58577e39ecd104e252032800923963648.zip
hdf5-035152a58577e39ecd104e252032800923963648.tar.gz
hdf5-035152a58577e39ecd104e252032800923963648.tar.bz2
[svn-r13980] Cast num_objs, num_attrs and dims to "size_t" due to the -Mbounds problem
of the pgi-32 bit on indexing.
Diffstat (limited to 'tools/misc')
-rw-r--r--tools/misc/h5stat.c15
1 files changed, 11 insertions, 4 deletions
diff --git a/tools/misc/h5stat.c b/tools/misc/h5stat.c
index 27566b9..d10e2d1 100644
--- a/tools/misc/h5stat.c
+++ b/tools/misc/h5stat.c
@@ -405,6 +405,9 @@ fix_name(const char *path, const char *base)
* (groups and attributes)
* 2. Gathered info for attributes
*
+ * Vailin Choi 14 July 2007
+ * Cast "num_objs" and "num_attrs" to size_t
+ * Due to the -Mbounds problem for the pgi-32 bit compiler on indexing
*
*-------------------------------------------------------------------------
*/
@@ -438,7 +441,7 @@ group_stats (hid_t group, const char *name, const char * fullname, H5G_stat_t *
H5Gget_num_objs(gid, &num_objs);
if(num_objs < SIZE_SMALL_GROUPS)
- (iter->num_small_groups[num_objs])++;
+ (iter->num_small_groups[(size_t)num_objs])++;
if(num_objs > iter->max_fanout)
iter->max_fanout = num_objs;
@@ -473,7 +476,7 @@ group_stats (hid_t group, const char *name, const char * fullname, H5G_stat_t *
}
if(num_attrs < SIZE_SMALL_ATTRS)
- (iter->num_small_attrs[num_attrs])++;
+ (iter->num_small_attrs[(size_t)num_attrs])++;
if(num_attrs > iter->max_attrs)
iter->max_attrs = num_attrs;
@@ -530,6 +533,10 @@ group_stats (hid_t group, const char *name, const char * fullname, H5G_stat_t *
* (chunked datasets and attributes)
* 2. Gathered info for attributes
*
+ * Vailin Choi 14 July 2007
+ * Cast "dims" and "num_attrs" to size_t
+ * Due to the -Mbounds problem for the pgi-32bit compiler on indexing
+ *
*-------------------------------------------------------------------------
*/
static herr_t
@@ -579,7 +586,7 @@ dataset_stats (hid_t group, const char *name, H5G_stat_t * _sb, iter_t *_iter)
}
if(num_attrs < SIZE_SMALL_ATTRS)
- (iter->num_small_attrs[num_attrs])++;
+ (iter->num_small_attrs[(size_t)num_attrs])++;
if(num_attrs > iter->max_attrs)
iter->max_attrs = num_attrs;
@@ -623,7 +630,7 @@ dataset_stats (hid_t group, const char *name, H5G_stat_t * _sb, iter_t *_iter)
if(ndims == 1) {
iter->max_dset_dims = dims[0];
if(dims[0] < SIZE_SMALL_DSETS)
- (iter->small_dset_dims[dims[0]])++;
+ (iter->small_dset_dims[(size_t)dims[0]])++;
/* Add dim count to proper bin */
bin = ceil_log10((unsigned long)dims[0]);