summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/cmpd_dset.c2
-rw-r--r--test/dsets.c3
-rw-r--r--test/dtypes.c9
-rw-r--r--test/extend.c2
-rw-r--r--test/hyperslab.c41
-rw-r--r--test/istore.c5
-rw-r--r--test/testhdf5.c4
-rw-r--r--test/th5p.c2
-rw-r--r--test/theap.c2
9 files changed, 38 insertions, 32 deletions
diff --git a/test/cmpd_dset.c b/test/cmpd_dset.c
index c8afe38..f146bf2 100644
--- a/test/cmpd_dset.c
+++ b/test/cmpd_dset.c
@@ -567,5 +567,5 @@ STEP 11: Write an array back to the middle third of the dataset to\n\
H5Dclose (dataset);
H5Fclose (file);
- exit (0);
+ return 0;
}
diff --git a/test/dsets.c b/test/dsets.c
index 783ace3..937160f 100644
--- a/test/dsets.c
+++ b/test/dsets.c
@@ -17,6 +17,7 @@
#ifndef HAVE_FUNCTION
+#undef __FUNCTION__
#define __FUNCTION__ ""
#endif
#define AT() printf (" at %s:%d in %s()...\n", \
@@ -398,5 +399,5 @@ main(void)
status = H5close ();
assert (status>=0);
- exit(0);
+ return 0;
}
diff --git a/test/dtypes.c b/test/dtypes.c
index 707fe29..da0076a 100644
--- a/test/dtypes.c
+++ b/test/dtypes.c
@@ -15,6 +15,7 @@
#include <H5Tprivate.h>
#ifndef HAVE_FUNCTION
+#undef __FUNCTION__
#define __FUNCTION__ ""
#endif
#define AT() printf (" at %s:%d in %s()...\n", \
@@ -44,11 +45,9 @@ typedef struct complex_t {
static herr_t
test_classes(void)
{
- H5T_class_t type_class;
-
printf("%-70s", "Testing H5Tget_class()");
- if (H5T_INTEGER != (type_class = H5Tget_class(H5T_NATIVE_INT))) {
+ if (H5T_INTEGER != H5Tget_class(H5T_NATIVE_INT)) {
puts("*FAILED*");
if (!isatty(1)) {
AT();
@@ -56,7 +55,7 @@ test_classes(void)
}
goto error;
}
- if (H5T_FLOAT != (type_class = H5Tget_class(H5T_NATIVE_DOUBLE))) {
+ if (H5T_FLOAT != H5Tget_class(H5T_NATIVE_DOUBLE)) {
puts("*FAILED*");
if (!isatty(1)) {
AT();
@@ -234,5 +233,5 @@ main(void)
exit(1);
}
printf("All data type tests passed.\n");
- exit(0);
+ return 0;
}
diff --git a/test/extend.c b/test/extend.c
index b5f2ecc..7f899ee 100644
--- a/test/extend.c
+++ b/test/extend.c
@@ -124,7 +124,7 @@ main (void)
H5Dclose (dataset);
H5Fclose (file);
- exit (0);
+ return 0;
}
diff --git a/test/hyperslab.c b/test/hyperslab.c
index 82f78c4..2cc7660 100644
--- a/test/hyperslab.c
+++ b/test/hyperslab.c
@@ -16,6 +16,7 @@
#include <H5Vprivate.h>
#ifndef HAVE_FUNCTION
+#undef __FUNCTION__
#define __FUNCTION__ ""
#endif
#define AT() printf (" at %s:%d in %s()\n",__FILE__,__LINE__,__FUNCTION__);
@@ -147,16 +148,17 @@ test_fill(size_t nx, size_t ny, size_t nz,
size_t di, size_t dj, size_t dk,
size_t ddx, size_t ddy, size_t ddz)
{
- uint8 *dst = NULL; /*destination array */
- size_t hs_size[3]; /*hyperslab size */
- size_t dst_size[3]; /*destination total size */
- size_t dst_offset[3]; /*offset of hyperslab in dest */
- uintn ref_value; /*reference value */
- uintn acc; /*accumulator */
- int i, j, k, dx, dy, dz, u, v, w; /*counters */
- int ndims; /*hyperslab dimensionality */
- char dim[64], s[256]; /*temp string */
- uintn fill_value; /*fill value */
+ uint8 *dst = NULL; /*destination array */
+ size_t hs_size[3]; /*hyperslab size */
+ size_t dst_size[3]; /*destination total size */
+ size_t dst_offset[3]; /*offset of hyperslab in dest */
+ uintn ref_value; /*reference value */
+ uintn acc; /*accumulator */
+ int i, j, k, dx, dy, dz; /*counters */
+ size_t u, v, w;
+ int ndims; /*hyperslab dimensionality */
+ char dim[64], s[256]; /*temp string */
+ uintn fill_value; /*fill value */
/*
* Dimensionality.
@@ -311,7 +313,8 @@ test_copy(int mode,
size_t src_offset[3]; /*offset of hyperslab in source */
uintn ref_value; /*reference value */
uintn acc; /*accumulator */
- int i, j, k, dx, dy, dz, u, v, w; /*counters */
+ int i, j, k, dx, dy, dz; /*counters */
+ size_t u, v, w;
int ndims; /*hyperslab dimensionality */
char dim[64], s[256]; /*temp string */
const char *sub;
@@ -761,7 +764,7 @@ test_transpose(size_t nx, size_t ny)
src = H5MM_xmalloc(nx * ny * sizeof(*src));
for (i = 0; i < nx; i++) {
for (j = 0; j < ny; j++) {
- src[i * ny + j] = i * ny + j;
+ src[i * ny + j] = (intn)(i * ny + j);
}
}
dst = H5MM_xcalloc(nx * ny, sizeof(*dst));
@@ -771,8 +774,8 @@ test_transpose(size_t nx, size_t ny)
size[1] = ny;
src_stride[0] = 0;
src_stride[1] = sizeof(*src);
- dst_stride[0] = (1 - nx * ny) * sizeof(*src);
- dst_stride[1] = nx * sizeof(*src);
+ dst_stride[0] = (intn)((1 - nx * ny) * sizeof(*src));
+ dst_stride[1] = (intn)(nx * sizeof(*src));
/* Copy and transpose */
if (nx == ny) {
@@ -872,7 +875,7 @@ test_sub_super(size_t nx, size_t ny)
/* Setup */
size[0] = nx;
size[1] = ny;
- src_stride[0] = 2 * ny;
+ src_stride[0] = (intn)(2 * ny);
src_stride[1] = 2;
dst_stride[0] = 0;
dst_stride[1] = 1;
@@ -919,9 +922,9 @@ test_sub_super(size_t nx, size_t ny)
src_stride[1] = 1;
src_stride[2] = 0;
src_stride[3] = 0;
- dst_stride[0] = 2 * ny;
- dst_stride[1] = 2 * sizeof(uint8) - 4 * ny;
- dst_stride[2] = 2 * ny - 2 * sizeof(uint8);
+ dst_stride[0] = (intn)(2 * ny);
+ dst_stride[1] = (intn)(2 * sizeof(uint8) - 4 * ny);
+ dst_stride[2] = (intn)(2 * ny - 2 * sizeof(uint8));
dst_stride[3] = sizeof(uint8);
/* Copy */
@@ -1161,5 +1164,5 @@ main(int argc, char *argv[])
exit(1);
}
printf("All hyperslab tests passed.\n");
- exit(0);
+ return 0;
}
diff --git a/test/istore.c b/test/istore.c
index aef85a4..4aca884 100644
--- a/test/istore.c
+++ b/test/istore.c
@@ -33,6 +33,7 @@
#define TEST_LARGE 0x0004
#ifndef HAVE_FUNCTION
+#undef __FUNCTION__
#define __FUNCTION__ ""
#endif
#define AT() printf (" at %s:%d in %s()...\n", \
@@ -99,7 +100,7 @@ print_array(uint8 *array, size_t nx, size_t ny, size_t nz)
*-------------------------------------------------------------------------
*/
static int
-new_object(H5F_t *f, const char *name, size_t ndims, H5G_entry_t *ent/*out*/)
+new_object(H5F_t *f, const char *name, intn ndims, H5G_entry_t *ent/*out*/)
{
H5O_layout_t layout;
intn i;
@@ -659,5 +660,5 @@ main(int argc, char *argv[])
exit(1);
}
printf("All i-store tests passed.\n");
- exit(0);
+ return 0;
}
diff --git a/test/testhdf5.c b/test/testhdf5.c
index cf713f9..b122606 100644
--- a/test/testhdf5.c
+++ b/test/testhdf5.c
@@ -192,8 +192,10 @@ main(int argc, char *argv[])
CleanUp = 0;
if ((argc > CLLoop) && ((HDstrcmp(argv[CLLoop], "-nocache") == 0) ||
- (HDstrcmp(argv[CLLoop], "-n") == 0)))
+ (HDstrcmp(argv[CLLoop], "-n") == 0))) {
Cache = 0;
+ printf ("Cache = %d\n", Cache);
+ }
if ((argc > CLLoop + 1) && ((HDstrcmp(argv[CLLoop], "-exclude") == 0) ||
(HDstrcmp(argv[CLLoop], "-x") == 0))) {
diff --git a/test/th5p.c b/test/th5p.c
index e969219..af9100a 100644
--- a/test/th5p.c
+++ b/test/th5p.c
@@ -63,7 +63,7 @@ test_h5p_basic(void)
{SPACE1_DIM1, SPACE1_DIM2, SPACE1_DIM3}, /* dataspace dim sizes */
dims2[] =
{SPACE2_DIM1, SPACE2_DIM2, SPACE2_DIM3, SPACE2_DIM4}, tdims[4]; /* Dimension array to test with */
- uintn n; /* number of dataspace elements */
+ size_t n; /* number of dataspace elements */
herr_t ret; /* Generic return value */
/* Output message about test being performed */
diff --git a/test/theap.c b/test/theap.c
index ad0ee75..cad0c3b 100644
--- a/test/theap.c
+++ b/test/theap.c
@@ -72,7 +72,7 @@ test_heap(void)
buf[j] = '\0';
obj[i] = H5H_insert(f, &heap_addr, strlen(buf) + 1, buf);
- CHECK_I(obj[i], "H5H_insert");
+ assert ((size_t)(-1)!=obj[i]);
}
/* Flush the cache and invalidate everything */