Skip to content

Commit 86de81b

Browse files
committed
Silence a bunch of warnings
Signed-off-by: Ralph Castain <rhc@pmix.org>
1 parent 9cfdc38 commit 86de81b

File tree

2 files changed

+8
-10
lines changed

2 files changed

+8
-10
lines changed

ompi/mca/osc/rdma/osc_rdma_dynamic.c

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
* Copyright (c) 2014-2016 Los Alamos National Security, LLC. All rights
44
* reserved.
55
* Copyright (c) 2020 Google, LLC. All rights reserved.
6+
* Copyright (c) 2020 Intel, Inc. All rights reserved.
67
* $COPYRIGHT$
78
*
89
* Additional copyrights may follow
@@ -100,7 +101,7 @@ static ompi_osc_rdma_region_t *find_insertion_point (ompi_osc_rdma_region_t *reg
100101
return (ompi_osc_rdma_region_t *)((intptr_t) regions + min_index * region_size);
101102
}
102103

103-
if (region->base > base || (region->base == base && region->len > region_size)) {
104+
if (region->base > base || (region->base == base && (size_t)region->len > region_size)) {
104105
return find_insertion_point (regions, min_index, mid_index-1, base, region_size, region_index);
105106
}
106107

@@ -113,8 +114,8 @@ static bool ompi_osc_rdma_find_conflicting_attachment (ompi_osc_rdma_handle_t *h
113114

114115
OPAL_LIST_FOREACH(attachment, &handle->attachments, ompi_osc_rdma_attachment_t) {
115116
intptr_t region_bound = attachment->base + attachment->len;
116-
if (base >= attachment->base && base < region_bound ||
117-
bound > attachment->base && bound <= region_bound) {
117+
if ((base >= attachment->base && base < region_bound) ||
118+
(bound > attachment->base && bound <= region_bound)) {
118119
OSC_RDMA_VERBOSE(MCA_BASE_VERBOSE_TRACE, "existing region {%p, %p} overlaps region {%p, %p}",
119120
(void *) attachment->base, (void *) region_bound, (void *) base, (void *) bound);
120121
return true;
@@ -295,8 +296,7 @@ int ompi_osc_rdma_detach (struct ompi_win_t *win, const void *base)
295296
ompi_osc_rdma_handle_t *rdma_region_handle;
296297
osc_rdma_counter_t region_count, region_id;
297298
ompi_osc_rdma_region_t *region;
298-
void *bound;
299-
int start_index = INT_MAX, region_index;
299+
int region_index;
300300

301301
if (module->flavor != MPI_WIN_FLAVOR_DYNAMIC) {
302302
return OMPI_ERR_WIN;
@@ -313,9 +313,9 @@ int ompi_osc_rdma_detach (struct ompi_win_t *win, const void *base)
313313
rdma_region_handle = module->dynamic_handles[region_index];
314314
region = (ompi_osc_rdma_region_t *) ((intptr_t) module->state->regions + region_index * module->region_size);
315315
OSC_RDMA_VERBOSE(MCA_BASE_VERBOSE_INFO, "checking attachments at index %d {.base=%p, len=%lu} for attachment %p"
316-
", region handle=%p", region_index, (void *) region->base, region->len, base, rdma_region_handle);
316+
", region handle=%p", region_index, (void *) region->base, (unsigned long)region->len, base, (void*)rdma_region_handle);
317317

318-
if (region->base > (uintptr_t) base || (region->base + region->len) < (uintptr_t) base) {
318+
if ((uintptr_t)region->base > (uintptr_t) base || (uintptr_t)(region->base + region->len) < (uintptr_t) base) {
319319
continue;
320320
}
321321

opal/mca/shmem/posix/shmem_posix_common_utils.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
* Copyright (c) 2010-2011 Los Alamos National Security, LLC.
1515
* All rights reserved.
1616
* Copyright (c) 2011 NVIDIA Corporation. All rights reserved.
17-
* Copyright (c) 2014 Intel, Inc. All rights reserved.
17+
* Copyright (c) 2014-2020 Intel, Inc. All rights reserved.
1818
* Copyright (c) 2019 Triad National Security, LLC. All rights
1919
* reserved.
2020
*
@@ -91,8 +91,6 @@ shmem_posix_shm_open(char *posix_file_name_buff, size_t size)
9191
* of here. we can't be selected :-(.
9292
*/
9393
else {
94-
const char *hn;
95-
hn = opal_gethostname();
9694
opal_output_verbose(10, opal_shmem_base_framework.framework_output,
9795
"shmem_posix_shm_open: disqualifying posix because "
9896
"shm_open(2) failed with error: %s (errno %d)\n",

0 commit comments

Comments
 (0)