3
3
* Copyright (c) 2014-2016 Los Alamos National Security, LLC. All rights
4
4
* reserved.
5
5
* Copyright (c) 2020 Google, LLC. All rights reserved.
6
+ * Copyright (c) 2020 Intel, Inc. All rights reserved.
6
7
* $COPYRIGHT$
7
8
*
8
9
* Additional copyrights may follow
@@ -100,7 +101,7 @@ static ompi_osc_rdma_region_t *find_insertion_point (ompi_osc_rdma_region_t *reg
100
101
return (ompi_osc_rdma_region_t * )((intptr_t ) regions + min_index * region_size );
101
102
}
102
103
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 )) {
104
105
return find_insertion_point (regions , min_index , mid_index - 1 , base , region_size , region_index );
105
106
}
106
107
@@ -113,8 +114,8 @@ static bool ompi_osc_rdma_find_conflicting_attachment (ompi_osc_rdma_handle_t *h
113
114
114
115
OPAL_LIST_FOREACH (attachment , & handle -> attachments , ompi_osc_rdma_attachment_t ) {
115
116
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 ) ) {
118
119
OSC_RDMA_VERBOSE (MCA_BASE_VERBOSE_TRACE , "existing region {%p, %p} overlaps region {%p, %p}" ,
119
120
(void * ) attachment -> base , (void * ) region_bound , (void * ) base , (void * ) bound );
120
121
return true;
@@ -295,8 +296,7 @@ int ompi_osc_rdma_detach (struct ompi_win_t *win, const void *base)
295
296
ompi_osc_rdma_handle_t * rdma_region_handle ;
296
297
osc_rdma_counter_t region_count , region_id ;
297
298
ompi_osc_rdma_region_t * region ;
298
- void * bound ;
299
- int start_index = INT_MAX , region_index ;
299
+ int region_index ;
300
300
301
301
if (module -> flavor != MPI_WIN_FLAVOR_DYNAMIC ) {
302
302
return OMPI_ERR_WIN ;
@@ -313,9 +313,9 @@ int ompi_osc_rdma_detach (struct ompi_win_t *win, const void *base)
313
313
rdma_region_handle = module -> dynamic_handles [region_index ];
314
314
region = (ompi_osc_rdma_region_t * ) ((intptr_t ) module -> state -> regions + region_index * module -> region_size );
315
315
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 );
317
317
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 ) {
319
319
continue ;
320
320
}
321
321
0 commit comments