Skip to content

Commit 4544311

Browse files
authored
Merge pull request #12254 from devreal/opal_compiler_warnings
Squash clang-14 warnings in OPAL
2 parents d231daf + 8c374f0 commit 4544311

File tree

4 files changed

+14
-14
lines changed

4 files changed

+14
-14
lines changed

opal/mca/btl/smcuda/btl_smcuda.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1261,6 +1261,7 @@ static void mca_btl_smcuda_send_cuda_ipc_request(struct mca_btl_base_module_t *b
12611261

12621262
MCA_BTL_SMCUDA_FIFO_WRITE(endpoint, endpoint->my_smp_rank, endpoint->peer_smp_rank,
12631263
(void *) VIRTUAL2RELATIVE(frag->hdr), false, true, rc);
1264+
(void)rc;
12641265
return;
12651266
}
12661267

opal/mca/btl/smcuda/btl_smcuda_component.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -634,6 +634,7 @@ static void mca_btl_smcuda_send_cuda_ipc_ack(struct mca_btl_base_module_t *btl,
634634

635635
MCA_BTL_SMCUDA_FIFO_WRITE(endpoint, endpoint->my_smp_rank, endpoint->peer_smp_rank,
636636
(void *) VIRTUAL2RELATIVE(frag->hdr), false, true, rc);
637+
(void)rc;
637638

638639
/* Set state now that we have sent message */
639640
if (ready) {
@@ -1040,6 +1041,7 @@ int mca_btl_smcuda_component_progress(void)
10401041
/* return the fragment */
10411042
MCA_BTL_SMCUDA_FIFO_WRITE(mca_btl_smcuda_component.sm_peers[peer_smp_rank], my_smp_rank,
10421043
peer_smp_rank, hdr->frag, false, true, rc);
1044+
(void)rc;
10431045
break;
10441046
}
10451047
case MCA_BTL_SMCUDA_FRAG_ACK: {
@@ -1086,6 +1088,7 @@ int mca_btl_smcuda_component_progress(void)
10861088
| MCA_BTL_SMCUDA_FRAG_STATUS_MASK);
10871089
MCA_BTL_SMCUDA_FIFO_WRITE(mca_btl_smcuda_component.sm_peers[peer_smp_rank], my_smp_rank,
10881090
peer_smp_rank, hdr, false, true, rc);
1091+
(void)rc;
10891092
break;
10901093
}
10911094
}

opal/mca/btl/smcuda/btl_smcuda_fifo.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -85,24 +85,24 @@ static void add_pending(struct mca_btl_base_endpoint_t *ep, void *data, bool res
8585
#define MCA_BTL_SMCUDA_FIFO_WRITE(endpoint_peer, my_smp_rank, peer_smp_rank, hdr, resend, \
8686
retry_pending_sends, rc) \
8787
do { \
88-
sm_fifo_t *fifo = &(mca_btl_smcuda_component.fifo[peer_smp_rank][FIFO_MAP(my_smp_rank)]); \
88+
sm_fifo_t *_fifo = &(mca_btl_smcuda_component.fifo[peer_smp_rank][FIFO_MAP(my_smp_rank)]);\
8989
\
9090
if (retry_pending_sends) { \
9191
if (0 < opal_list_get_size(&endpoint_peer->pending_sends)) { \
9292
btl_smcuda_process_pending_sends(endpoint_peer); \
9393
} \
9494
} \
9595
\
96-
opal_atomic_lock(&(fifo->head_lock)); \
96+
opal_atomic_lock(&(_fifo->head_lock)); \
9797
/* post fragment */ \
98-
if (sm_fifo_write(hdr, fifo) != OPAL_SUCCESS) { \
98+
if (sm_fifo_write(hdr, _fifo) != OPAL_SUCCESS) { \
9999
add_pending(endpoint_peer, hdr, resend); \
100100
rc = OPAL_ERR_RESOURCE_BUSY; \
101101
} else { \
102102
MCA_BTL_SMCUDA_SIGNAL_PEER(endpoint_peer); \
103103
rc = OPAL_SUCCESS; \
104104
} \
105-
opal_atomic_unlock(&(fifo->head_lock)); \
105+
opal_atomic_unlock(&(_fifo->head_lock)); \
106106
} while (0)
107107

108108
#endif

opal/mca/rcache/rgpusm/rcache_rgpusm_module.c

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -117,14 +117,14 @@ static int mca_rcache_rgpusm_open_mem_handle(void *base, size_t size, mca_rcache
117117
if (OPAL_UNLIKELY(OPAL_SUCCESS != result)) {
118118
opal_output_verbose(10, mca_rcache_rgpusm_component.output,
119119
"open_ipc_handle failed: base=%p (remote base=%p,size=%d)",
120-
newreg->alloc_base, base, (int) size);
120+
(void*)newreg->alloc_base, base, (int) size);
121121
/* Currently, this is a non-recoverable error */
122122
return OPAL_ERROR;
123123
}
124124

125125
opal_output_verbose(10, mca_rcache_rgpusm_component.output,
126126
"open_ipc_handle passed: base=%p (remote base=%p,size=%d)",
127-
newreg->alloc_base, base, (int) size);
127+
(void*)newreg->alloc_base, base, (int) size);
128128

129129
return OPAL_SUCCESS;
130130
}
@@ -172,7 +172,7 @@ static inline bool mca_rcache_rgpusm_deregister_lru(mca_rcache_base_module_t *rc
172172
if (OPAL_SUCCESS != rc) {
173173
opal_output_verbose(10, mca_rcache_rgpusm_component.output,
174174
"RGPUSM: Failed to deregister the memory addr=%p, size=%d",
175-
old_reg->base, (int) (old_reg->bound - old_reg->base + 1));
175+
(void*)old_reg->base, (int) (old_reg->bound - old_reg->base + 1));
176176
return false;
177177
}
178178

@@ -292,7 +292,7 @@ int mca_rcache_rgpusm_register(mca_rcache_base_module_t *rcache, void *addr, siz
292292
rcache_rgpusm->stat_cache_hit++;
293293
opal_output_verbose(10, mca_rcache_rgpusm_component.output,
294294
"RGPUSM: Found addr=%p,size=%d (base=%p,size=%d) in cache", addr,
295-
(int) size, (*reg)->base, (int) ((*reg)->bound - (*reg)->base));
295+
(int) size, (void*)(*reg)->base, (int) ((*reg)->bound - (*reg)->base));
296296

297297
if (0 ==
298298
memcmp(((mca_opal_gpu_reg_t *)*reg)->data.ipcHandle.handle, rget_reg->data.ipcHandle.handle,
@@ -304,7 +304,7 @@ int mca_rcache_rgpusm_register(mca_rcache_base_module_t *rcache, void *addr, siz
304304
opal_output_verbose(10, mca_rcache_rgpusm_component.output,
305305
"RGPUSM: Mismatched Handle: Evicting/unregistering "
306306
"addr=%p,size=%d (base=%p,size=%d) from cache",
307-
addr, (int) size, (*reg)->base,
307+
addr, (int) size, (void*)(*reg)->base,
308308
(int) ((*reg)->bound - (*reg)->base));
309309

310310
/* The ref_count has to be zero as this memory cannot possibly
@@ -508,10 +508,6 @@ int mca_rcache_rgpusm_find(struct mca_rcache_base_module_t *rcache, void *addr,
508508
{
509509
mca_rcache_rgpusm_module_t *rcache_rgpusm = (mca_rcache_rgpusm_module_t *) rcache;
510510
int rc;
511-
unsigned char *base, *bound;
512-
513-
base = addr;
514-
bound = base + size - 1; /* To keep cache hits working correctly */
515511

516512
OPAL_THREAD_LOCK(&rcache->lock);
517513
opal_output(-1, "Looking for addr=%p, size=%d", addr, (int) size);
@@ -555,7 +551,7 @@ int mca_rcache_rgpusm_deregister(struct mca_rcache_base_module_t *rcache,
555551
opal_output_verbose(20, mca_rcache_rgpusm_component.output,
556552
"RGPUSM: Deregister: addr=%p, size=%d: cacheable and pinned, leave in "
557553
"cache, PUSH IN LRU",
558-
reg->base, (int) (reg->bound - reg->base + 1));
554+
(void*)reg->base, (int) (reg->bound - reg->base + 1));
559555
opal_list_prepend(&rcache_rgpusm->lru_list, (opal_list_item_t *) reg);
560556
} else {
561557
/* Remove from rcache first */

0 commit comments

Comments
 (0)