Skip to content

Commit 24efffb

Browse files
committed
request: fix compilation error
The request.h header is unfortunately included files in the C++ bindings. C++ does not allow assigning from void * to another pointer without a cast. This commit adds the cast. We can clean this up when the C++ bindings are deleted. Fixes open-mpi/ompi#1707 Signed-off-by: Nathan Hjelm <[email protected]> (cherry picked from open-mpi/ompi@ef11ba9) Signed-off-by: Nathan Hjelm <[email protected]>
1 parent f19731b commit 24efffb

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

ompi/request/request.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
* Copyright (c) 2006-2012 Cisco Systems, Inc. All rights reserved.
1414
* Copyright (c) 2009-2012 Oracle and/or its affiliates. All rights reserved.
1515
* Copyright (c) 2012 Oak Ridge National Labs. All rights reserved.
16-
* Copyright (c) 2015 Los Alamos National Security, LLC. All rights
16+
* Copyright (c) 2015-2016 Los Alamos National Security, LLC. All rights
1717
* reserved.
1818
* $COPYRIGHT$
1919
*
@@ -413,8 +413,8 @@ static inline int ompi_request_complete(ompi_request_t* request, bool with_signa
413413
}
414414

415415
if(!OPAL_ATOMIC_CMPSET_PTR(&request->req_complete, REQUEST_PENDING, REQUEST_COMPLETED)) {
416-
ompi_wait_sync_t *tmp_sync = OPAL_ATOMIC_SWP_PTR(&request->req_complete,
417-
REQUEST_COMPLETED);
416+
ompi_wait_sync_t *tmp_sync = (ompi_wait_sync_t *) OPAL_ATOMIC_SWP_PTR(&request->req_complete,
417+
REQUEST_COMPLETED);
418418
/* In the case where another thread concurrently changed the request to REQUEST_PENDING */
419419
if( REQUEST_PENDING != tmp_sync )
420420
wait_sync_update(tmp_sync, 1, request->req_status.MPI_ERROR);

0 commit comments

Comments
 (0)