diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2004-04-18 04:10:36 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2004-04-18 04:10:36 (GMT) |
commit | d09b08ce39f96d70f1d68a9f2e0313495c784619 (patch) | |
tree | 63ba039519b469adb1fffd30261079ae0dcf93f1 /testpar | |
parent | 0343b61666f105ca865dcbc0cbcff87f43f5e489 (diff) | |
download | hdf5-d09b08ce39f96d70f1d68a9f2e0313495c784619.zip hdf5-d09b08ce39f96d70f1d68a9f2e0313495c784619.tar.gz hdf5-d09b08ce39f96d70f1d68a9f2e0313495c784619.tar.bz2 |
[svn-r8384] Purpose:
Code cleanup
Description:
Clean up lots of warnings based on those reported from the SGI compilers
as well as gcc.
Platforms tested:
SGI O3900, IRIX64 6.5 (Cheryl's SGI machine)
FreeBSD 4.9 (sleipnir) w/ & w/o parallel
h5committest
Diffstat (limited to 'testpar')
-rw-r--r-- | testpar/t_mpi.c | 12 | ||||
-rw-r--r-- | testpar/testphdf5.h | 1 |
2 files changed, 7 insertions, 6 deletions
diff --git a/testpar/t_mpi.c b/testpar/t_mpi.c index d2d4ca2..c93eed6 100644 --- a/testpar/t_mpi.c +++ b/testpar/t_mpi.c @@ -93,11 +93,11 @@ test_mpio_overlap_writes(char *filename) while (mpi_off < MPIO_TEST_WRITE_SIZE){ /* make sure the write does not exceed the TEST_WRITE_SIZE */ if (mpi_off+stride > MPIO_TEST_WRITE_SIZE) - stride = MPIO_TEST_WRITE_SIZE - mpi_off; + stride = MPIO_TEST_WRITE_SIZE - (int)mpi_off; /* set data to some trivial pattern for easy verification */ for (i=0; i<stride; i++) - buf[i] = (mpi_off+i) & 0x7f; + buf[i] = (char)(mpi_off+i) & 0x7f; mrc = MPI_File_write_at(fh, mpi_off, buf, stride, MPI_BYTE, &mpi_stat); VRFY((mrc==MPI_SUCCESS), ""); @@ -137,14 +137,14 @@ test_mpio_overlap_writes(char *filename) for (mpi_off=0; mpi_off < MPIO_TEST_WRITE_SIZE; mpi_off += bufsize){ /* make sure it does not read beyond end of data */ if (mpi_off+stride > MPIO_TEST_WRITE_SIZE) - stride = MPIO_TEST_WRITE_SIZE - mpi_off; + stride = MPIO_TEST_WRITE_SIZE - (int)mpi_off; mrc = MPI_File_read_at(fh, mpi_off, buf, stride, MPI_BYTE, &mpi_stat); VRFY((mrc==MPI_SUCCESS), ""); vrfyerrs=0; for (i=0; i<stride; i++){ char expected; - expected = (mpi_off+i) & 0x7f; + expected = (char)(mpi_off+i) & 0x7f; if ((buf[i] != expected) && (vrfyerrs++ < MAX_ERR_REPORT || VERBOSE_MED)) printf("proc %d: found data error at [%ld], expect %d, got %d\n", @@ -393,7 +393,7 @@ finish: #define USEFSYNC 2 /* request file_sync */ -test_mpio_1wMr(char *filename, int special_request) +int test_mpio_1wMr(char *filename, int special_request) { char hostname[128]; int mpi_size, mpi_rank; @@ -489,7 +489,7 @@ if (special_request & USEATOM){ /* Only one process writes */ if (mpi_rank==irank){ if (VERBOSE_HI){ - PRINTID; printf("wrote %d bytes at %d\n", DIMSIZE, mpi_off); + PRINTID; printf("wrote %d bytes at %d\n", DIMSIZE, (int)mpi_off); } if ((mpi_err = MPI_File_write_at(fh, mpi_off, writedata, DIMSIZE, MPI_BYTE, &mpi_stat)) diff --git a/testpar/testphdf5.h b/testpar/testphdf5.h index 5d6ec67..4bd448e 100644 --- a/testpar/testphdf5.h +++ b/testpar/testphdf5.h @@ -18,6 +18,7 @@ #define PHDF5TEST_H #include "h5test.h" +#include "testhdf5.h" #ifndef TRUE #define TRUE 1 |