diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2002-06-19 16:08:27 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2002-06-19 16:08:27 (GMT) |
commit | 8bb096b6977a90df82ca3d32287aa2a7abeb5510 (patch) | |
tree | c63e215da154603f99afff0b9d9b31149a9c2e5c /perform | |
parent | c0c4219b5084ebcbcfe56bb807ece294f2f4f4aa (diff) | |
download | hdf5-8bb096b6977a90df82ca3d32287aa2a7abeb5510.zip hdf5-8bb096b6977a90df82ca3d32287aa2a7abeb5510.tar.gz hdf5-8bb096b6977a90df82ca3d32287aa2a7abeb5510.tar.bz2 |
[svn-r5675] Purpose:
Code cleanup
Description:
Removed more compiler warnings, etc.
Platforms tested:
Linux 2.2.x (eirene) w/parallel
Diffstat (limited to 'perform')
-rw-r--r-- | perform/pio_engine.c | 16 | ||||
-rw-r--r-- | perform/pio_perf.c | 26 | ||||
-rw-r--r-- | perform/pio_timer.c | 2 |
3 files changed, 22 insertions, 22 deletions
diff --git a/perform/pio_engine.c b/perform/pio_engine.c index 689bd7d..3c16860 100644 --- a/perform/pio_engine.c +++ b/perform/pio_engine.c @@ -352,7 +352,7 @@ done: static char * pio_create_filename(iotype iot, const char *base_name, char *fullname, size_t size) { - const char *prefix, *suffix; + const char *prefix, *suffix=""; char *ptr, last = '\0'; size_t i, j; @@ -470,11 +470,11 @@ do_write(results *res, file_descr *fd, parameters *parms, long ndsets, off_t nelmts_xfer; size_t nelmts_toxfer; char dname[64]; - off_t dset_offset; /*dataset offset in a file */ + off_t dset_offset=0; /*dataset offset in a file */ off_t file_offset; /*file offset of the next transfer */ off_t dset_size; /*one dataset size in bytes */ size_t nelmts_in_buf; /*how many element the buffer holds */ - size_t nelmts_in_blk; /*how many element a block holds */ + size_t nelmts_in_blk=0; /*how many element a block holds */ off_t elmts_begin; /*first elmt this process transfer */ off_t elmts_count; /*number of elmts this process transfer */ hid_t dcpl = -1; /* Dataset creation property list */ @@ -688,7 +688,7 @@ do_write(results *res, file_descr *fd, parameters *parms, long ndsets, if (parms->verify) { /*Prepare write data for verify later*/ int *intptr = (int *)buffer; - register int i; + size_t i; for (i = 0; i < nelmts_toxfer; ++i) *intptr++ = pio_mpi_rank_g; @@ -855,11 +855,11 @@ do_read(results *res, file_descr *fd, parameters *parms, long ndsets, off_t nelmts_xfer; size_t nelmts_toxfer; char dname[64]; - off_t dset_offset; /*dataset offset in a file */ + off_t dset_offset=0; /*dataset offset in a file */ off_t file_offset; /*file offset of the next transfer */ off_t dset_size; /*one dataset size in bytes */ size_t nelmts_in_buf; /*how many element the buffer holds */ - size_t nelmts_in_blk; /*how many element a block holds */ + size_t nelmts_in_blk=0; /*how many element a block holds */ off_t elmts_begin; /*first elmt this process transfer */ off_t elmts_count; /*number of elmts this process transfer */ @@ -1131,8 +1131,8 @@ HDfprintf(output, if (parms->verify) { /*verify read data*/ int *intptr = (int *)buffer; - register int i; - register int nerror=0; + size_t i; + int nerror=0; for (i = 0; i < nelmts_toxfer; ++i){ if (*intptr++ != pio_mpi_rank_g){ diff --git a/perform/pio_perf.c b/perform/pio_perf.c index 6b63c7b..b2ee607 100644 --- a/perform/pio_perf.c +++ b/perform/pio_perf.c @@ -512,16 +512,16 @@ run_test(iotype iot, parameters parms, struct options *opts) /* allocate space for tables minmax and that it is sufficient */ /* to initialize all elements to zeros by calloc. */ - write_mpi_mm_table = calloc(parms.num_iters , sizeof(minmax)); - write_mm_table = calloc(parms.num_iters , sizeof(minmax)); - write_gross_mm_table = calloc(parms.num_iters , sizeof(minmax)); - write_raw_mm_table = calloc(parms.num_iters , sizeof(minmax)); + write_mpi_mm_table = calloc((size_t)parms.num_iters , sizeof(minmax)); + write_mm_table = calloc((size_t)parms.num_iters , sizeof(minmax)); + write_gross_mm_table = calloc((size_t)parms.num_iters , sizeof(minmax)); + write_raw_mm_table = calloc((size_t)parms.num_iters , sizeof(minmax)); if (!parms.h5_write_only) { - read_mpi_mm_table = calloc(parms.num_iters , sizeof(minmax)); - read_mm_table = calloc(parms.num_iters , sizeof(minmax)); - read_gross_mm_table = calloc(parms.num_iters , sizeof(minmax)); - read_raw_mm_table = calloc(parms.num_iters , sizeof(minmax)); + read_mpi_mm_table = calloc((size_t)parms.num_iters , sizeof(minmax)); + read_mm_table = calloc((size_t)parms.num_iters , sizeof(minmax)); + read_gross_mm_table = calloc((size_t)parms.num_iters , sizeof(minmax)); + read_raw_mm_table = calloc((size_t)parms.num_iters , sizeof(minmax)); } /* Do IO iteration times, collecting statistics each time */ @@ -786,7 +786,7 @@ static int create_comm_world(int num_procs, int *doing_pio) { /* MPI variables */ - int mrc, ret_value; /* return values */ + int mrc; /* return values */ int color; /* for communicator creation */ int myrank, nprocs; @@ -826,7 +826,7 @@ create_comm_world(int num_procs, int *doing_pio) done: *doing_pio = color; - return ret_value; + return SUCCESS; error_done: destroy_comm_world(); @@ -1122,10 +1122,10 @@ parse_command_line(int argc, char *argv[]) buf[i++] = *end; if (strlen(buf) > 1 || isdigit(buf[0])) { - register int i; + size_t j; - for (i = 0; i < 10 && buf[i] != '\0'; ++i) - if (!isdigit(buf[i])) { + for (j = 0; j < 10 && buf[j] != '\0'; ++j) + if (!isdigit(buf[j])) { fprintf(stderr, "pio_perf: invalid --debug option %s\n", buf); exit(EXIT_FAILURE); diff --git a/perform/pio_timer.c b/perform/pio_timer.c index 675b5d1..2d0e141 100644 --- a/perform/pio_timer.c +++ b/perform/pio_timer.c @@ -138,7 +138,7 @@ set_time(pio_time *pt, timer_type t, int start_stop) } if (pio_debug_level >= 4) { - char *msg; + const char *msg; int myrank; MPI_Comm_rank(pio_comm_g, &myrank); |