summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2007-03-30 19:35:30 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2007-03-30 19:35:30 (GMT)
commitdd3768ee25e4db04301f26f699f731ea8f5291fa (patch)
treec292946c8bc6352db1d1bce2a721ac19e8cd2e32 /test
parent189edf82048c2ef3769104d812864229af2adcc6 (diff)
downloadhdf5-dd3768ee25e4db04301f26f699f731ea8f5291fa.zip
hdf5-dd3768ee25e4db04301f26f699f731ea8f5291fa.tar.gz
hdf5-dd3768ee25e4db04301f26f699f731ea8f5291fa.tar.bz2
[svn-r13571] Description:
Correct various array indices to use 'size_t' instead of 'hsize_t' to make the PGI compiler happy. Tested on: Linux/32 2.4 (kagiso) w/PGI C compiler
Diffstat (limited to 'test')
-rw-r--r--test/dsets.c16
-rw-r--r--test/dtypes.c2
-rw-r--r--test/enum.c9
-rw-r--r--test/external.c2
-rw-r--r--test/flush1.c2
-rw-r--r--test/flush2.c2
-rw-r--r--test/istore.c2
7 files changed, 19 insertions, 16 deletions
diff --git a/test/dsets.c b/test/dsets.c
index 9e89b2a..d7f2de2 100644
--- a/test/dsets.c
+++ b/test/dsets.c
@@ -1311,7 +1311,7 @@ test_filter_internal(hid_t fid, const char *name, hid_t dcpl, int if_fletcher32,
const hsize_t hs_offset[2] = {FILTER_HS_OFFSET1, FILTER_HS_OFFSET2}; /* Hyperslab offset */
const hsize_t hs_size[2] = {FILTER_HS_SIZE1, FILTER_HS_SIZE2}; /* Hyperslab size */
void *tconv_buf = NULL; /* Temporary conversion buffer */
- hsize_t i, j, n; /* Local index variables */
+ size_t i, j, n; /* Local index variables */
herr_t status; /* Error status */
/* Create the data space */
@@ -1562,7 +1562,7 @@ test_filter_internal(hid_t fid, const char *name, hid_t dcpl, int if_fletcher32,
for (i=0; i<hs_size[0]; i++) {
for (j=0; j<hs_size[1]; j++) {
- points[hs_offset[0]+i][hs_offset[1]+j] = (int)HDrandom();
+ points[(size_t)hs_offset[0]+i][(size_t)hs_offset[1]+j] = (int)HDrandom();
}
}
if (H5Sselect_hyperslab(sid, H5S_SELECT_SET, hs_offset, NULL, hs_size,
@@ -1598,8 +1598,8 @@ test_filter_internal(hid_t fid, const char *name, hid_t dcpl, int if_fletcher32,
/* Check that the values read are the same as the values written */
for (i=0; i<hs_size[0]; i++) {
for (j=0; j<hs_size[1]; j++) {
- if (points[hs_offset[0]+i][hs_offset[1]+j] !=
- check[hs_offset[0]+i][hs_offset[1]+j]) {
+ if (points[(size_t)hs_offset[0]+i][(size_t)hs_offset[1]+j] !=
+ check[(size_t)hs_offset[0]+i][(size_t)hs_offset[1]+j]) {
H5_FAILED();
fprintf(stderr," Read different values than written.\n");
fprintf(stderr," At index %lu,%lu\n",
@@ -2166,7 +2166,7 @@ test_missing_filter(hid_t file)
const hsize_t dims[2] = {DSET_DIM1, DSET_DIM2}; /* Dataspace dimensions */
const hsize_t chunk_dims[2] = {2, 25}; /* Chunk dimensions */
hsize_t dset_size; /* Dataset size */
- hsize_t i,j; /* Local index variables */
+ size_t i,j; /* Local index variables */
herr_t ret; /* Generic return value */
char testfile[512]=""; /* Buffer to hold name of existing test file */
char *srcdir = HDgetenv("srcdir"); /* The source directory, if we are using the --srcdir configure option */
@@ -2418,7 +2418,7 @@ test_onebyte_shuffle(hid_t file)
const hsize_t chunk_size[2] = {10, 20};
unsigned char orig_data[10][20];
unsigned char new_data[10][20];
- hsize_t i, j;
+ size_t i, j;
#else /* H5_HAVE_FILTER_SHUFFLE */
const char *not_supported= " Data shuffling is not enabled.";
#endif /* H5_HAVE_FILTER_SHUFFLE */
@@ -2712,7 +2712,7 @@ test_can_apply(hid_t file)
const hsize_t dims[2] = {DSET_DIM1, DSET_DIM2}; /* Dataspace dimensions */
const hsize_t chunk_dims[2] = {2, 25}; /* Chunk dimensions */
hsize_t dset_size; /* Dataset size */
- hsize_t i,j; /* Local index variables */
+ size_t i,j; /* Local index variables */
TESTING("dataset filter 'can apply' callback");
@@ -3073,7 +3073,7 @@ test_set_local(hid_t fapl)
const hsize_t chunk_dims[2] = {2, 25}; /* Chunk dimensions */
hsize_t dset_size; /* Dataset size */
unsigned cd_values[2]={BOGUS2_PARAM_1, BOGUS2_PARAM_2}; /* Parameters for Bogus2 filter */
- hsize_t i,j; /* Local index variables */
+ size_t i,j; /* Local index variables */
double n; /* Local index variables */
TESTING("dataset filter 'set local' callback");
diff --git a/test/dtypes.c b/test/dtypes.c
index bc7d926..4cacd57 100644
--- a/test/dtypes.c
+++ b/test/dtypes.c
@@ -3305,7 +3305,7 @@ test_named (hid_t fapl)
hid_t file=-1, type=-1, space=-1, dset=-1, t2=-1, t3=-1, attr1=-1;
herr_t status;
static hsize_t ds_size[2] = {10, 20};
- hsize_t i,j;
+ size_t i,j;
unsigned attr_data[10][20];
char filename[1024];
diff --git a/test/enum.c b/test/enum.c
index 5ee1d16..4bc24a9 100644
--- a/test/enum.c
+++ b/test/enum.c
@@ -133,7 +133,8 @@ test_noconv(hid_t file)
E1_RED, E1_BLUE, E1_GREEN, E1_BLACK, E1_WHITE,
E1_RED, E1_WHITE, E1_GREEN, E1_GREEN, E1_BLUE};
c_e1 data2[NELMTS(data1)];
- hsize_t i, ds_size[1]={NELMTS(data1)};
+ hsize_t ds_size[1]={NELMTS(data1)};
+ size_t i;
TESTING("no-conversion datasets");
if ((cwg=H5Gcreate(file, "test_noconv", 0))<0) goto error;
@@ -202,7 +203,8 @@ static int
test_tr1(hid_t file)
{
hid_t cwg=-1, m_type=-1, f_type=-1, space=-1, dset=-1;
- hsize_t i, ds_size[1]={10};
+ hsize_t ds_size[1]={10};
+ size_t i;
c_e1 eval;
int ival;
static c_e1 data1[10]={E1_RED, E1_GREEN, E1_BLUE, E1_GREEN, E1_WHITE,
@@ -283,7 +285,8 @@ static int
test_tr2(hid_t file)
{
hid_t cwg=-1, m_type=-1, f_type=-1, space=-1, dset=-1;
- hsize_t i, ds_size[1]={10};
+ hsize_t ds_size[1]={10};
+ size_t i;
c_e1 val1;
int val2;
static c_e1 data1[10]={E1_RED, E1_GREEN, E1_BLUE, E1_GREEN, E1_WHITE,
diff --git a/test/external.c b/test/external.c
index 6b982e4..7243089 100644
--- a/test/external.c
+++ b/test/external.c
@@ -590,7 +590,7 @@ test_2 (hid_t fapl)
hid_t dset=-1; /*dataset */
hid_t grp=-1; /*group to emit diagnostics */
int fd; /*external file descriptors */
- hsize_t i, j; /*miscellaneous counters */
+ size_t i, j; /*miscellaneous counters */
hssize_t n; /*bytes of I/O */
char filename[1024]; /*file names */
int part[25], whole[100]; /*raw data buffers */
diff --git a/test/flush1.c b/test/flush1.c
index 43ebef7..98673ba 100644
--- a/test/flush1.c
+++ b/test/flush1.c
@@ -55,7 +55,7 @@ main(void)
hid_t fapl, file, dcpl, space, dset, groups, grp;
hsize_t ds_size[2] = {100, 100};
hsize_t ch_size[2] = {5, 5};
- hsize_t i, j;
+ size_t i, j;
char name[1024];
h5_reset();
diff --git a/test/flush2.c b/test/flush2.c
index ee04167..f564944 100644
--- a/test/flush2.c
+++ b/test/flush2.c
@@ -54,7 +54,7 @@ main(void)
hid_t fapl, file, space, dset, groups, grp;
hsize_t ds_size[2];
double error;
- hsize_t i, j;
+ size_t i, j;
char name[1024];
h5_reset();
diff --git a/test/istore.c b/test/istore.c
index 5bbb2cf..8fd55bf 100644
--- a/test/istore.c
+++ b/test/istore.c
@@ -225,7 +225,7 @@ test_extend(hid_t f, const char *prefix,
hid_t dataset; /* Dataset ID */
hid_t fspace; /* Dataset's file dataspace */
hid_t mspace; /* Dataset's memory dataspace */
- hsize_t i, j, k, ctr;
+ size_t i, j, k, ctr;
int ndims;
uint8_t *buf = NULL, *check = NULL, *whole = NULL;
char dims[64], s[256], name[256];