Skip to content

Commit 7eab3f6

Browse files
author
Luke Robison
committed
mtl/ofi: Remove unused variables
Correct Coverity CID 1515761. Remove unused variable found by GCC (namelen). Signed-off-by: Luke Robison <lrbison@amazon.com>
1 parent eb0ca97 commit 7eab3f6

File tree

2 files changed

+0
-7
lines changed

2 files changed

+0
-7
lines changed

ompi/mca/mtl/ofi/mtl_ofi.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -224,15 +224,12 @@ ompi_mtl_ofi_add_procs(struct mca_mtl_base_module_t *mtl,
224224
int ret = OMPI_SUCCESS;
225225
size_t i;
226226
size_t size;
227-
size_t namelen;
228227
int count = 0;
229228
char *ep_name = NULL;
230229
fi_addr_t *fi_addrs = NULL;
231230
mca_mtl_ofi_endpoint_t *endpoint = NULL;
232231
int num_peers_limit = (1 << ompi_mtl_ofi.num_bits_source_rank) - 1;
233232

234-
namelen = ompi_mtl_ofi.epnamelen;
235-
236233
/* We cannot add more ranks than available tag bits */
237234
if ((false == ompi_mtl_ofi.fi_cq_data) &&
238235
OPAL_UNLIKELY(((int) (nprocs + ompi_mtl_ofi.num_peers) > num_peers_limit))) {

ompi/mca/mtl/ofi/mtl_ofi_component.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -576,7 +576,6 @@ ompi_mtl_ofi_component_init(bool enable_progress_threads,
576576
struct fi_info *hints, *hints_dup = NULL;
577577
struct fi_info *providers = NULL;
578578
struct fi_info *prov = NULL;
579-
struct fi_info *prov_cq_data = NULL;
580579
void *ep_name = NULL;
581580
size_t namelen = 0;
582581
int universe_size;
@@ -1137,9 +1136,6 @@ ompi_mtl_ofi_component_init(bool enable_progress_threads,
11371136
if (providers) {
11381137
(void) fi_freeinfo(providers);
11391138
}
1140-
if (prov_cq_data) {
1141-
(void) fi_freeinfo(prov_cq_data);
1142-
}
11431139
if (hints) {
11441140
(void) fi_freeinfo(hints);
11451141
}

0 commit comments

Comments
 (0)