Remove minor compiler warning.
Change-Id: I85a298c4cd0b660c404fc10c8eb5274d957a996f
diff --git a/qemu-char.c b/qemu-char.c
index e9463d4..70b0183 100644
--- a/qemu-char.c
+++ b/qemu-char.c
@@ -2072,13 +2072,18 @@
for (cmsg = CMSG_FIRSTHDR(msg); cmsg; cmsg = CMSG_NXTHDR(msg, cmsg)) {
int fd;
+ union {
+ int* int_ptr;
+ void* void_ptr;
+ } u;
if (cmsg->cmsg_len != CMSG_LEN(sizeof(int)) ||
cmsg->cmsg_level != SOL_SOCKET ||
cmsg->cmsg_type != SCM_RIGHTS)
continue;
- fd = *((int *)CMSG_DATA(cmsg));
+ u.void_ptr = CMSG_DATA(cmsg);
+ fd = *u.int_ptr;
if (fd < 0)
continue;