Fix some compilation warnings on FreeBSD hosts

Submitted by Juergen Lock on March 25, 2010, 9:34 p.m.

Details

Message ID 20100325213400.GA52932@triton8.kn-bremen.de
State New
Headers show

Commit Message

Juergen Lock March 25, 2010, 9:34 p.m.
Signed-off-by: Juergen Lock <nox@jelal.kn-bremen.de>

Patch hide | download patch | download mbox

--- a/qemu-char.c
+++ b/qemu-char.c
@@ -1372,7 +1372,7 @@  static CharDriverState *qemu_chr_open_pp
 #if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__DragonFly__)
 static int pp_ioctl(CharDriverState *chr, int cmd, void *arg)
 {
-    int fd = (int)chr->opaque;
+    int fd = (int)(long)chr->opaque;
     uint8_t b;
 
     switch(cmd) {
@@ -1418,7 +1418,7 @@  static CharDriverState *qemu_chr_open_pp
         return NULL;
 
     chr = qemu_mallocz(sizeof(CharDriverState));
-    chr->opaque = (void *)fd;
+    chr->opaque = (void *)(long)fd;
     chr->chr_write = null_chr_write;
     chr->chr_ioctl = pp_ioctl;
     return chr;