Skip to content

Commit b5ed0b2

Browse files
authored
Merge pull request #12497 from wenduwan/han_compiler_warnings
coll/han: fix compiler warnings
2 parents 6564419 + 0310ff9 commit b5ed0b2

File tree

3 files changed

+4
-5
lines changed

3 files changed

+4
-5
lines changed

ompi/mca/coll/han/coll_han.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -522,7 +522,7 @@ ompi_coll_han_reorder_gather(const void *sbuf,
522522
int * topo);
523523

524524
size_t
525-
coll_han_utils_gcd(const size_t *numerators, const size_t size);
525+
coll_han_utils_gcd(const uint64_t *numerators, const size_t size);
526526

527527
int
528528
coll_han_utils_create_contiguous_datatype(size_t count, const ompi_datatype_t *oldType,

ompi/mca/coll/han/coll_han_reduce.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,6 @@ mca_coll_han_reduce_intra(const void *sbuf,
132132
int *vranks = han_module->cached_vranks;
133133
int low_rank = ompi_comm_rank(low_comm);
134134
int low_size = ompi_comm_size(low_comm);
135-
int up_rank = ompi_comm_rank(up_comm);
136135

137136
int root_low_rank;
138137
int root_up_rank;

ompi/mca/coll/han/coll_han_utils.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,12 @@
2525
* @param[in] size Number of numerators
2626
* @returns The GCD, where 1 <= GCD
2727
*/
28-
size_t coll_han_utils_gcd(const size_t *numerators, const size_t size)
28+
size_t coll_han_utils_gcd(const uint64_t *numerators, const size_t size)
2929
{
30-
size_t denominator = numerators[0], numerator, tmp;
30+
size_t denominator = (size_t) numerators[0], numerator, tmp;
3131

3232
for (size_t i = 1; i < size; ++i) {
33-
numerator = numerators[i];
33+
numerator = (size_t) numerators[i];
3434

3535
if (0 == denominator) {
3636
denominator = numerator;

0 commit comments

Comments
 (0)