Skip to content

Commit b6a658b

Browse files
committed
SPML/UCX: Fix compilation warnings with GCC
Signed-off-by: Dmitry Gladkov <[email protected]>
1 parent 48c04cd commit b6a658b

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

oshmem/mca/spml/ucx/spml_ucx.c

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -101,10 +101,10 @@ int mca_spml_ucx_enable(bool enable)
101101

102102
int mca_spml_ucx_del_procs(ompi_proc_t** procs, size_t nprocs)
103103
{
104+
size_t ucp_workers = mca_spml_ucx.ucp_workers;
104105
opal_common_ucx_del_proc_t *del_procs;
105106
size_t i, w, n;
106107
int ret;
107-
int ucp_workers = mca_spml_ucx.ucp_workers;
108108

109109
oshmem_shmem_barrier();
110110

@@ -281,16 +281,16 @@ int mca_spml_ucx_clear_put_op_mask(mca_spml_ucx_ctx_t *ctx)
281281

282282
int mca_spml_ucx_add_procs(ompi_proc_t** procs, size_t nprocs)
283283
{
284-
size_t i, j, k, w, n;
285-
int rc = OSHMEM_ERROR;
286-
int my_rank = oshmem_my_proc_id();
287-
int ucp_workers = mca_spml_ucx.ucp_workers;
284+
int rc = OSHMEM_ERROR;
285+
int my_rank = oshmem_my_proc_id();
286+
size_t ucp_workers = mca_spml_ucx.ucp_workers;
287+
unsigned int *wk_roffs = NULL;
288+
unsigned int *wk_rsizes = NULL;
289+
char *wk_raddrs = NULL;
290+
size_t i, j, w, n;
288291
ucs_status_t err;
289292
ucp_address_t **wk_local_addr;
290293
unsigned int *wk_addr_len;
291-
unsigned int *wk_roffs = NULL;
292-
unsigned int *wk_rsizes = NULL;
293-
char *wk_raddrs = NULL;
294294
ucp_ep_params_t ep_params;
295295

296296
wk_local_addr = calloc(mca_spml_ucx.ucp_workers, sizeof(ucp_address_t *));
@@ -749,9 +749,9 @@ static int mca_spml_ucx_ctx_create_common(long options, mca_spml_ucx_ctx_t **ucx
749749

750750
int mca_spml_ucx_ctx_create(long options, shmem_ctx_t *ctx)
751751
{
752-
mca_spml_ucx_ctx_t *ucx_ctx = NULL;
753-
mca_spml_ucx_ctx_array_t *idle_array = &mca_spml_ucx.idle_array;
752+
mca_spml_ucx_ctx_t *ucx_ctx = NULL;
754753
mca_spml_ucx_ctx_array_t *active_array = &mca_spml_ucx.active_array;
754+
mca_spml_ucx_ctx_array_t *idle_array = &mca_spml_ucx.idle_array;
755755
int i = 0, rc = OSHMEM_SUCCESS;
756756

757757
/* Take a lock controlling context creation. AUX context may set specific
@@ -781,8 +781,8 @@ int mca_spml_ucx_ctx_create(long options, shmem_ctx_t *ctx)
781781

782782
if (!(options & SHMEM_CTX_PRIVATE)) {
783783
SHMEM_MUTEX_LOCK(mca_spml_ucx.internal_mutex);
784-
_ctx_add(&mca_spml_ucx.active_array, ucx_ctx);
785-
if (mca_spml_ucx.active_array.ctxs_count == 0) {
784+
_ctx_add(active_array, ucx_ctx);
785+
if (active_array->ctxs_count == 0) {
786786
opal_progress_register(spml_ucx_ctx_progress);
787787
}
788788
SHMEM_MUTEX_UNLOCK(mca_spml_ucx.internal_mutex);

0 commit comments

Comments
 (0)