Skip to content

Commit 7c5a405

Browse files
authored
Merge pull request #13552 from EmmanuelBRELLE/ubcl_werror_fixes
[UBCL] Fixed warnings to build with -Werror
2 parents 9e531f8 + 02a6377 commit 7c5a405

File tree

7 files changed

+11
-13
lines changed

7 files changed

+11
-13
lines changed

ompi/mca/osc/ubcl/osc_ubcl_accumulate.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
#include "ompi/mca/osc/ubcl/osc_ubcl_request.h"
2727
#include "ompi/mca/common/ubcl/common_ubcl.h"
2828

29-
int get_ubcl_int_type(size_t size, bool is_signed, ubcl_win_atomic_datatype_t *ubcl_type)
29+
static int get_ubcl_int_type(size_t size, bool is_signed, ubcl_win_atomic_datatype_t *ubcl_type)
3030
{
3131
int ret = OMPI_SUCCESS;
3232

@@ -51,7 +51,7 @@ int get_ubcl_int_type(size_t size, bool is_signed, ubcl_win_atomic_datatype_t *u
5151
return ret;
5252
}
5353

54-
int get_ubcl_fp_type(size_t size, ubcl_win_atomic_datatype_t *ubcl_type)
54+
static int get_ubcl_fp_type(size_t size, ubcl_win_atomic_datatype_t *ubcl_type)
5555
{
5656
int ret = OMPI_SUCCESS;
5757

ompi/mca/osc/ubcl/osc_ubcl_get.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,6 @@ int ompi_osc_ubcl_rget(void *origin_addr, size_t origin_count,
139139
target_iov[0].iov_base = (char *) target_addr + gap;
140140
target_iov[0].iov_len = span;
141141
} else {
142-
int ret = OMPI_SUCCESS;
143142
ret = osc_ubcl_build_ddt_iov(target_addr, proc, target_count, target_dt, &target_iov,
144143
&target_iov_count);
145144
if (OPAL_UNLIKELY(OMPI_SUCCESS != ret)) {

ompi/mca/osc/ubcl/osc_ubcl_put.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,6 @@ int ompi_osc_ubcl_rput(const void *origin_addr, size_t origin_count,
147147
target_iov[0].iov_base = (char *) target_addr + gap;
148148
target_iov[0].iov_len = span;
149149
} else {
150-
int ret = OMPI_SUCCESS;
151150
ret = osc_ubcl_build_ddt_iov(target_addr, proc, target_count, target_dt, &target_iov,
152151
&target_iov_count);
153152
if (OPAL_UNLIKELY(OMPI_SUCCESS != ret)) {

ompi/mca/pml/ubcl/pml_ubcl_component.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ int mca_pml_ubcl_component_register(void)
191191
return OMPI_SUCCESS;
192192
}
193193

194-
static void mca_pml_ubcl_check_cuda_accelerator()
194+
static void mca_pml_ubcl_check_cuda_accelerator(void)
195195
{
196196
const char* cuda_component_name = "cuda";
197197
const char* selected_component_name = opal_accelerator_base_selected_component.base_version.mca_component_name;

ompi/mca/pml/ubcl/pml_ubcl_endpoint.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -309,7 +309,7 @@ void mca_pml_ubcl_endpoint_retain(ompi_proc_t *proc)
309309
OBJ_RETAIN(proc);
310310
}
311311

312-
int mca_pml_ubcl_create_endpoints(ompi_proc_t *proc)
312+
static int mca_pml_ubcl_create_endpoints(ompi_proc_t *proc)
313313
{
314314
int err = OMPI_SUCCESS;
315315
mca_common_ubcl_endpoint_t *new_endpoint;

ompi/mca/pml/ubcl/pml_ubcl_isend.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ static inline void mca_pml_ubcl_isend_prepare(const void *buf, size_t count,
100100
void mca_pml_ubcl_isend_start(struct ompi_request_t **request)
101101
{
102102
OPAL_OUTPUT_VERBOSE(
103-
(50, mca_pml_ubcl_component.output, "UBCL_MODULE_ISEND_START %p\n", *request));
103+
(50, mca_pml_ubcl_component.output, "UBCL_MODULE_ISEND_START %p\n", *(void **)request));
104104

105105
mca_pml_ubcl_request_t *req = container_of((*request), mca_pml_ubcl_request_t, ompi_req);
106106

@@ -167,7 +167,7 @@ void mca_pml_ubcl_isend_start(struct ompi_request_t **request)
167167
OPAL_OUTPUT_VERBOSE((50, mca_pml_ubcl_component.output,
168168
"PML/UBCL ISEND: send mpi_tag=%x comm_id=%zu\n", tag, ubcl_cid.bits));
169169
OPAL_OUTPUT_VERBOSE(
170-
(50, mca_pml_ubcl_component.output, "PML/UBCL ISEND: ompi_req=%p\n", *request));
170+
(50, mca_pml_ubcl_component.output, "PML/UBCL ISEND: ompi_req=%p\n", *(void **)request));
171171
OPAL_OUTPUT_VERBOSE(
172172
(50, mca_pml_ubcl_component.output, "PML/UBCL ISEND: sending to rank=%zu\n", endpoint->rank));
173173

ompi/mca/pml/ubcl/pml_ubcl_request.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ mca_pml_ubcl_request_cancel(struct ompi_request_t *request, int complete)
177177
return OMPI_SUCCESS;
178178
}
179179

180-
int mca_pml_ubcl_request_complete(struct ompi_request_t *request)
180+
static int mca_pml_ubcl_request_complete(struct ompi_request_t *request)
181181
{
182182
/* Null check */
183183
if (MPI_REQUEST_NULL == request) {
@@ -248,7 +248,7 @@ void ubcl_request_send_complete_cb(ubcl_status_t status, void *cb_data)
248248
}
249249

250250
OPAL_OUTPUT_VERBOSE((50, mca_pml_ubcl_component.output,
251-
"PML/UBCL SEND_COMPLETE pml_req=%p mpi_tag=%x\n", req, req->tag));
251+
"PML/UBCL SEND_COMPLETE pml_req=%p mpi_tag=%x\n", (void *)req, req->tag));
252252

253253
/** mca_pml_ubcl_request_complete((ompi_request_t *) cb_data); */
254254
}
@@ -284,7 +284,7 @@ void ubcl_request_recv_complete_cb(ubcl_status_t status, void *cb_data)
284284
ompi_request_complete(&(req->ompi_req), true);
285285

286286
OPAL_OUTPUT_VERBOSE((50, mca_pml_ubcl_component.output,
287-
"PML/UBCL RECV_COMPLETE pml_req=%p mpi_tag=%d\n", req, req->tag));
287+
"PML/UBCL RECV_COMPLETE pml_req=%p mpi_tag=%d\n", (void *)req, req->tag));
288288

289289
/** mca_pml_ubcl_request_complete((ompi_request_t *) cb_data); */
290290
}
@@ -296,7 +296,7 @@ void ubcl_request_recv_complete_cb(ubcl_status_t status, void *cb_data)
296296
void mca_pml_ubcl_request_finalize(mca_pml_ubcl_request_t *req)
297297
{
298298
OPAL_OUTPUT_VERBOSE((50, mca_pml_ubcl_component.output,
299-
"PML/UBCL REQUEST_FINALIZE BEGIN pml_req=%p mpi_tag=%x\n", req, req->tag));
299+
"PML/UBCL REQUEST_FINALIZE BEGIN pml_req=%p mpi_tag=%x\n", (void *)req, req->tag));
300300

301301
opal_convertor_cleanup(&req->convertor);
302302
OBJ_DESTRUCT(&req->convertor);
@@ -308,7 +308,7 @@ void mca_pml_ubcl_request_finalize(mca_pml_ubcl_request_t *req)
308308
opal_free_list_return(&mca_pml_ubcl_component.pml_req_free_list, (opal_free_list_item_t *) req);
309309

310310
OPAL_OUTPUT_VERBOSE(
311-
(50, mca_pml_ubcl_component.output, "PML/UBCL REQUEST_FINALIZED %p\n", req));
311+
(50, mca_pml_ubcl_component.output, "PML/UBCL REQUEST_FINALIZED %p\n", (void *)req));
312312
}
313313

314314

0 commit comments

Comments
 (0)