summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2001-01-09 21:22:30 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2001-01-09 21:22:30 (GMT)
commit35bc545296209684a5c46db0cde11beb9403a4dc (patch)
tree98b5a037ed928085b98abc1fee71fc62f81073c1 /test
parent1290c4808d3e9890c765b1445f66b823c9026734 (diff)
downloadhdf5-35bc545296209684a5c46db0cde11beb9403a4dc.zip
hdf5-35bc545296209684a5c46db0cde11beb9403a4dc.tar.gz
hdf5-35bc545296209684a5c46db0cde11beb9403a4dc.tar.bz2
[svn-r3252] Purpose:
Code cleanup. Description: Fixed _lots_ (I mean _tons_) of warnings spit out by the gcc with the extra warnings. Including a few show-stoppers for compression on IRIX machines. Solution: Changed lots of variables' types to more sensible and consistent types, more range-checking, more variable typecasts, etc. Platforms tested: FreeBSD 4.2 (hawkwind), IRIX64-64 (modi4)
Diffstat (limited to 'test')
-rw-r--r--test/big.c6
-rw-r--r--test/dsets.c4
-rw-r--r--test/dtypes.c94
-rw-r--r--test/external.c44
-rw-r--r--test/fillval.c8
-rw-r--r--test/h5test.c35
-rw-r--r--test/hyperslab.c4
-rw-r--r--test/istore.c28
-rw-r--r--test/stream_test.c2
-rw-r--r--test/tarray.c2
-rw-r--r--test/testhdf5.h2
-rw-r--r--test/trefer.c6
-rw-r--r--test/tselect.c12
13 files changed, 141 insertions, 106 deletions
diff --git a/test/big.c b/test/big.c
index b7c190c..e123a3d 100644
--- a/test/big.c
+++ b/test/big.c
@@ -77,7 +77,7 @@ is_sparse(void)
struct stat sb;
if ((fd=open("x.h5", O_RDWR|O_TRUNC|O_CREAT, 0666))<0) return 0;
- if (lseek(fd, 1024*1024, SEEK_SET)!=1024*1024) return 0;
+ if (lseek(fd, (off_t)(1024*1024), SEEK_SET)!=1024*1024) return 0;
if (5!=write(fd, "hello", 5)) return 0;
if (close(fd)<0) return 0;
if (stat("x.h5", &sb)<0) return 0;
@@ -377,13 +377,13 @@ main (void)
#endif /* H5_WANT_H5_V1_2_COMPAT */
printf("Changing file drivers to the family driver, %lu bytes each\n",
(unsigned long)FAMILY_SIZE);
- if (H5Pset_fapl_family(fapl, FAMILY_SIZE, H5P_DEFAULT)<0) goto error;
+ if (H5Pset_fapl_family(fapl, (hsize_t)FAMILY_SIZE, H5P_DEFAULT)<0) goto error;
} else if (H5Pget_fapl_family(fapl, &family_size, NULL)<0) {
goto error;
} else if (family_size!=FAMILY_SIZE) {
printf("Changing family member size from %lu to %lu\n",
(unsigned long)family_size, (unsigned long)FAMILY_SIZE);
- if (H5Pset_fapl_family(fapl, FAMILY_SIZE, H5P_DEFAULT)<0) goto error;
+ if (H5Pset_fapl_family(fapl, (hsize_t)FAMILY_SIZE, H5P_DEFAULT)<0) goto error;
}
/*
diff --git a/test/dsets.c b/test/dsets.c
index 4863d93..6b60991 100644
--- a/test/dsets.c
+++ b/test/dsets.c
@@ -182,7 +182,7 @@ test_simple_io(hid_t file)
tconv_buf = malloc (1000);
xfer = H5Pcreate (H5P_DATASET_XFER);
assert (xfer>=0);
- if (H5Pset_buffer (xfer, 1000, tconv_buf, NULL)<0) goto error;
+ if (H5Pset_buffer (xfer, (hsize_t)1000, tconv_buf, NULL)<0) goto error;
/* Create the dataset */
if ((dataset = H5Dcreate(file, DSET_SIMPLE_IO_NAME, H5T_NATIVE_INT, space,
@@ -368,7 +368,7 @@ test_compression(hid_t file)
*/
if ((xfer = H5Pcreate (H5P_DATASET_XFER))<0) goto error;
tconv_buf = malloc (1000);
- if (H5Pset_buffer (xfer, 1000, tconv_buf, NULL)<0) goto error;
+ if (H5Pset_buffer (xfer, (hsize_t)1000, tconv_buf, NULL)<0) goto error;
/* Use chunked storage with compression */
if ((dc = H5Pcreate (H5P_DATASET_CREATE))<0) goto error;
diff --git a/test/dtypes.c b/test/dtypes.c
index 28862cd..77bf585 100644
--- a/test/dtypes.c
+++ b/test/dtypes.c
@@ -487,7 +487,7 @@ test_compound_2(void)
H5Tclose(array_dt);
/* Perform the conversion */
- if (H5Tconvert(st, dt, nelmts, buf, bkg, H5P_DEFAULT)<0) goto error;
+ if (H5Tconvert(st, dt, (hsize_t)nelmts, buf, bkg, H5P_DEFAULT)<0) goto error;
/* Compare results */
for (i=0; i<nelmts; i++) {
@@ -602,7 +602,7 @@ test_compound_3(void)
H5Tclose(array_dt);
/* Perform the conversion */
- if (H5Tconvert(st, dt, nelmts, buf, bkg, H5P_DEFAULT)<0)
+ if (H5Tconvert(st, dt, (hsize_t)nelmts, buf, bkg, H5P_DEFAULT)<0)
goto error;
/* Compare results */
@@ -722,7 +722,7 @@ test_compound_4(void)
H5Tclose(array_dt);
/* Perform the conversion */
- if (H5Tconvert(st, dt, nelmts, buf, bkg, H5P_DEFAULT)<0)
+ if (H5Tconvert(st, dt, (hsize_t)nelmts, buf, bkg, H5P_DEFAULT)<0)
goto error;
/* Compare results */
@@ -843,7 +843,7 @@ test_compound_5(void)
/* Convert data */
memcpy(buf, src, sizeof(src));
- H5Tconvert(src_type, dst_type, 2, buf, bkg, H5P_DEFAULT);
+ H5Tconvert(src_type, dst_type, (hsize_t)2, buf, bkg, H5P_DEFAULT);
dst = (dst_type_t*)buf;
/* Cleanup */
@@ -935,7 +935,7 @@ test_compound_6(void)
goto error;
/* Perform the conversion */
- if (H5Tconvert(st, dt, nelmts, buf, bkg, H5P_DEFAULT)<0)
+ if (H5Tconvert(st, dt, (hsize_t)nelmts, buf, bkg, H5P_DEFAULT)<0)
goto error;
/* Compare results */
@@ -1342,13 +1342,13 @@ test_conv_str_1(void)
dst_type = mkstr(5, H5T_STR_NULLTERM);
buf = calloc(2, 10);
memcpy(buf, "abcdefghi\0abcdefghi\0", 20);
- if (H5Tconvert(src_type, dst_type, 2, buf, NULL, H5P_DEFAULT)<0) goto error;
+ if (H5Tconvert(src_type, dst_type, (hsize_t)2, buf, NULL, H5P_DEFAULT)<0) goto error;
if (memcmp(buf, "abcd\0abcd\0abcdefghi\0", 20)) {
FAILED();
puts(" Truncated C-string test failed");
goto error;
}
- if (H5Tconvert(dst_type, src_type, 2, buf, NULL, H5P_DEFAULT)<0) goto error;
+ if (H5Tconvert(dst_type, src_type, (hsize_t)2, buf, NULL, H5P_DEFAULT)<0) goto error;
if (memcmp(buf, "abcd\0\0\0\0\0\0abcd\0\0\0\0\0\0", 20)) {
FAILED();
puts(" Extended C-string test failed");
@@ -1365,13 +1365,13 @@ test_conv_str_1(void)
dst_type = mkstr(5, H5T_STR_NULLPAD);
buf = calloc(2, 10);
memcpy(buf, "abcdefghijabcdefghij", 20);
- if (H5Tconvert(src_type, dst_type, 2, buf, NULL, H5P_DEFAULT)<0) goto error;
+ if (H5Tconvert(src_type, dst_type, (hsize_t)2, buf, NULL, H5P_DEFAULT)<0) goto error;
if (memcmp(buf, "abcdeabcdeabcdefghij", 20)) {
FAILED();
puts(" Truncated C buffer test failed");
goto error;
}
- if (H5Tconvert(dst_type, src_type, 2, buf, NULL, H5P_DEFAULT)<0) goto error;
+ if (H5Tconvert(dst_type, src_type, (hsize_t)2, buf, NULL, H5P_DEFAULT)<0) goto error;
if (memcmp(buf, "abcde\0\0\0\0\0abcde\0\0\0\0\0", 20)) {
FAILED();
puts(" Extended C buffer test failed");
@@ -1388,13 +1388,13 @@ test_conv_str_1(void)
dst_type = mkstr(5, H5T_STR_SPACEPAD);
buf = calloc(2, 10);
memcpy(buf, "abcdefghijabcdefghij", 20);
- if (H5Tconvert(src_type, dst_type, 2, buf, NULL, H5P_DEFAULT)<0) goto error;
+ if (H5Tconvert(src_type, dst_type, (hsize_t)2, buf, NULL, H5P_DEFAULT)<0) goto error;
if (memcmp(buf, "abcdeabcdeabcdefghij", 20)) {
FAILED();
puts(" Truncated Fortran-string test failed");
goto error;
}
- if (H5Tconvert(dst_type, src_type, 2, buf, NULL, H5P_DEFAULT)<0) goto error;
+ if (H5Tconvert(dst_type, src_type, (hsize_t)2, buf, NULL, H5P_DEFAULT)<0) goto error;
if (memcmp(buf, "abcde abcde ", 20)) {
FAILED();
puts(" Extended Fortran-string test failed");
@@ -1414,7 +1414,7 @@ test_conv_str_1(void)
dst_type = mkstr(10, H5T_STR_NULLTERM);
buf = calloc(2, 10);
memcpy(buf, "abcdefghijabcdefghij", 20);
- if (H5Tconvert(src_type, dst_type, 2, buf, NULL, H5P_DEFAULT)<0) goto error;
+ if (H5Tconvert(src_type, dst_type, (hsize_t)2, buf, NULL, H5P_DEFAULT)<0) goto error;
if (memcmp(buf, "abcdefghijabcdefghij", 20)) {
FAILED();
puts(" Non-terminated string test 1");
@@ -1423,14 +1423,14 @@ test_conv_str_1(void)
H5Tclose(dst_type);
dst_type = mkstr(5, H5T_STR_NULLTERM);
memcpy(buf, "abcdefghijabcdefghij", 20);
- if (H5Tconvert(src_type, dst_type, 2, buf, NULL, H5P_DEFAULT)<0) goto error;
+ if (H5Tconvert(src_type, dst_type, (hsize_t)2, buf, NULL, H5P_DEFAULT)<0) goto error;
if (memcmp(buf, "abcd\0abcd\0abcdefghij", 20)) {
FAILED();
puts(" Non-terminated string test 2");
goto error;
}
memcpy(buf, "abcdeabcdexxxxxxxxxx", 20);
- if (H5Tconvert(dst_type, src_type, 2, buf, NULL, H5P_DEFAULT)<0) goto error;
+ if (H5Tconvert(dst_type, src_type, (hsize_t)2, buf, NULL, H5P_DEFAULT)<0) goto error;
if (memcmp(buf, "abcde\0\0\0\0\0abcde\0\0\0\0\0", 20)) {
FAILED();
puts(" Non-terminated string test 2");
@@ -1447,13 +1447,13 @@ test_conv_str_1(void)
dst_type = mkstr(10, H5T_STR_SPACEPAD);
buf = calloc(2, 10);
memcpy(buf, "abcdefghi\0abcdefghi\0", 20);
- if (H5Tconvert(src_type, dst_type, 2, buf, NULL, H5P_DEFAULT)<0) goto error;
+ if (H5Tconvert(src_type, dst_type, (hsize_t)2, buf, NULL, H5P_DEFAULT)<0) goto error;
if (memcmp(buf, "abcdefghi abcdefghi ", 20)) {
FAILED();
puts(" C string to Fortran test 1");
goto error;
}
- if (H5Tconvert(dst_type, src_type, 2, buf, NULL, H5P_DEFAULT)<0) goto error;
+ if (H5Tconvert(dst_type, src_type, (hsize_t)2, buf, NULL, H5P_DEFAULT)<0) goto error;
if (memcmp(buf, "abcdefghi\0abcdefghi\0", 20)) {
FAILED();
puts(" Fortran to C string test 1");
@@ -1462,13 +1462,13 @@ test_conv_str_1(void)
if (H5Tclose(dst_type)<0) goto error;
dst_type = mkstr(5, H5T_STR_SPACEPAD);
memcpy(buf, "abcdefgh\0\0abcdefgh\0\0", 20);
- if (H5Tconvert(src_type, dst_type, 2, buf, NULL, H5P_DEFAULT)<0) goto error;
+ if (H5Tconvert(src_type, dst_type, (hsize_t)2, buf, NULL, H5P_DEFAULT)<0) goto error;
if (memcmp(buf, "abcdeabcdeabcdefgh\0\0", 20)) {
FAILED();
puts(" C string to Fortran test 2");
goto error;
}
- if (H5Tconvert(dst_type, src_type, 2, buf, NULL, H5P_DEFAULT)<0) goto error;
+ if (H5Tconvert(dst_type, src_type, (hsize_t)2, buf, NULL, H5P_DEFAULT)<0) goto error;
if (memcmp(buf, "abcde\0\0\0\0\0abcde\0\0\0\0\0", 20)) {
FAILED();
puts(" Fortran to C string test 2");
@@ -1479,13 +1479,13 @@ test_conv_str_1(void)
src_type = mkstr(5, H5T_STR_NULLTERM);
dst_type = mkstr(10, H5T_STR_SPACEPAD);
memcpy(buf, "abcd\0abcd\0xxxxxxxxxx", 20);
- if (H5Tconvert(src_type, dst_type, 2, buf, NULL, H5P_DEFAULT)<0) goto error;
+ if (H5Tconvert(src_type, dst_type, (hsize_t)2, buf, NULL, H5P_DEFAULT)<0) goto error;
if (memcmp(buf, "abcd abcd ", 20)) {
FAILED();
puts(" C string to Fortran test 3");
goto error;
}
- if (H5Tconvert(dst_type, src_type, 2, buf, NULL, H5P_DEFAULT)<0) goto error;
+ if (H5Tconvert(dst_type, src_type, (hsize_t)2, buf, NULL, H5P_DEFAULT)<0) goto error;
if (memcmp(buf, "abcd\0abcd\0abcd ", 20)) {
FAILED();
puts(" Fortran to C string test 3");
@@ -1502,13 +1502,13 @@ test_conv_str_1(void)
dst_type = mkstr(10, H5T_STR_SPACEPAD);
buf = calloc(2, 10);
memcpy(buf, "abcdefghijabcdefghij", 20);
- if (H5Tconvert(src_type, dst_type, 2, buf, NULL, H5P_DEFAULT)<0) goto error;
+ if (H5Tconvert(src_type, dst_type, (hsize_t)2, buf, NULL, H5P_DEFAULT)<0) goto error;
if (memcmp(buf, "abcdefghijabcdefghij", 20)) {
FAILED();
puts(" C buffer to Fortran test 1");
goto error;
}
- if (H5Tconvert(dst_type, src_type, 2, buf, NULL, H5P_DEFAULT)<0) goto error;
+ if (H5Tconvert(dst_type, src_type, (hsize_t)2, buf, NULL, H5P_DEFAULT)<0) goto error;
if (memcmp(buf, "abcdefghijabcdefghij", 20)) {
FAILED();
puts(" Fortran to C buffer test 1");
@@ -1517,13 +1517,13 @@ test_conv_str_1(void)
if (H5Tclose(dst_type)<0) goto error;
dst_type = mkstr(5, H5T_STR_SPACEPAD);
memcpy(buf, "abcdefgh\0\0abcdefgh\0\0", 20);
- if (H5Tconvert(src_type, dst_type, 2, buf, NULL, H5P_DEFAULT)<0) goto error;
+ if (H5Tconvert(src_type, dst_type, (hsize_t)2, buf, NULL, H5P_DEFAULT)<0) goto error;
if (memcmp(buf, "abcdeabcdeabcdefgh\0\0", 20)) {
FAILED();
puts(" C buffer to Fortran test 2");
goto error;
}
- if (H5Tconvert(dst_type, src_type, 2, buf, NULL, H5P_DEFAULT)<0) goto error;
+ if (H5Tconvert(dst_type, src_type, (hsize_t)2, buf, NULL, H5P_DEFAULT)<0) goto error;
if (memcmp(buf, "abcde\0\0\0\0\0abcde\0\0\0\0\0", 20)) {
FAILED();
puts(" Fortran to C buffer test 2");
@@ -1534,13 +1534,13 @@ test_conv_str_1(void)
src_type = mkstr(5, H5T_STR_NULLPAD);
dst_type = mkstr(10, H5T_STR_SPACEPAD);
memcpy(buf, "abcd\0abcd\0xxxxxxxxxx", 20);
- if (H5Tconvert(src_type, dst_type, 2, buf, NULL, H5P_DEFAULT)<0) goto error;
+ if (H5Tconvert(src_type, dst_type, (hsize_t)2, buf, NULL, H5P_DEFAULT)<0) goto error;
if (memcmp(buf, "abcd abcd ", 20)) {
FAILED();
puts(" C buffer to Fortran test 3");
goto error;
}
- if (H5Tconvert(dst_type, src_type, 2, buf, NULL, H5P_DEFAULT)<0) goto error;
+ if (H5Tconvert(dst_type, src_type, (hsize_t)2, buf, NULL, H5P_DEFAULT)<0) goto error;
if (memcmp(buf, "abcd\0abcd\0abcd ", 20)) {
FAILED();
puts(" Fortran to C buffer test 3");
@@ -1609,8 +1609,8 @@ test_conv_str_2(void)
}
printf("%-70s", s);
fflush(stdout);
- if (H5Tconvert(c_type, f_type, nelmts, buf, NULL, H5P_DEFAULT)<0) goto error;
- if (H5Tconvert(f_type, c_type, nelmts, buf, NULL, H5P_DEFAULT)<0) goto error;
+ if (H5Tconvert(c_type, f_type, (hsize_t)nelmts, buf, NULL, H5P_DEFAULT)<0) goto error;
+ if (H5Tconvert(f_type, c_type, (hsize_t)nelmts, buf, NULL, H5P_DEFAULT)<0) goto error;
PASSED();
}
ret_value = 0;
@@ -1671,7 +1671,7 @@ test_conv_enum_1(void)
}
printf("%-70s", s);
fflush(stdout);
- if (H5Tconvert(t1, t2, nelmts, buf, NULL, H5P_DEFAULT)<0) goto error;
+ if (H5Tconvert(t1, t2, (hsize_t)nelmts, buf, NULL, H5P_DEFAULT)<0) goto error;
PASSED();
}
@@ -1684,7 +1684,7 @@ test_conv_enum_1(void)
}
printf("%-70s", s);
fflush(stdout);
- if (H5Tconvert(t2, t1, nelmts, buf, NULL, H5P_DEFAULT)<0) goto error;
+ if (H5Tconvert(t2, t1, (hsize_t)nelmts, buf, NULL, H5P_DEFAULT)<0) goto error;
PASSED();
}
ret_value = 0;
@@ -1731,7 +1731,7 @@ test_conv_bitfield(void)
dt = H5Tcopy(H5T_STD_B32LE);
buf[0] = buf[1] = 0xAA;
buf[2] = buf[3] = 0x55; /*irrelevant*/
- if (H5Tconvert(st, dt, 1, buf, NULL, H5P_DEFAULT)<0) goto error;
+ if (H5Tconvert(st, dt, (hsize_t)1, buf, NULL, H5P_DEFAULT)<0) goto error;
if (buf[0]!=0xAA || buf[1]!=0xAA || buf[2]!=0 || buf[3]!=0) {
FAILED();
printf(" s=0xaaaa, d=0x%02x%02x%02x%02x (test 1)\n",
@@ -1750,7 +1750,7 @@ test_conv_bitfield(void)
H5Tset_precision(dt, 12);
H5Tset_offset(dt, 10);
buf[0] = 0xA8; buf[1] = 0x2A; buf[2] = buf[3] = 0;
- if (H5Tconvert(st, dt, 1, buf, NULL, H5P_DEFAULT)<0) goto error;
+ if (H5Tconvert(st, dt, (hsize_t)1, buf, NULL, H5P_DEFAULT)<0) goto error;
if (buf[0]!=0 || buf[1]!=0xA8 || buf[2]!=0x2A || buf[3]!=0) {
FAILED();
printf(" s=0x2AA8 d=0x%02x%02x%02x%02x (test 2)\n",
@@ -1764,7 +1764,7 @@ test_conv_bitfield(void)
*/
H5Tset_pad(dt, H5T_PAD_ONE, H5T_PAD_ONE);
buf[0] = 0xA8; buf[1] = 0x2A; buf[2] = buf[3] = 0;
- if (H5Tconvert(st, dt, 1, buf, NULL, H5P_DEFAULT)<0) goto error;
+ if (H5Tconvert(st, dt, (hsize_t)1, buf, NULL, H5P_DEFAULT)<0) goto error;
if (buf[0]!=0xff || buf[1]!=0xAB || buf[2]!=0xEA || buf[3]!=0xff) {
FAILED();
printf(" s=0x2AA8 d=0x%02x%02x%02x%02x (test 3)\n",
@@ -1804,7 +1804,7 @@ test_conv_bitfield(void)
*/
static herr_t
convert_opaque(hid_t UNUSED st, hid_t UNUSED dt, H5T_cdata_t *cdata,
- size_t UNUSED nelmts, size_t UNUSED buf_stride,
+ hsize_t UNUSED nelmts, size_t UNUSED buf_stride,
size_t UNUSED bkg_stride, void UNUSED *_buf,
void UNUSED *bkg, hid_t UNUSED dset_xfer_plid)
{
@@ -1848,7 +1848,7 @@ test_opaque(void)
/* Make sure that we can't convert between the types yet */
H5E_BEGIN_TRY {
- status = H5Tconvert(st, dt, OPAQUE_NELMTS, buf, NULL, H5P_DEFAULT);
+ status = H5Tconvert(st, dt, (hsize_t)OPAQUE_NELMTS, buf, NULL, H5P_DEFAULT);
} H5E_END_TRY;
if (status>=0) {
FAILED();
@@ -1861,7 +1861,7 @@ test_opaque(void)
goto error;
/* Try the conversion again, this time it should work */
- if (H5Tconvert(st, dt, OPAQUE_NELMTS, buf, NULL, H5P_DEFAULT)<0) goto error;
+ if (H5Tconvert(st, dt, (hsize_t)OPAQUE_NELMTS, buf, NULL, H5P_DEFAULT)<0) goto error;
if (saved+1 != num_opaque_conversions_g) {
FAILED();
printf(" unexpected number of opaque conversions\n");
@@ -1911,7 +1911,7 @@ test_conv_int (void)
/* (unsigned)0x80000000 -> (unsigned)0xffff */
byte[0] = byte[1] = byte[2] = 0;
byte[3] = 0x80;
- if (H5Tconvert (H5T_STD_U32LE, H5T_STD_U16LE, 1, byte, NULL, H5P_DEFAULT)<0) {
+ if (H5Tconvert (H5T_STD_U32LE, H5T_STD_U16LE, (hsize_t)1, byte, NULL, H5P_DEFAULT)<0) {
goto error;
}
if (byte[0]!=0xff || byte[1]!=0xff) {
@@ -1924,7 +1924,7 @@ test_conv_int (void)
/* (unsigned)0xffffffff -> (signed)0x7fff */
byte[0] = byte[1] = byte[2] = byte[3] = 0xff;
- if (H5Tconvert (H5T_STD_U32LE, H5T_STD_I16LE, 1, byte, NULL, H5P_DEFAULT)<0) {
+ if (H5Tconvert (H5T_STD_U32LE, H5T_STD_I16LE, (hsize_t)1, byte, NULL, H5P_DEFAULT)<0) {
goto error;
}
if (byte[0]!=0xff || byte[1]!=0x7f) {
@@ -1937,7 +1937,7 @@ test_conv_int (void)
/* (signed)0xffffffff -> (unsigned)0x0000 */
byte[0] = byte[1] = byte[2] = byte[3] = 0xff;
- if (H5Tconvert (H5T_STD_I32LE, H5T_STD_U16LE, 1, byte, NULL, H5P_DEFAULT)<0) {
+ if (H5Tconvert (H5T_STD_I32LE, H5T_STD_U16LE, (hsize_t)1, byte, NULL, H5P_DEFAULT)<0) {
goto error;
}
if (byte[0]!=0x00 || byte[1]!=0x00) {
@@ -1951,7 +1951,7 @@ test_conv_int (void)
/* (signed)0x7fffffff -> (unsigned)0xffff */
byte[0] = byte[1] = byte[2] = 0xff;
byte[3] = 0x7f;
- if (H5Tconvert (H5T_STD_I32LE, H5T_STD_U16LE, 1, byte, NULL, H5P_DEFAULT)<0) {
+ if (H5Tconvert (H5T_STD_I32LE, H5T_STD_U16LE, (hsize_t)1, byte, NULL, H5P_DEFAULT)<0) {
goto error;
}
if (byte[0]!=0xff || byte[1]!=0xff) {
@@ -1965,7 +1965,7 @@ test_conv_int (void)
/* (signed)0x7fffffff -> (signed)0x7fff */
byte[0] = byte[1] = byte[2] = 0xff;
byte[3] = 0x7f;
- if (H5Tconvert (H5T_STD_I32LE, H5T_STD_I16LE, 1, byte, NULL, H5P_DEFAULT)<0) {
+ if (H5Tconvert (H5T_STD_I32LE, H5T_STD_I16LE, (hsize_t)1, byte, NULL, H5P_DEFAULT)<0) {
goto error;
}
if (byte[0]!=0xff || byte[1]!=0x7f) {
@@ -1979,7 +1979,7 @@ test_conv_int (void)
/* (signed)0xbfffffff -> (signed)0x8000 */
byte[0] = byte[1] = byte[2] = 0xff;
byte[3] = 0xbf;
- if (H5Tconvert (H5T_STD_I32LE, H5T_STD_I16LE, 1, byte, NULL, H5P_DEFAULT)<0) {
+ if (H5Tconvert (H5T_STD_I32LE, H5T_STD_I16LE, (hsize_t)1, byte, NULL, H5P_DEFAULT)<0) {
goto error;
}
if (byte[0]!=0x00 || byte[1]!=0x80) {
@@ -2174,7 +2174,7 @@ test_conv_int_1(const char *name, hid_t src, hid_t dst)
for (j=0; j<nelmts*src_size; j++) buf[j] = saved[j] = rand();
/* Perform the conversion */
- if (H5Tconvert(src, dst, nelmts, buf, NULL, H5P_DEFAULT)<0) goto error;
+ if (H5Tconvert(src, dst, (hsize_t)nelmts, buf, NULL, H5P_DEFAULT)<0) goto error;
/* Check the results from the library against hardware */
for (j=0; j<nelmts; j++) {
@@ -3067,17 +3067,17 @@ test_conv_int_2(void)
/* Source type */
src_type = H5Tcopy(H5T_NATIVE_CHAR);
- H5Tset_size(src_type, i);
+ H5Tset_size(src_type, (size_t)i);
/* Destination type */
dst_type = H5Tcopy(H5T_NATIVE_CHAR);
- H5Tset_size(dst_type, j);
+ H5Tset_size(dst_type, (size_t)j);
/*
* Conversion. If overlap calculations aren't right then an
* assertion will fail in H5T_conv_i_i()
*/
- H5Tconvert(src_type, dst_type, 100, buf, NULL, H5P_DEFAULT);
+ H5Tconvert(src_type, dst_type, (hsize_t)100, buf, NULL, H5P_DEFAULT);
H5Tclose(src_type);
H5Tclose(dst_type);
}
@@ -3345,7 +3345,7 @@ test_conv_flt_1 (const char *name, hid_t src, hid_t dst)
}
/* Perform the conversion in software */
- if (H5Tconvert(src, dst, nelmts, buf, NULL, H5P_DEFAULT)<0) goto error;
+ if (H5Tconvert(src, dst, (hsize_t)nelmts, buf, NULL, H5P_DEFAULT)<0) goto error;
/* Check the software results against the hardware */
for (j=0; j<nelmts; j++) {
diff --git a/test/external.c b/test/external.c
index 0ea5498..810d5b8 100644
--- a/test/external.c
+++ b/test/external.c
@@ -98,7 +98,7 @@ test_1a(hid_t file)
/* Create the dataset */
if ((dcpl=H5Pcreate(H5P_DATASET_CREATE))<0) goto error;
cur_size[0] = max_size[0] = 100;
- if (H5Pset_external(dcpl, "ext1.data", 0,
+ if (H5Pset_external(dcpl, "ext1.data", (off_t)0,
(hsize_t)(max_size[0]*sizeof(int)))<0) goto error;
if ((space = H5Screate_simple (1, cur_size, max_size))<0) goto error;
if ((dset = H5Dcreate (file, "dset1", H5T_NATIVE_INT, space, dcpl))<0)
@@ -177,7 +177,7 @@ test_1b(hid_t file)
TESTING("external storage is too small");
if ((dcpl = H5Pcreate (H5P_DATASET_CREATE))<0) goto error;
cur_size[0] = max_size[0] = 100;
- if (H5Pset_external(dcpl, "ext1.data", 0,
+ if (H5Pset_external(dcpl, "ext1.data", (off_t)0,
(hsize_t)(max_size[0]*sizeof(int)-1))<0) goto error;
if ((space = H5Screate_simple (1, cur_size, max_size))<0) goto error;
H5E_BEGIN_TRY {
@@ -234,7 +234,7 @@ test_1c(hid_t file)
if ((dcpl=H5Pcreate (H5P_DATASET_CREATE))<0) goto error;
cur_size[0] = 100;
max_size[0] = 200;
- if (H5Pset_external(dcpl, "ext1.data", 0,
+ if (H5Pset_external(dcpl, "ext1.data", (off_t)0,
(hsize_t)(max_size[0]*sizeof(int)))<0) goto error;
if ((space = H5Screate_simple (1, cur_size, max_size))<0) goto error;
if ((dset = H5Dcreate (file, "dset3", H5T_NATIVE_INT, space, dcpl))<0)
@@ -285,7 +285,7 @@ test_1d(hid_t file)
if ((dcpl=H5Pcreate(H5P_DATASET_CREATE))<0) goto error;
cur_size[0] = 100;
max_size[0] = 200;
- if (H5Pset_external(dcpl, "ext1.data", 0,
+ if (H5Pset_external(dcpl, "ext1.data", (off_t)0,
(hsize_t)(max_size[0]*sizeof(int)-1))<0) goto error;
if ((space=H5Screate_simple(1, cur_size, max_size))<0) goto error;
H5E_BEGIN_TRY {
@@ -345,7 +345,7 @@ test_1e(hid_t file)
/* Create dataset */
if ((dcpl=H5Pcreate(H5P_DATASET_CREATE))<0) goto error;
- if (H5Pset_external(dcpl, "ext1.data", 0, H5F_UNLIMITED)<0) goto error;
+ if (H5Pset_external(dcpl, "ext1.data", (off_t)0, H5F_UNLIMITED)<0) goto error;
cur_size[0] = 100;
max_size[0] = H5S_UNLIMITED;
if ((space=H5Screate_simple(1, cur_size, max_size))<0) goto error;
@@ -423,13 +423,13 @@ test_1f(hid_t file)
TESTING("multiple external files");
if ((dcpl=H5Pcreate(H5P_DATASET_CREATE))<0) goto error;
cur_size[0] = max_size[0] = 100;
- if (H5Pset_external(dcpl, "ext1.data", 0,
+ if (H5Pset_external(dcpl, "ext1.data", (off_t)0,
(hsize_t)(max_size[0]*sizeof(int)/4))<0) goto error;
- if (H5Pset_external(dcpl, "ext2.data", 0,
+ if (H5Pset_external(dcpl, "ext2.data", (off_t)0,
(hsize_t)(max_size[0]*sizeof(int)/4))<0) goto error;
- if (H5Pset_external(dcpl, "ext3.data", 0,
+ if (H5Pset_external(dcpl, "ext3.data", (off_t)0,
(hsize_t)(max_size[0]*sizeof(int)/4))<0) goto error;
- if (H5Pset_external(dcpl, "ext4.data", 0,
+ if (H5Pset_external(dcpl, "ext4.data", (off_t)0,
(hsize_t)(max_size[0]*sizeof(int)/4))<0) goto error;
if ((space=H5Screate_simple(1, cur_size, max_size))<0) goto error;
if ((dset=H5Dcreate(file, "dset6", H5T_NATIVE_INT, space, dcpl))<0)
@@ -476,9 +476,9 @@ test_1g(void)
TESTING("external file following unlimited file");
if ((dcpl=H5Pcreate (H5P_DATASET_CREATE))<0) goto error;
- if (H5Pset_external(dcpl, "ext1.data", 0, H5F_UNLIMITED)<0) goto error;
+ if (H5Pset_external(dcpl, "ext1.data", (off_t)0, H5F_UNLIMITED)<0) goto error;
H5E_BEGIN_TRY {
- status = H5Pset_external(dcpl, "ext2.data", 0, (hsize_t)100);
+ status = H5Pset_external(dcpl, "ext2.data", (off_t)0, (hsize_t)100);
} H5E_END_TRY;
if (status>=0) {
FAILED();
@@ -528,9 +528,9 @@ test_1h(void)
TESTING("address overflow in external files");
if ((dcpl=H5Pcreate(H5P_DATASET_CREATE))<0) goto error;
- if (H5Pset_external(dcpl, "ext1.data", 0, H5F_UNLIMITED-1)<0) goto error;
+ if (H5Pset_external(dcpl, "ext1.data", (off_t)0, H5F_UNLIMITED-1)<0) goto error;
H5E_BEGIN_TRY {
- status = H5Pset_external(dcpl, "ext2.data", 0, (hsize_t)100);
+ status = H5Pset_external(dcpl, "ext2.data", (off_t)0, (hsize_t)100);
} H5E_END_TRY;
if (status>=0) {
FAILED();
@@ -596,7 +596,7 @@ test_2 (hid_t fapl)
assert (fd>=0);
/* n = lseek (fd, (off_t)(i*10), SEEK_SET);
*/
- n = write(fd,temparray,i*10);
+ n = write(fd,temparray,(size_t)i*10);
assert (n>=0 && (size_t)n==i*10);
n = write (fd, part, sizeof(part));
assert (n==sizeof(part));
@@ -617,10 +617,10 @@ test_2 (hid_t fapl)
/* Create the dataset */
if ((dcpl=H5Pcreate(H5P_DATASET_CREATE))<0) goto error;
- if (H5Pset_external (dcpl, "extern_1a.raw", 0, (hsize_t)sizeof part)<0 ||
- H5Pset_external (dcpl, "extern_2a.raw", 10, (hsize_t)sizeof part)<0 ||
- H5Pset_external (dcpl, "extern_3a.raw", 20, (hsize_t)sizeof part)<0 ||
- H5Pset_external (dcpl, "extern_4a.raw", 30, (hsize_t)sizeof part)<0)
+ if (H5Pset_external (dcpl, "extern_1a.raw", (off_t)0, (hsize_t)sizeof part)<0 ||
+ H5Pset_external (dcpl, "extern_2a.raw", (off_t)10, (hsize_t)sizeof part)<0 ||
+ H5Pset_external (dcpl, "extern_3a.raw", (off_t)20, (hsize_t)sizeof part)<0 ||
+ H5Pset_external (dcpl, "extern_4a.raw", (off_t)30, (hsize_t)sizeof part)<0)
goto error;
cur_size = 100;
if ((space=H5Screate_simple (1, &cur_size, NULL))<0) goto error;
@@ -721,10 +721,10 @@ test_3 (hid_t fapl)
/* Create the external file list */
if ((dcpl=H5Pcreate(H5P_DATASET_CREATE))<0) goto error;
- if (H5Pset_external(dcpl, "extern_1b.raw", 0, (hsize_t)sizeof part)<0 ||
- H5Pset_external(dcpl, "extern_2b.raw", 10, (hsize_t)sizeof part)<0 ||
- H5Pset_external(dcpl, "extern_3b.raw", 20, (hsize_t)sizeof part)<0 ||
- H5Pset_external(dcpl, "extern_4b.raw", 30, H5F_UNLIMITED)<0)
+ if (H5Pset_external(dcpl, "extern_1b.raw", (off_t)0, (hsize_t)sizeof part)<0 ||
+ H5Pset_external(dcpl, "extern_2b.raw", (off_t)10, (hsize_t)sizeof part)<0 ||
+ H5Pset_external(dcpl, "extern_3b.raw", (off_t)20, (hsize_t)sizeof part)<0 ||
+ H5Pset_external(dcpl, "extern_4b.raw", (off_t)30, H5F_UNLIMITED)<0)
goto error;
/* Make sure the output files are fresh*/
diff --git a/test/fillval.c b/test/fillval.c
index f5f9700..86fa6a7 100644
--- a/test/fillval.c
+++ b/test/fillval.c
@@ -380,7 +380,8 @@ test_rdwr(hid_t fapl, const char *base_name, H5D_layout_t layout)
nelmts *= hs_size[i];
}
if ((mspace=H5Screate_simple(5, hs_size, hs_size))<0) goto error;
- buf = malloc(nelmts*sizeof(int));
+ assert((nelmts*sizeof(int))==(hssize_t)((size_t)(nelmts*sizeof(int)))); /*check for overflow*/
+ buf = malloc((size_t)(nelmts*sizeof(int)));
for (i=0; i<nelmts; i++) buf[i] = 9999;
if (H5Sselect_hyperslab(fspace, H5S_SELECT_SET, hs_offset, hs_stride,
hs_size, NULL)<0) goto error;
@@ -519,7 +520,7 @@ test_extend(hid_t fapl, const char *base_name, H5D_layout_t layout)
nelmts = max_size[0]*max_size[1]*max_size[2]*max_size[3]*max_size[4];
if ((fd=open(FILE_NAME_RAW, O_RDWR|O_CREAT|O_TRUNC, 0666))<0 ||
close(fd)<0) goto error;
- if (H5Pset_external(dcpl, FILE_NAME_RAW, 0, nelmts*sizeof(int))<0)
+ if (H5Pset_external(dcpl, FILE_NAME_RAW, (off_t)0, (hsize_t)nelmts*sizeof(int))<0)
goto error;
}
#endif
@@ -577,7 +578,8 @@ test_extend(hid_t fapl, const char *base_name, H5D_layout_t layout)
nelmts *= hs_size[i];
}
if ((mspace=H5Screate_simple(5, hs_size, hs_size))<0) goto error;
- buf = malloc(nelmts*sizeof(int));
+ assert((nelmts*sizeof(int))==(hssize_t)((size_t)(nelmts*sizeof(int)))); /*check for overflow*/
+ buf = malloc((size_t)(nelmts*sizeof(int)));
for (i=0; i<nelmts; i++) buf[i] = 9999;
if (H5Sselect_hyperslab(fspace, H5S_SELECT_SET, hs_offset, hs_stride,
hs_size, NULL)<0) goto error;
diff --git a/test/h5test.c b/test/h5test.c
index f8de21a..db4d59d 100644
--- a/test/h5test.c
+++ b/test/h5test.c
@@ -272,7 +272,38 @@ h5_fixname(const char *base_name, hid_t fapl, char *fullname, size_t size)
if (!base_name || !fullname || size<1) return NULL;
-#ifndef H5_WANT_H5_V1_2_COMPAT
+#ifdef H5_WANT_H5_V1_2_COMPAT
+ /* figure out the suffix */
+ if (H5P_DEFAULT!=fapl){
+ if ((driver=H5Pget_driver(fapl))<0)
+ return NULL;
+ if (H5F_LOW_FAMILY==driver) {
+ suffix = "%05d.h5";
+ } else if (H5F_LOW_CORE==driver) {
+ suffix = NULL;
+ }
+ }
+
+ /* Use different ones depending on parallel or serial driver used. */
+ if (H5P_DEFAULT!=fapl && H5F_LOW_MPIO==driver){
+ /* For parallel:
+ * First use command line option, then the environment variable,
+ * then try the constant
+ */
+ prefix = (paraprefix ? paraprefix : getenv("HDF5_PARAPREFIX"));
+#ifdef HDF5_PARAPREFIX
+ if (!prefix) prefix = HDF5_PARAPREFIX;
+#endif
+ }else{
+ /* For serial:
+ * First use the environment variable, then try the constant
+ */
+ prefix = getenv("HDF5_PREFIX");
+#ifdef HDF5_PREFIX
+ if (!prefix) prefix = HDF5_PREFIX;
+#endif
+ }
+#else /* H5_WANT_H5_V1_2_COMPAT */
/* figure out the suffix */
if (H5P_DEFAULT!=fapl){
if ((driver=H5Pget_driver(fapl))<0) return NULL;
@@ -307,7 +338,7 @@ h5_fixname(const char *base_name, hid_t fapl, char *fullname, size_t size)
/* Prepend the prefix value to the base name */
if (prefix && *prefix) {
- if (HDsnprintf(fullname, (long)size, "%s/%s", prefix, base_name)==(int)size) {
+ if (HDsnprintf(fullname, size, "%s/%s", prefix, base_name)==(int)size) {
return NULL; /*buffer is too small*/
}
} else if (strlen(base_name)>=size) {
diff --git a/test/hyperslab.c b/test/hyperslab.c
index 389e803..f2eeb2b 100644
--- a/test/hyperslab.c
+++ b/test/hyperslab.c
@@ -156,7 +156,7 @@ test_fill(size_t nx, size_t ny, size_t nz,
uintn acc; /*accumulator */
size_t i, j, k, dx, dy, dz; /*counters */
size_t u, v, w;
- int ndims; /*hyperslab dimensionality */
+ uintn ndims; /*hyperslab dimensionality */
char dim[64], s[256]; /*temp string */
uintn fill_value; /*fill value */
@@ -330,7 +330,7 @@ test_copy(int mode,
uintn acc; /*accumulator */
hsize_t i, j, k, dx, dy, dz; /*counters */
hsize_t u, v, w;
- int ndims; /*hyperslab dimensionality */
+ uintn ndims; /*hyperslab dimensionality */
char dim[64], s[256]; /*temp string */
const char *sub;
diff --git a/test/istore.c b/test/istore.c
index 3f266c8..f706d60 100644
--- a/test/istore.c
+++ b/test/istore.c
@@ -92,10 +92,10 @@ print_array(uint8_t *array, size_t nx, size_t ny, size_t nz)
*-------------------------------------------------------------------------
*/
static int
-new_object(H5F_t *f, const char *name, intn ndims, H5G_entry_t *ent/*out*/)
+new_object(H5F_t *f, const char *name, uintn ndims, H5G_entry_t *ent/*out*/)
{
H5O_layout_t layout;
- intn i;
+ uintn u;
/* Create the object header */
if (H5O_create(f, 64, ent)) {
@@ -107,11 +107,11 @@ new_object(H5F_t *f, const char *name, intn ndims, H5G_entry_t *ent/*out*/)
/* create chunked storage */
layout.type = H5D_CHUNKED;
layout.ndims = ndims;
- for (i = 0; i < ndims; i++) {
- if (i < (int)NELMTS(align_g)) {
- layout.dim[i] = align_g[i];
+ for (u = 0; u < ndims; u++) {
+ if (u < (int)NELMTS(align_g)) {
+ layout.dim[u] = align_g[u];
} else {
- layout.dim[i] = 2;
+ layout.dim[u] = 2;
}
}
H5F_arr_create(f, &layout/*in,out*/);
@@ -158,14 +158,14 @@ static herr_t
test_create(H5F_t *f, const char *prefix)
{
H5G_entry_t handle;
- intn i;
+ uintn u;
char name[256];
TESTING("istore create");
- for (i = 1; i <= H5O_LAYOUT_NDIMS; i++) {
- HDsnprintf(name, sizeof name, "%s_%02d", prefix, i);
- if (new_object(f, name, i, &handle) < 0)
+ for (u = 1; u <= H5O_LAYOUT_NDIMS; u++) {
+ HDsnprintf(name, sizeof name, "%s_%02u", prefix, u);
+ if (new_object(f, name, u, &handle) < 0)
return FAIL;
}
@@ -198,7 +198,7 @@ test_extend(H5F_t *f, const char *prefix,
{
H5G_entry_t handle;
hsize_t i, j, k, ctr;
- int ndims;
+ uintn ndims;
uint8_t *buf = NULL, *check = NULL, *whole = NULL;
char dims[64], s[256], name[256];
hssize_t offset[3];
@@ -233,7 +233,7 @@ test_extend(H5F_t *f, const char *prefix,
/* Build the new empty object */
sprintf(name, "%s_%s", prefix, dims);
if (new_object(f, name, ndims, &handle) < 0) {
- printf(" Cannot create %d-d object `%s'\n", ndims, name);
+ printf(" Cannot create %u-d object `%s'\n", ndims, name);
goto error;
}
if (NULL == H5O_read(&handle, H5O_LAYOUT, 0, &layout)) {
@@ -402,7 +402,7 @@ static herr_t
test_sparse(H5F_t *f, const char *prefix, size_t nblocks,
size_t nx, size_t ny, size_t nz)
{
- intn ndims;
+ uintn ndims;
hsize_t ctr;
char dims[64], s[256], name[256];
hssize_t offset[3];
@@ -434,7 +434,7 @@ test_sparse(H5F_t *f, const char *prefix, size_t nblocks,
/* Build the new empty object */
sprintf(name, "%s_%s", prefix, dims);
if (new_object(f, name, ndims, &handle) < 0) {
- printf(" Cannot create %d-d object `%s'\n", ndims, name);
+ printf(" Cannot create %u-d object `%s'\n", ndims, name);
goto error;
}
if (NULL == H5O_read(&handle, H5O_LAYOUT, 0, &layout)) {
diff --git a/test/stream_test.c b/test/stream_test.c
index 239c2c6..ffe1c18 100644
--- a/test/stream_test.c
+++ b/test/stream_test.c
@@ -291,7 +291,7 @@ static int receiver (void)
/*
* Read dataset from file into memory.
*/
- data = (int *) malloc (nelems * sizeof (int));
+ data = (int *) malloc ((size_t)(nelems * sizeof (int)));
status = H5Dread (dataset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT,
data);
H5Dclose (dataset);
diff --git a/test/tarray.c b/test/tarray.c
index 41e92d3..ebb5ff8 100644
--- a/test/tarray.c
+++ b/test/tarray.c
@@ -1527,7 +1527,7 @@ typedef struct
{
int nsubfields;
char *name[NMAX];
- off_t offset[NMAX];
+ size_t offset[NMAX];
hid_t datatype[NMAX];
} CmpDTSinfo;
diff --git a/test/testhdf5.h b/test/testhdf5.h
index 7e6c9c6..cc5f8b6 100644
--- a/test/testhdf5.h
+++ b/test/testhdf5.h
@@ -26,8 +26,10 @@
#include <H5private.h>
#include <H5Eprivate.h>
+#ifndef HDF5_TEST_MASTER
extern int num_errs;
extern int Verbosity;
+#endif /* HDF5_TEST_MASTER */
/* Use %ld to print the value because long should cover most cases. */
/* Used to make certain a return value _is_not_ a value */
diff --git a/test/trefer.c b/test/trefer.c
index 28cf428..9935b5b 100644
--- a/test/trefer.c
+++ b/test/trefer.c
@@ -96,7 +96,7 @@ test_reference_obj(void)
CHECK(sid1, FAIL, "H5Screate_simple");
/* Create a group */
- group=H5Gcreate(fid1,"Group1",-1);
+ group=H5Gcreate(fid1,"Group1",(size_t)-1);
CHECK(group, FAIL, "H5Gcreate");
/* Set group's comment */
@@ -455,7 +455,7 @@ test_reference_region(void)
ret = H5Sget_select_hyper_nblocks(sid2);
VERIFY(ret, 1, "H5Sget_select_hyper_nblocks");
coords=HDmalloc(ret*SPACE2_RANK*sizeof(hsize_t)*2); /* allocate space for the hyperslab blocks */
- ret = H5Sget_select_hyper_blocklist(sid2,0,ret,coords);
+ ret = H5Sget_select_hyper_blocklist(sid2,(hsize_t)0,(hsize_t)ret,coords);
CHECK(ret, FAIL, "H5Sget_select_hyper_blocklist");
VERIFY(coords[0], 2, "Hyperslab Coordinates");
VERIFY(coords[1], 2, "Hyperslab Coordinates");
@@ -483,7 +483,7 @@ test_reference_region(void)
ret = H5Sget_select_elem_npoints(sid2);
VERIFY(ret, 10, "H5Sget_select_elem_npoints");
coords=HDmalloc(ret*SPACE2_RANK*sizeof(hsize_t)); /* allocate space for the element points */
- ret = H5Sget_select_elem_pointlist(sid2,0,ret,coords);
+ ret = H5Sget_select_elem_pointlist(sid2,(hsize_t)0,(hsize_t)ret,coords);
CHECK(ret, FAIL, "H5Sget_select_elem_pointlist");
VERIFY((hssize_t)coords[0], coord1[0][0], "Element Coordinates");
VERIFY((hssize_t)coords[1], coord1[0][1], "Element Coordinates");
diff --git a/test/tselect.c b/test/tselect.c
index 33e3988..3625e24 100644
--- a/test/tselect.c
+++ b/test/tselect.c
@@ -326,7 +326,7 @@ test_select_point(void)
CHECK(ret, FAIL, "H5Sselect_elements");
/* Verify correct elements selected */
- H5Sget_select_elem_pointlist(sid1,0,POINT1_NPOINTS,(hsize_t *)temp_coord1);
+ H5Sget_select_elem_pointlist(sid1,(hsize_t)0,(hsize_t)POINT1_NPOINTS,(hsize_t *)temp_coord1);
for(i=0; i<POINT1_NPOINTS; i++) {
VERIFY(temp_coord1[i][0],coord1[i][0],"H5Sget_select_elem_pointlist");
VERIFY(temp_coord1[i][1],coord1[i][1],"H5Sget_select_elem_pointlist");
@@ -351,7 +351,7 @@ test_select_point(void)
CHECK(ret, FAIL, "H5Sselect_elements");
/* Verify correct elements selected */
- H5Sget_select_elem_pointlist(sid1,POINT1_NPOINTS,POINT1_NPOINTS,(hsize_t *)temp_coord1);
+ H5Sget_select_elem_pointlist(sid1,(hsize_t)POINT1_NPOINTS,(hsize_t)POINT1_NPOINTS,(hsize_t *)temp_coord1);
for(i=0; i<POINT1_NPOINTS; i++) {
VERIFY(temp_coord1[i][0],coord1[i][0],"H5Sget_select_elem_pointlist");
VERIFY(temp_coord1[i][1],coord1[i][1],"H5Sget_select_elem_pointlist");
@@ -376,7 +376,7 @@ test_select_point(void)
CHECK(ret, FAIL, "H5Sselect_elements");
/* Verify correct elements selected */
- H5Sget_select_elem_pointlist(sid2,0,POINT1_NPOINTS,(hsize_t *)temp_coord2);
+ H5Sget_select_elem_pointlist(sid2,(hsize_t)0,(hsize_t)POINT1_NPOINTS,(hsize_t *)temp_coord2);
for(i=0; i<POINT1_NPOINTS; i++) {
VERIFY(temp_coord2[i][0],coord2[i][0],"H5Sget_select_elem_pointlist");
VERIFY(temp_coord2[i][1],coord2[i][1],"H5Sget_select_elem_pointlist");
@@ -405,7 +405,7 @@ test_select_point(void)
CHECK(ret, FAIL, "H5Sselect_elements");
/* Verify correct elements selected */
- H5Sget_select_elem_pointlist(sid2,0,POINT1_NPOINTS,(hsize_t *)temp_coord2);
+ H5Sget_select_elem_pointlist(sid2,(hsize_t)0,(hsize_t)POINT1_NPOINTS,(hsize_t *)temp_coord2);
for(i=0; i<POINT1_NPOINTS; i++) {
VERIFY(temp_coord2[i][0],coord2[i][0],"H5Sget_select_elem_pointlist");
VERIFY(temp_coord2[i][1],coord2[i][1],"H5Sget_select_elem_pointlist");
@@ -447,7 +447,7 @@ test_select_point(void)
CHECK(ret, FAIL, "H5Sselect_elements");
/* Verify correct elements selected */
- H5Sget_select_elem_pointlist(sid2,0,POINT1_NPOINTS,(hsize_t *)temp_coord3);
+ H5Sget_select_elem_pointlist(sid2,(hsize_t)0,(hsize_t)POINT1_NPOINTS,(hsize_t *)temp_coord3);
for(i=0; i<POINT1_NPOINTS; i++) {
VERIFY(temp_coord3[i][0],coord3[i][0],"H5Sget_select_elem_pointlist");
VERIFY(temp_coord3[i][1],coord3[i][1],"H5Sget_select_elem_pointlist");
@@ -471,7 +471,7 @@ test_select_point(void)
CHECK(ret, FAIL, "H5Sselect_elements");
/* Verify correct elements selected */
- H5Sget_select_elem_pointlist(sid2,POINT1_NPOINTS,POINT1_NPOINTS,(hsize_t *)temp_coord3);
+ H5Sget_select_elem_pointlist(sid2,(hsize_t)POINT1_NPOINTS,(hsize_t)POINT1_NPOINTS,(hsize_t *)temp_coord3);
for(i=0; i<POINT1_NPOINTS; i++) {
VERIFY(temp_coord3[i][0],coord3[i][0],"H5Sget_select_elem_pointlist");
VERIFY(temp_coord3[i][1],coord3[i][1],"H5Sget_select_elem_pointlist");