Patchwork Fix some compilation warnings on FreeBSD hosts

login
register
mail settings
Submitter Juergen Lock
Date March 25, 2010, 9:34 p.m.
Message ID <20100325213400.GA52932@triton8.kn-bremen.de>
Download mbox | patch
Permalink /patch/48599/
State New
Headers show

Comments

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

Patch

--- 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;