On Wed, Jul 20, 2016 at 10:27:36AM -0400, Cole Robinson wrote:
I'm seeing this compilation warning on Fedora 24, with
wireshark-devel-2.1.0-3.fc24.x86_64 which has the header file fix that was
previously breaking compilation:
CC wireshark/src/wireshark_src_libvirt_la-packet-libvirt.lo
CC wireshark/src/wireshark_src_libvirt_la-plugin.lo
CCLD nss/libnss_libvirt.la
wireshark/src/packet-libvirt.c: In function 'proto_reg_handoff_libvirt':
wireshark/src/packet-libvirt.c:548:46: warning: passing argument 1 of
'create_dissector_handle' from incompatible pointer type
[-Wincompatible-pointer-types]
libvirt_handle = create_dissector_handle(dissect_libvirt, proto_libvirt);
^~~~~~~~~~~~~~~
In file included from wireshark/src/packet-libvirt.c:28:0:
/usr/include/wireshark/epan/packet.h:525:68: note: expected 'dissector_t {aka
int (*)(struct tvbuff *, struct _packet_info *, struct _proto_node *, void
*)}' but argument is of type 'void (*)(tvbuff_t *, packet_info *, proto_tree
*) {aka void (*)(struct tvbuff *, struct _packet_info *, struct _proto_node *)}'
WS_DLL_PUBLIC dissector_handle_t create_dissector_handle(dissector_t dissector,
I can't even find the definition of dissect_libvirt so I assume there's some
weird magic going on here...
This is all in wireshark auto-generated code. In tools/wireshark/src it
has auto-generated packet-libvirt.c containing
static void
dissect_libvirt(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
{
...
}
The dissector_t type though is defined as
typedef int (*dissector_t)(tvbuff_t *, packet_info *, proto_tree *, void *);
So there's the wrong return type and a missing arg. Seems wireshark
code generator is simply broken.
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 :|