summaryrefslogtreecommitdiffstats
path: root/perform
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2002-06-19 16:06:55 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2002-06-19 16:06:55 (GMT)
commitea052ffd55cabca3ef756a7f44e7f3f2fa32b679 (patch)
treeb7c28b9fa9d1552d5a0bcfbaba686d925d5470a5 /perform
parent29a0f3e3586080a69f0048bf79dec5e9749fcb5d (diff)
downloadhdf5-ea052ffd55cabca3ef756a7f44e7f3f2fa32b679.zip
hdf5-ea052ffd55cabca3ef756a7f44e7f3f2fa32b679.tar.gz
hdf5-ea052ffd55cabca3ef756a7f44e7f3f2fa32b679.tar.bz2
[svn-r5674] 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.c16
-rw-r--r--perform/pio_perf.c26
-rw-r--r--perform/pio_timer.c2
3 files changed, 22 insertions, 22 deletions
diff --git a/perform/pio_engine.c b/perform/pio_engine.c
index dfcb465..0a59158 100644
--- a/perform/pio_engine.c
+++ b/perform/pio_engine.c
@@ -342,7 +342,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;
@@ -460,11 +460,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 */
@@ -678,7 +678,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;
@@ -845,11 +845,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 */
@@ -1121,8 +1121,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 f0b158c..661821a 100644
--- a/perform/pio_perf.c
+++ b/perform/pio_perf.c
@@ -505,16 +505,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 */
@@ -779,7 +779,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;
@@ -819,7 +819,7 @@ create_comm_world(int num_procs, int *doing_pio)
done:
*doing_pio = color;
- return ret_value;
+ return SUCCESS;
error_done:
destroy_comm_world();
@@ -1116,10 +1116,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 588ea1d..6b87c3e 100644
--- a/perform/pio_timer.c
+++ b/perform/pio_timer.c
@@ -130,7 +130,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);