Skip to content

Commit 24630e6

Browse files
committed
portals4: fix compiler warnings
Signed-off-by: Todd Kordenbrock <thkgcode@gmail.com>
1 parent 231e320 commit 24630e6

File tree

6 files changed

+22
-21
lines changed

6 files changed

+22
-21
lines changed

ompi/mca/coll/portals4/coll_portals4_gather.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ setup_gather_buffers_binomial(struct ompi_communicator_t *comm,
215215
opal_output_verbose(30, ompi_coll_base_framework.framework_output,
216216
"%s:%d:vrank(%d): root - gather_buf(%p) - gather_bytes(%lu)=packed_size(%ld) * size(%d)",
217217
__FILE__, __LINE__, vrank,
218-
request->u.gather.gather_buf, request->u.gather.gather_bytes,
218+
(void*)request->u.gather.gather_buf, request->u.gather.gather_bytes,
219219
request->u.gather.packed_size, request->u.gather.size);
220220
} else if (bmtree->tree_nextsize) {
221221
/*
@@ -238,7 +238,7 @@ setup_gather_buffers_binomial(struct ompi_communicator_t *comm,
238238
opal_output_verbose(30, ompi_coll_base_framework.framework_output,
239239
"%s:%d:vrank(%d): nonleaf - gather_buf(%p) - gather_bytes(%lu)=packed_size(%ld) * (bmtree->tree_numdescendants(%d) + 1)",
240240
__FILE__, __LINE__, vrank,
241-
request->u.gather.gather_buf, request->u.gather.gather_bytes,
241+
(void*)request->u.gather.gather_buf, request->u.gather.gather_bytes,
242242
request->u.gather.packed_size, bmtree->tree_numdescendants);
243243
} else {
244244
/* leaf nodes, allocate space to pack into and put from */
@@ -257,7 +257,7 @@ setup_gather_buffers_binomial(struct ompi_communicator_t *comm,
257257
opal_output_verbose(30, ompi_coll_base_framework.framework_output,
258258
"%s:%d:vrank(%d): leaf - gather_buf(%p) - gather_bytes(%lu)=packed_size(%ld)",
259259
__FILE__, __LINE__, vrank,
260-
request->u.gather.gather_buf, request->u.gather.gather_bytes,
260+
(void*)request->u.gather.gather_buf, request->u.gather.gather_bytes,
261261
request->u.gather.packed_size);
262262
}
263263

@@ -316,7 +316,7 @@ setup_gather_buffers_linear(struct ompi_communicator_t *comm,
316316
opal_output_verbose(30, ompi_coll_base_framework.framework_output,
317317
"%s:%d:rank(%d): root - gather_buf(%p) - gather_bytes(%lu)=packed_size(%ld) * size(%d)",
318318
__FILE__, __LINE__, request->u.gather.my_rank,
319-
request->u.gather.gather_buf, request->u.gather.gather_bytes,
319+
(void*)request->u.gather.gather_buf, request->u.gather.gather_bytes,
320320
request->u.gather.packed_size, request->u.gather.size);
321321
} else {
322322
/* non-root nodes, allocate space to pack into and put from */
@@ -334,7 +334,7 @@ setup_gather_buffers_linear(struct ompi_communicator_t *comm,
334334
opal_output_verbose(30, ompi_coll_base_framework.framework_output,
335335
"%s:%d:rank(%d): leaf - gather_buf(%p) - gather_bytes(%lu)=packed_size(%ld)",
336336
__FILE__, __LINE__, request->u.gather.my_rank,
337-
request->u.gather.gather_buf, request->u.gather.gather_bytes,
337+
(void*)request->u.gather.gather_buf, request->u.gather.gather_bytes,
338338
request->u.gather.packed_size);
339339
}
340340

ompi/mca/coll/portals4/coll_portals4_scatter.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ setup_scatter_buffers_linear(struct ompi_communicator_t *comm,
9191
opal_output_verbose(30, ompi_coll_base_framework.framework_output,
9292
"%s:%d:rank(%d): root - scatter_buf(%p) - scatter_bytes(%lu)=packed_size(%ld) * size(%d)",
9393
__FILE__, __LINE__, request->u.scatter.my_rank,
94-
request->u.scatter.scatter_buf, request->u.scatter.scatter_bytes,
94+
(void*)request->u.scatter.scatter_buf, request->u.scatter.scatter_bytes,
9595
request->u.scatter.packed_size, request->u.scatter.size);
9696
} else {
9797
request->u.scatter.scatter_bytes=request->u.scatter.packed_size;
@@ -104,7 +104,7 @@ setup_scatter_buffers_linear(struct ompi_communicator_t *comm,
104104
opal_output_verbose(30, ompi_coll_base_framework.framework_output,
105105
"%s:%d:rank(%d): leaf - scatter_buf(%p) - scatter_bytes(%lu)=packed_size(%ld)",
106106
__FILE__, __LINE__, request->u.scatter.my_rank,
107-
request->u.scatter.scatter_buf, request->u.scatter.scatter_bytes,
107+
(void*)request->u.scatter.scatter_buf, request->u.scatter.scatter_bytes,
108108
request->u.scatter.packed_size);
109109
}
110110

ompi/mca/mtl/portals4/mtl_portals4_recv.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ read_msg(void *start, ptl_size_t length, ptl_process_t target,
4949
ompi_mtl_portals4_recv_request_t *request)
5050
{
5151
int ret, i;
52-
ptl_size_t rest = length, asked = 0;
52+
ptl_size_t rest = length;
5353
int32_t frag_count;
5454

5555
#if OMPI_MTL_PORTALS4_FLOW_CONTROL
@@ -102,7 +102,6 @@ read_msg(void *start, ptl_size_t length, ptl_process_t target,
102102
return OMPI_ERR_OUT_OF_RESOURCE;
103103
}
104104
rest -= frag->frag_length;
105-
asked += frag->frag_length;
106105
}
107106

108107
return OMPI_SUCCESS;

ompi/mca/mtl/portals4/mtl_portals4_send.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -418,7 +418,7 @@ ompi_mtl_portals4_long_isend(void *start, size_t length, uint32_t contextid, int
418418

419419
#if OMPI_MTL_PORTALS4_FLOW_CONTROL
420420
void
421-
ompi_mtl_portals4_pending_list_progress()
421+
ompi_mtl_portals4_pending_list_progress(void)
422422
{
423423
int ret, val;
424424
opal_list_item_t *item;

ompi/mca/osc/portals4/osc_portals4_comm.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2245,7 +2245,8 @@ ompi_osc_portals4_raccumulate(const void *origin_addr,
22452245
size_t offset, size;
22462246
ptl_op_t ptl_op;
22472247
ptl_datatype_t ptl_dt;
2248-
ptrdiff_t sent, length, origin_lb, target_lb, extent;
2248+
ptl_size_t sent, length;
2249+
ptrdiff_t origin_lb, target_lb, extent;
22492250

22502251
OPAL_OUTPUT_VERBOSE((50, ompi_osc_base_framework.framework_output,
22512252
"raccumulate: 0x%lx, %zu, %s, %d, %lu, %zu, %s, %s 0x%lx",
@@ -2998,7 +2999,8 @@ ompi_osc_portals4_accumulate(const void *origin_addr,
29982999
size_t offset, size;
29993000
ptl_op_t ptl_op;
30003001
ptl_datatype_t ptl_dt;
3001-
ptrdiff_t sent, length, origin_lb, target_lb, extent;
3002+
ptl_size_t sent, length;
3003+
ptrdiff_t origin_lb, target_lb, extent;
30023004

30033005
OPAL_OUTPUT_VERBOSE((50, ompi_osc_base_framework.framework_output,
30043006
"accumulate: 0x%lx, %zu, %s, %d, %lu, %zu, %s, %s, 0x%lx",

ompi/mca/osc/portals4/osc_portals4_component.c

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -115,18 +115,18 @@ static bool
115115
check_config_value_bool(char *key, opal_info_t *info)
116116
{
117117
int ret, flag, param;
118-
const bool *flag_value;
119-
bool result;
118+
bool result = false;
119+
const bool *flag_value = &result;
120+
120121
ret = opal_info_get_bool(info, key, &result, &flag);
121-
if (OMPI_SUCCESS != ret || !flag) goto info_not_found;
122-
return result;
122+
if (OMPI_SUCCESS == ret && flag) {
123+
return result;
124+
}
123125

124-
info_not_found:
125126
param = mca_base_var_find("ompi", "osc", "portals4", key);
126-
if (0 > param) return false;
127-
128-
ret = mca_base_var_get_value(param, &flag_value, NULL, NULL);
129-
if (OMPI_SUCCESS != ret) return false;
127+
if (0 <= param) {
128+
(void) mca_base_var_get_value(param, &flag_value, NULL, NULL);
129+
}
130130

131131
return flag_value[0];
132132
}

0 commit comments

Comments
 (0)