|
From: Mark W. <ma...@so...> - 2021-10-10 14:39:12
|
https://sourceware.org/git/gitweb.cgi?p=valgrind.git;h=7b1a2b1edd99f15e23be0d259498247367f1e457 commit 7b1a2b1edd99f15e23be0d259498247367f1e457 Author: Mark Wielaard <ma...@kl...> Date: Sun Oct 10 16:35:37 2021 +0200 Fix printf warning in libmpiwrap.c libmpiwrap.c:1379:45: warning: format '%d' expects argument of type 'int', but argument 5 has type 'MPI_Request' {aka 'struct ompi_request_t *'} Unfortunately MPI_Request is an opaque type (we don't really know what is in struct ompi_request_t) so we cannot simply print it as int. In other places we print an MPI_Request as 0x%lx by casting it to an unsigned long. Do the same here. Diff: --- mpi/libmpiwrap.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mpi/libmpiwrap.c b/mpi/libmpiwrap.c index 1ec0c202ae..b277617854 100644 --- a/mpi/libmpiwrap.c +++ b/mpi/libmpiwrap.c @@ -1376,8 +1376,8 @@ static void maybe_complete ( Bool error_in_status, if (count_from_Status(&recv_count, shadow->datatype, status)) { make_mem_defined_if_addressable(shadow->buf, recv_count, shadow->datatype); if (opt_verbosity > 1) - fprintf(stderr, "%s %5d: sReq- %d (completed)\n", - preamble, my_pid, request_before); + fprintf(stderr, "%s %5d: sReq- 0x%lx (completed)\n", + preamble, my_pid, (unsigned long) request_before); } delete_shadow_Request(request_before); } |