diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2004-10-10 19:22:03 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2004-10-10 19:22:03 (GMT) |
commit | e1c1f5cc1543fccb47e46cc85531a6a4646e0fad (patch) | |
tree | 71394ddfeac675f0143fb788ef8307260548b2c3 /test/dtypes.c | |
parent | 166580844b2cd4fe36eded33d060e1ab6750e7a6 (diff) | |
download | hdf5-e1c1f5cc1543fccb47e46cc85531a6a4646e0fad.zip hdf5-e1c1f5cc1543fccb47e46cc85531a6a4646e0fad.tar.gz hdf5-e1c1f5cc1543fccb47e46cc85531a6a4646e0fad.tar.bz2 |
[svn-r9395] Purpose:
Bug fix
Description:
Correct a couple of array bounds issues exposed by the PGI compiler
Platforms tested:
Linux 2.4 (verbena) w/PGI compilers
Too minor too requie h5committest
Diffstat (limited to 'test/dtypes.c')
-rw-r--r-- | test/dtypes.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/test/dtypes.c b/test/dtypes.c index 2206134..3dfb53b 100644 --- a/test/dtypes.c +++ b/test/dtypes.c @@ -2695,7 +2695,7 @@ test_named (hid_t fapl) hid_t file=-1, type=-1, space=-1, dset=-1, t2=-1, attr1=-1; herr_t status; static hsize_t ds_size[2] = {10, 20}; - hsize_t i; + hsize_t i,j; unsigned attr_data[10][20]; char filename[1024]; @@ -2751,7 +2751,9 @@ test_named (hid_t fapl) /* It should be possible to define an attribute for the named type */ if ((attr1=H5Acreate (type, "attr1", H5T_NATIVE_UCHAR, space, H5P_DEFAULT))<0) goto error; - for (i=0; i<ds_size[0]*ds_size[1]; i++) attr_data[0][i] = (int)i;/*tricky*/ + for (i=0; i<ds_size[0]; i++) + for (j=0; j<ds_size[1]; j++) + attr_data[i][j] = (int)(i*ds_size[1]+j); if (H5Awrite(attr1, H5T_NATIVE_UINT, attr_data)<0) goto error; if (H5Aclose (attr1)<0) goto error; |