summaryrefslogtreecommitdiffstats
path: root/hl
diff options
context:
space:
mode:
authorScot Breitenfeld <brtnfld@hdfgroup.org>2009-06-30 16:25:45 (GMT)
committerScot Breitenfeld <brtnfld@hdfgroup.org>2009-06-30 16:25:45 (GMT)
commitb0b31943ae77e16c964e625430af1bfcbcce7e9b (patch)
tree29ee613433e7d3b141f9f3b593bd124cf9e2500a /hl
parenta5bacf487aa6e8a076127edae01d7fc802a3ce47 (diff)
downloadhdf5-b0b31943ae77e16c964e625430af1bfcbcce7e9b.zip
hdf5-b0b31943ae77e16c964e625430af1bfcbcce7e9b.tar.gz
hdf5-b0b31943ae77e16c964e625430af1bfcbcce7e9b.tar.bz2
[svn-r17132] Description:
Fixed out-of-bound error detected on smirom with pgi compiler. Tested: smirom (pgi)
Diffstat (limited to 'hl')
-rw-r--r--hl/examples/ex_regref_create.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/hl/examples/ex_regref_create.c b/hl/examples/ex_regref_create.c
index c98bebc..47c843c 100644
--- a/hl/examples/ex_regref_create.c
+++ b/hl/examples/ex_regref_create.c
@@ -41,11 +41,13 @@ int main(void)
int data[DIM0][DIM1]; /* data */
int i, j;
int rdata[6][2]; /* buffer to read the data into */
- hsize_t num_elem = 2; /* number of region references to create */
- const char *path[num_elem]; /* paths to the data for the region references */
+ hsize_t num_elem; /* number of region references to create */
+ const char *path[2]; /* paths to the data for the region references */
hsize_t block_coord[8] ={ 2, 5, 4, 6, 0, 0, 2, 1}; /* hyperslab coordinates defining region references */
- hdset_reg_ref_t ref[num_elem]; /* region references */
- hid_t file_id_array[num_elem]; /* file id of the region references */
+ hdset_reg_ref_t ref[2]; /* region references */
+ hid_t file_id_array[2]; /* file id of the region references */
+
+ num_elem = 2;
/*********************************************************
This writes data to the HDF5 file.