On a Friday in 2020, Pavel Hrdina wrote:
With meson introduction which is using the same CFLAGS for the whole project some compilation errors were discovered. The wireshark plugin library is the only one in tools directory that is not using AM_CFLAGS. With the AM_CFLAGS we get these errors: ../../tools/wireshark/src/packet-libvirt.c: In function 'dissect_libvirt_fds': ../../tools/wireshark/src/packet-libvirt.c:348:31: error: unused parameter 'tvb' [-Werror=unused-parameter] 348 | dissect_libvirt_fds(tvbuff_t *tvb, gint start, gint32 nfds) | ~~~~~~~~~~^~~ ../../tools/wireshark/src/packet-libvirt.c:348:41: error: unused parameter 'start' [-Werror=unused-parameter] 348 | dissect_libvirt_fds(tvbuff_t *tvb, gint start, gint32 nfds) | ~~~~~^~~~~ ../../tools/wireshark/src/packet-libvirt.c:348:55: error: unused parameter 'nfds' [-Werror=unused-parameter] 348 | dissect_libvirt_fds(tvbuff_t *tvb, gint start, gint32 nfds) | ~~~~~~~^~~~ At top level: ../../tools/wireshark/src/packet-libvirt.c:64:5: error: 'dissect_xdr_bool' defined but not used [-Werror=unused-function] 64 | dissect_xdr_##xtype(tvbuff_t *tvb, proto_tree *tree, XDR *xdrs, int hf) \ | ^~~~~~~~~~~~ ../../tools/wireshark/src/packet-libvirt.c:88:1: note: in expansion of macro 'XDR_PRIMITIVE_DISSECTOR' 88 | XDR_PRIMITIVE_DISSECTOR(bool, bool_t, boolean) | ^~~~~~~~~~~~~~~~~~~~~~~ ../../tools/wireshark/src/packet-libvirt.c:64:5: error: 'dissect_xdr_float' defined but not used [-Werror=unused-function] 64 | dissect_xdr_##xtype(tvbuff_t *tvb, proto_tree *tree, XDR *xdrs, int hf) \ | ^~~~~~~~~~~~ ../../tools/wireshark/src/packet-libvirt.c:86:1: note: in expansion of macro 'XDR_PRIMITIVE_DISSECTOR' 86 | XDR_PRIMITIVE_DISSECTOR(float, gfloat, float) | ^~~~~~~~~~~~~~~~~~~~~~~ ../../tools/wireshark/src/packet-libvirt.c:64:5: error: 'dissect_xdr_short' defined but not used [-Werror=unused-function] 64 | dissect_xdr_##xtype(tvbuff_t *tvb, proto_tree *tree, XDR *xdrs, int hf) \ | ^~~~~~~~~~~~ ../../tools/wireshark/src/packet-libvirt.c:80:1: note: in expansion of macro 'XDR_PRIMITIVE_DISSECTOR' 80 | XDR_PRIMITIVE_DISSECTOR(short, gint16, int) | ^~~~~~~~~~~~~~~~~~~~~~~ ../../tools/wireshark/src/packet-libvirt.c: In function 'dissect_libvirt_message': ../../tools/wireshark/src/packet-libvirt.c:423:34: error: null pointer dereference [-Werror=null-dereference] 423 | vir_xdr_dissector_t xd = find_payload_dissector(proc, type, get_program_data(prog, VIR_PROGRAM_DISSECTORS), | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 424 | *(gsize *)get_program_data(prog, VIR_PROGRAM_DISSECTORS_LEN)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Signed-off-by: Pavel Hrdina <phrdina@xxxxxxxxxx> --- src/internal.h | 4 ++++ tools/Makefile.am | 2 +- tools/wireshark/src/packet-libvirt.c | 17 ++++++++++++++--- 3 files changed, 19 insertions(+), 4 deletions(-)
Reviewed-by: Ján Tomko <jtomko@xxxxxxxxxx> Jano
Attachment:
signature.asc
Description: PGP signature