From 47e4cca49d664abf3f09a24d5dac4b67ff6ac8f3 Mon Sep 17 00:00:00 2001 From: Arnaud Giersch Date: Tue, 9 Apr 2013 22:08:37 +0200 Subject: [PATCH] Initialize remainder. Again, this is only to shut gcc up. --- src/smpi/colls/allreduce-NTS.c | 4 ++-- src/smpi/colls/allreduce-lr.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/smpi/colls/allreduce-NTS.c b/src/smpi/colls/allreduce-NTS.c index 32ca68b7f6..a8cf48d0c8 100644 --- a/src/smpi/colls/allreduce-NTS.c +++ b/src/smpi/colls/allreduce-NTS.c @@ -34,12 +34,12 @@ smpi_coll_tuned_allreduce_NTS(void *sbuf, void *rbuf, int rcount, /* when communication size is not divisible by number of process: call the native implementation for the remain chunk at the end of the operation */ - else if (rcount % size != 0) { + if (rcount % size != 0) { remainder = rcount % size; remainder_flag = 1; remainder_offset = (rcount / size) * size * extent; } else { - remainder_flag = remainder_offset = 0; + remainder = remainder_flag = remainder_offset = 0; } /* size of each point-to-point communication is equal to the size of the whole message diff --git a/src/smpi/colls/allreduce-lr.c b/src/smpi/colls/allreduce-lr.c index d5266292d0..81cb39210c 100644 --- a/src/smpi/colls/allreduce-lr.c +++ b/src/smpi/colls/allreduce-lr.c @@ -39,12 +39,12 @@ smpi_coll_tuned_allreduce_lr(void *sbuf, void *rbuf, int rcount, /* when communication size is not divisible by number of process: call the native implementation for the remain chunk at the end of the operation */ - else if (rcount % size != 0) { + if (rcount % size != 0) { remainder = rcount % size; remainder_flag = 1; remainder_offset = (rcount / size) * size * extent; } else { - remainder_flag = remainder_offset = 0; + remainder = remainder_flag = remainder_offset = 0; } /* size of each point-to-point communication is equal to the size of the whole message -- 2.20.1