summaryrefslogtreecommitdiffstats
path: root/hl/test/test_image.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2006-04-29 06:20:50 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2006-04-29 06:20:50 (GMT)
commitcc5b2ff93bc5b81993c104e64f3669a4d8f0c0a5 (patch)
tree67198d5997628d5a6640a7862ec5c96794e97244 /hl/test/test_image.c
parent27496ae0c7b8b1be7165d3720711b15c3a2d1288 (diff)
downloadhdf5-cc5b2ff93bc5b81993c104e64f3669a4d8f0c0a5.zip
hdf5-cc5b2ff93bc5b81993c104e64f3669a4d8f0c0a5.tar.gz
hdf5-cc5b2ff93bc5b81993c104e64f3669a4d8f0c0a5.tar.bz2
[svn-r12314] Purpose:
Code cleanup Description: Big clean up on high-level library code, including: - Removing include of HDF5 private header file(!) - Reduce number of compiler warnings - Untangle header files, etc. Platforms tested: FreeBSD 4.11 (sleipnir) w/C++ Linux 2.4/64 (mir) w/C++ & FORTRAN
Diffstat (limited to 'hl/test/test_image.c')
-rw-r--r--hl/test/test_image.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/hl/test/test_image.c b/hl/test/test_image.c
index 6d1f445..630b9c5 100644
--- a/hl/test/test_image.c
+++ b/hl/test/test_image.c
@@ -12,11 +12,12 @@
* access to either file, you may request a copy from hdfhelp@ncsa.uiuc.edu. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-#include "H5LTprivate.h"
-#include "H5IMprivate.h"
-#include "pal_rgb.h"
#include <stdlib.h>
#include <string.h>
+#include "h5hltest.h"
+#include "H5LTpublic.h"
+#include "H5IMpublic.h"
+#include "pal_rgb.h"
#define FILE1 "test_image1.h5"
#define FILE2 "test_image2.h5"
@@ -52,7 +53,7 @@ static int test_simple(void);
static int test_data(void);
static int test_generate(void);
static int read_data(const char* file_name, hsize_t *width, hsize_t *height );
-static int read_palette(const char* file_name, rgb_t *palette, int palette_size);
+static int read_palette(const char* file_name, rgb_t *palette, size_t palette_size);
/* globals */
unsigned char *image_data = NULL;
@@ -103,7 +104,7 @@ static int test_simple(void)
unsigned char image_out2[ WIDTH*HEIGHT*3 ];
unsigned char pal_data_out[PAL_ENTRIES*3];
unsigned char n;
- int space;
+ hsize_t space;
/* create a PAL_ENTRIES entry palette */
unsigned char pal_data_in[PAL_ENTRIES*3] = {
0,0,168, /* dark blue */
@@ -137,7 +138,6 @@ static int test_simple(void)
n++;
j=0;
}
- if (n>255) n=0;
}
/* create a file using default properties */
@@ -829,7 +829,7 @@ static int read_data( const char* fname, /*IN*/
static int read_palette(const char* fname,
rgb_t *palette,
- int palette_size)
+ size_t palette_size)
{
FILE *file;
char buffer[80];
@@ -837,7 +837,7 @@ static int read_palette(const char* fname,
unsigned int red;
unsigned int green;
unsigned int blue;
- int nentries;
+ unsigned nentries;
char *srcdir = getenv("srcdir"); /* the source directory */
char data_file[512]; /* buffer to hold name of existing data file */
@@ -912,7 +912,7 @@ static int read_palette(const char* fname,
return -1;
}
- if (sscanf(buffer, "%d", &nentries) != 1)
+ if (sscanf(buffer, "%u", &nentries) != 1)
{
fclose(file);
return -1;