diff options
author | Pedro Vicente Nunes <pvn@hdfgroup.org> | 2007-04-11 19:56:23 (GMT) |
---|---|---|
committer | Pedro Vicente Nunes <pvn@hdfgroup.org> | 2007-04-11 19:56:23 (GMT) |
commit | cbdc497413b534d1b825fb1306f78134b3dcc362 (patch) | |
tree | 4df304d02985c65ea44b3e6c3d828f49a19f15a5 | |
parent | 6d73e0a20c3f5cca8c34527f73b33cb1cff2be0f (diff) | |
download | hdf5-cbdc497413b534d1b825fb1306f78134b3dcc362.zip hdf5-cbdc497413b534d1b825fb1306f78134b3dcc362.tar.gz hdf5-cbdc497413b534d1b825fb1306f78134b3dcc362.tar.bz2 |
[svn-r13642]
avoid hsize_t array index use
tested: linux
-rw-r--r-- | hl/tools/gif2h5/h52gifgentst.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/hl/tools/gif2h5/h52gifgentst.c b/hl/tools/gif2h5/h52gifgentst.c index 57afdb0..a48c825 100644 --- a/hl/tools/gif2h5/h52gifgentst.c +++ b/hl/tools/gif2h5/h52gifgentst.c @@ -18,10 +18,8 @@ #include "hdf5.h" #include "H5IM.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; /*------------------------------------------------------------------------- |