From efaf3faf8b1d61621c2e9253f853ab0733f6eba3 Mon Sep 17 00:00:00 2001 From: Arnaud Giersch Date: Mon, 9 Jan 2012 14:48:25 +0100 Subject: [PATCH] =?utf8?q?Fix=20error:=20passing=20argument=207=20of=20?= =?utf8?q?=E2=80=98SIMIX=5Freq=5Fcomm=5Fisend=E2=80=99=20from=20incompatib?= =?utf8?q?le=20pointer=20type.?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Note: casting non-compatible pointers to functions results in undefined behavior. --- src/smpi/smpi_base.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/smpi/smpi_base.c b/src/smpi/smpi_base.c index 1751f2570a..39859d8ba0 100644 --- a/src/smpi/smpi_base.c +++ b/src/smpi/smpi_base.c @@ -63,6 +63,11 @@ static MPI_Request build_request(void *buf, int count, return request; } +static void smpi_mpi_request_free_voidp(void* request) +{ + smpi_mpi_request_free(request); +} + /* MPI Low level calls */ MPI_Request smpi_mpi_send_init(void *buf, int count, MPI_Datatype datatype, int dst, int tag, MPI_Comm comm) @@ -115,7 +120,7 @@ void smpi_mpi_start(MPI_Request request) SIMIX_req_comm_isend(mailbox, request->size, -1.0, request->buf, request->size, &match_send, - (void (*)(void *))&smpi_mpi_request_free, // how to free the userdata if a detached send fails + &smpi_mpi_request_free_voidp, // how to free the userdata if a detached send fails request, // detach if msg size < eager/rdv switch limit detached); -- 2.20.1