summaryrefslogtreecommitdiffstats
path: root/test/enum.c
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 /test/enum.c
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 'test/enum.c')
-rw-r--r--test/enum.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/test/enum.c b/test/enum.c
index b565cb0..ae746c4 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;
@@ -151,7 +152,7 @@ test_noconv(hid_t file)
if (H5Dwrite(dset, type, space, space, H5P_DEFAULT, data1)<0) goto error;
if (H5Dread(dset, type, space, space, H5P_DEFAULT, data2)<0) goto error;
- for (i=0; i<ds_size[0]; i++) {
+ for (i=0; i<(size_t)ds_size[0]; i++) {
if (data1[i]!=data2[i]) {
H5_FAILED();
printf(" data1[%lu]=%d, data2[%lu]=%d (should be same)\n",
@@ -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,
@@ -238,7 +240,7 @@ test_tr1(hid_t file)
if (H5Dwrite(dset, m_type, space, space, H5P_DEFAULT, data1)<0) goto error;
if (H5Dread(dset, m_type, space, space, H5P_DEFAULT, data2)<0) goto error;
- for (i=0; i<ds_size[0]; i++) {
+ for (i=0; i<(size_t)ds_size[0]; i++) {
if (data1[i]!=data2[i]) {
H5_FAILED();
printf(" data1[%lu]=%d, data2[%lu]=%d (should be same)\n",
@@ -293,7 +295,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,
@@ -328,7 +331,7 @@ test_tr2(hid_t file)
if (H5Dwrite(dset, m_type, space, space, H5P_DEFAULT, data1)<0) goto error;
if (H5Dread(dset, m_type, space, space, H5P_DEFAULT, data2)<0) goto error;
- for (i=0; i<ds_size[0]; i++) {
+ for (i=0; i<(size_t)ds_size[0]; i++) {
if (data1[i]!=data2[i]) {
H5_FAILED();
printf(" data1[%lu]=%d, data2[%lu]=%d (should be same)\n",