qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH v2 05/30] trace: Fix parameter types in io


From: Eric Blake
Subject: [Qemu-devel] [PATCH v2 05/30] trace: Fix parameter types in io
Date: Mon, 13 Mar 2017 14:55:22 -0500

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 <address@hidden>
---
 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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]