From 167e2f2b5543008e02613dcd56e36f7326912cdb Mon Sep 17 00:00:00 2001 From: Matthieu Patou Date: Sun, 22 Sep 2013 22:23:51 -0700 Subject: pidl: Generate wireshark that conforms to the rules of Wireshark project Signed-off-by: Matthieu Patou Reviewed-by: Stefan Metzmacher Autobuild-User(master): Stefan Metzmacher Autobuild-Date(master): Tue Sep 24 02:04:05 CEST 2013 on sn-devel-104 --- pidl/lib/Parse/Pidl/Wireshark/NDR.pm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'pidl/lib/Parse/Pidl/Wireshark') diff --git a/pidl/lib/Parse/Pidl/Wireshark/NDR.pm b/pidl/lib/Parse/Pidl/Wireshark/NDR.pm index c05deebeda..9c49931079 100644 --- a/pidl/lib/Parse/Pidl/Wireshark/NDR.pm +++ b/pidl/lib/Parse/Pidl/Wireshark/NDR.pm @@ -366,7 +366,7 @@ sub ElementLevel($$$$$$$$) my $hf2 = $self->register_hf_field($hf."_", "Subcontext length", "$ifname.$pn.$_->{NAME}subcontext", "FT_UINT$num_bits", "BASE_HEX", "NULL", 0, ""); $num_bits = 3264 if ($num_bits == 32); $self->{hf_used}->{$hf2} = 1; - $self->pidl_code("dcerpc_info *di = pinfo->private_data;"); + $self->pidl_code("dcerpc_info *di = (dcerpc_info*)pinfo->private_data;"); $self->pidl_code("guint$num_bits size;"); $self->pidl_code("int conformant = di->conformant_run;"); $self->pidl_code("tvbuff_t *subtvb;"); @@ -641,7 +641,7 @@ sub Struct($$$$) $self->pidl_code("proto_item *item = NULL;"); $self->pidl_code("proto_tree *tree = NULL;"); if ($e->{ALIGN} > 1) { - $self->pidl_code("dcerpc_info *di = pinfo->private_data;"); + $self->pidl_code("dcerpc_info *di = (dcerpc_info *)pinfo->private_data;"); } $self->pidl_code("int old_offset;"); $self->pidl_code(""); @@ -1025,6 +1025,8 @@ sub Parse($$$$$) It is maintained by the Samba team, not the Wireshark team. Instructions on how to download and install Pidl can be found at http://wiki.wireshark.org/Pidl + + \$Id\$ */ "; @@ -1032,9 +1034,7 @@ sub Parse($$$$$) $self->pidl_hdr($notice); $self->{res}->{headers} = "\n"; - $self->{res}->{headers} .= "#ifdef HAVE_CONFIG_H\n"; $self->{res}->{headers} .= "#include \"config.h\"\n"; - $self->{res}->{headers} .= "#endif\n\n"; $self->{res}->{headers} .= "#ifdef _MSC_VER\n"; $self->{res}->{headers} .= "#pragma warning(disable:4005)\n"; -- cgit