An upcoming patch will let the compiler warn us when we are silently
losing precision in traces. In this case, the only platform where
pid_t in the caller does not match int in the trace definition is
64-bit mingw, where the system headers are still buggy in declaring
a 64-bit pid_t even though getpid() only returns 32 bits, so a cast
in the caller is the easiest workaround.
Signed-off-by: Eric Blake <eblake@redhat.com>
---
io/channel-command.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/io/channel-command.c b/io/channel-command.c
index 319c5ed..a90a078 100644
--- a/io/channel-command.c
+++ b/io/channel-command.c
@@ -39,7 +39,7 @@ qio_channel_command_new_pid(int writefd,
ioc->writefd = writefd;
ioc->pid = pid;
- trace_qio_channel_command_new_pid(ioc, writefd, readfd, pid);
+ trace_qio_channel_command_new_pid(ioc, writefd, readfd, (int) pid);
return ioc;
}
--
2.9.3