From: Mark Wielaard Date: Sun, 10 Oct 2021 14:35:37 +0000 (+0200) Subject: Fix printf warning in libmpiwrap.c X-Git-Tag: VALGRIND_3_18_0~20 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7b1a2b1edd99f15e23be0d259498247367f1e457;p=thirdparty%2Fvalgrind.git 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 --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); }