summaryrefslogtreecommitdiffstats
path: root/hl/tools
diff options
context:
space:
mode:
authorPedro Vicente Nunes <pvn@hdfgroup.org>2007-04-11 19:56:49 (GMT)
committerPedro Vicente Nunes <pvn@hdfgroup.org>2007-04-11 19:56:49 (GMT)
commit91a42e81cf3e21e796091843bbb5de8cf3bd7068 (patch)
treed00cd5c1a15688721b4f43140202766fee061251 /hl/tools
parente07044f5c99cee6c996de2f298802695babcaa9c (diff)
downloadhdf5-91a42e81cf3e21e796091843bbb5de8cf3bd7068.zip
hdf5-91a42e81cf3e21e796091843bbb5de8cf3bd7068.tar.gz
hdf5-91a42e81cf3e21e796091843bbb5de8cf3bd7068.tar.bz2
[svn-r13643]
avoid hsize_t array index use tested: linux
Diffstat (limited to 'hl/tools')
-rw-r--r--hl/tools/gif2h5/h52gifgentst.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/hl/tools/gif2h5/h52gifgentst.c b/hl/tools/gif2h5/h52gifgentst.c
index b019ab4..e0a50a1 100644
--- a/hl/tools/gif2h5/h52gifgentst.c
+++ b/hl/tools/gif2h5/h52gifgentst.c
@@ -18,10 +18,8 @@
#include "hdf5.h"
#include "H5IMpublic.h"
-
-
/*-------------------------------------------------------------------------
- * Program: h52giftst
+ * Program: h52gifgentst
*
* Purpose: generate files for h52gif testing
*
@@ -33,8 +31,8 @@
*/
#define FILENAME "h52giftst.h5"
-#define WIDTH (hsize_t)400
-#define HEIGHT (hsize_t)200
+#define WIDTH 400
+#define HEIGHT 200
#define PAL_ENTRIES 256
#define IMAGE1_NAME "image"
#define PAL_NAME "palette"
@@ -54,6 +52,8 @@ int main(void)
unsigned char buf [ WIDTH*HEIGHT ];
unsigned char pal[ PAL_ENTRIES * 3 ]; /* palette array */
hsize_t pal_dims[2] = {PAL_ENTRIES,3}; /* palette dimensions */
+ hsize_t width = WIDTH;
+ hsize_t height = HEIGHT;
/* create a file */
@@ -70,11 +70,11 @@ int main(void)
n++;
j=0;
}
- if (n>PAL_ENTRIES-1) n=0;
+
}
/* make the image */
- if (H5IMmake_image_8bit( fid, IMAGE1_NAME, WIDTH, HEIGHT, buf )<0)
+ if (H5IMmake_image_8bit( fid, IMAGE1_NAME, width, height, buf )<0)
return 1;
/*-------------------------------------------------------------------------
@@ -102,4 +102,3 @@ int main(void)
return 0;
}
-