On Fri, Jan 22, 2016 at 08:52:36AM -0800, Sean Bruno wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA512 > > > > On 01/22/16 08:47, Peter Maydell wrote: > > > This one is just straightforwardly BSD-only code that hasn't been > > compile-tested. > > > >> qemu-char.c:4265:36: warning: incompatible pointer types passing > >> 'ChardevCommon *' (aka 'struct ChardevCommon *') to parameter of > >> type 'ChardevBackend *' (aka 'struct ChardevBackend *') > >> [-Wincompatible-pointer-types] return qemu_chr_open_pp_fd(fd, > >> common, errp); ^~~~~~ qemu-char.c:1838:61: note: passing argument > >> to parameter 'backend' here ChardevBackend *backend, > > > > This one looks like it ought to build on Linux so you're probably > > right about it being a clang-only thing. (We do build with clang on > > OSX but I think there the CHARDEV_PARPORT code is not compiled > > in.) > > > > thanks -- PMM > > > > Yeah, this is smack in the middle of #ifdef (random BSD) here. It > looks like a simple copy/paste error where "common" should have been > "backend". Fixes the build failure, but still emits a cast warning. > I think this is the intent of the changes however. > > index e133f4f..73eb10f 100644 > - --- a/qemu-char.c > +++ b/qemu-char.c > @@ -1840,7 +1840,7 @@ static CharDriverState *qemu_chr_open_pp_fd(int fd, > { > CharDriverState *chr; > > - - chr = qemu_chr_alloc(common, errp); > + chr = qemu_chr_alloc(backend, errp); > if (!chr) { > return NULL; > }
Close, but you need to change the type of the parameter too. Can you test this for me diff --git a/qemu-char.c b/qemu-char.c index e133f4f..aa2e660 100644 --- a/qemu-char.c +++ b/qemu-char.c @@ -1835,12 +1835,12 @@ static int pp_ioctl(CharDriverState *chr, int cmd, void *arg) } static CharDriverState *qemu_chr_open_pp_fd(int fd, - ChardevBackend *backend, + ChardevCommon *backend, Error **errp) { CharDriverState *chr; - chr = qemu_chr_alloc(common, errp); + chr = qemu_chr_alloc(backend, errp); if (!chr) { return NULL; } If it solves it, i'll send a patch formally Regards, Daniel -- |: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :| |: http://libvirt.org -o- http://virt-manager.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :|