]> git.ipfire.org Git - thirdparty/qemu.git/commitdiff
Fix some compilation warnings on FreeBSD hosts
authorJuergen Lock <nox@jelal.kn-bremen.de>
Thu, 25 Mar 2010 21:34:00 +0000 (22:34 +0100)
committerBlue Swirl <blauwirbel@gmail.com>
Tue, 30 Mar 2010 17:44:44 +0000 (17:44 +0000)
Signed-off-by: Juergen Lock <nox@jelal.kn-bremen.de>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
qemu-char.c

index a3d6e6496701f66ec30b509a32160c086c29f941..3e4df8d56c549789092cf0014ddc2b650b5270f1 100644 (file)
@@ -1369,7 +1369,7 @@ static CharDriverState *qemu_chr_open_pp(QemuOpts *opts)
 #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) {
@@ -1415,7 +1415,7 @@ static CharDriverState *qemu_chr_open_pp(QemuOpts *opts)
         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;