Ethereal-dev: Re: [ethereal-dev] Clear warnings patch.

Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.

From: Richard Sharpe <sharpe@xxxxxxxxxx>
Date: Sat, 23 Oct 1999 21:43:31 +0900
At 02:29 AM 10/24/99 +0200, Tomislav Vujec <Tomislav.Vujec@xxxxxxxxx> wrote:
>Hi!
>
>I can't use X during weekends, and that bugs me a lot. Nevertheless, I
>can use windows term emulator, and that was enough for playing around
>compiling and browsing ethereal sources. I noticed couple of boring
>warnings, a fix is attached.

Hi, 

Yes, I know, but they are my problems to fix ... One or two require that I
add some things, others are variables that were generated by my Perl
scripts that generate code and I have to fix them up by hand.

I will commit some patches for these soon. I had them ready, and then Guy
committed the stuff for conversations and now I need to repatch.

>Regards,
>Tomislav? register.c
>Index: packet-smb.c
>===================================================================
>RCS file: /cvsroot/ethereal/packet-smb.c,v
>retrieving revision 1.31
>diff -u -r1.31 packet-smb.c
>--- packet-smb.c	1999/10/22 07:17:37	1.31
>+++ packet-smb.c	1999/10/24 00:21:38
>@@ -2462,7 +2462,7 @@
> dissect_tcon_andx_smb(const u_char *pd, int offset, frame_data *fd,
proto_tree *tree, struct smb_info si, int max_data, int SMB_offset, int
errcode, int dirn)
> 
> {
>-  guint8      wct, andxcmd;
>+  guint8      wct, andxcmd = 0;
>   guint16     andxoffs, flags, passwdlen, bcc, optionsup;
>   const char  *str;
>   proto_tree  *flags_tree;
>@@ -3546,7 +3546,6 @@
>   proto_tree    *Action_tree;
>   proto_item    *ti;
>   guint8        WordCount;
>-  guint8        BufferFormat;
>   guint8        AndXReserved;
>   guint8        AndXCommand = 0xFF;
>   guint32       ServerFID;
>@@ -8186,7 +8185,6 @@
>   guint8        SetupCount;
>   guint8        Reserved3;
>   guint8        Reserved1;
>-  guint8        Parameters;
>   guint8        Parameter;
>   guint8        Pad2;
>   guint8        Pad1;
>@@ -8195,7 +8193,7 @@
>   guint32       Timeout;
>   guint16       TotalParameterCount;
>   guint16       TotalDataCount;
>-  guint16       Setup;
>+  guint16       Setup = 0;
>   guint16       Reserved2;
>   guint16       ParameterOffset;
>   guint16       ParameterDisplacement;
>@@ -8817,7 +8815,6 @@
>   guint8        SetupCount;
>   guint8        Reserved3;
>   guint8        Reserved1;
>-  guint8        Parameters;
>   guint8        Parameter;
>   guint8        Pad2;
>   guint8        Pad1;
>Index: packet-snmp.c
>===================================================================
>RCS file: /cvsroot/ethereal/packet-snmp.c,v
>retrieving revision 1.9
>diff -u -r1.9 packet-snmp.c
>--- packet-snmp.c	1999/09/12 14:34:18	1.9
>+++ packet-snmp.c	1999/10/24 00:21:38
>@@ -341,7 +341,7 @@
> 	
> #ifdef WITH_SNMP_UCD	
> 	/* parse the SNMP header */
>-	if(NULL == asn_parse_header( &pd[offset], &length, &type)) {
>+	if(NULL == asn_parse_header((u_char*)&pd[offset], &length, &type)) {
> 		dissect_snmp_error(pd, offset, fd, tree,
> 			"Couldn't parse SNMP header");
> 		return;
>@@ -355,7 +355,7 @@
> 	/* authenticates message */
> 	length=fd->pkt_len-offset;
> 	header_length=length;
>-	data = snmp_comstr_parse(&pd[offset], &length, community,
&community_length, (int*)&version);
>+	data = snmp_comstr_parse((u_char*)&pd[offset], &length, community,
&community_length, (long*)&version);
> 	if(NULL == data) {
> 		dissect_snmp_error(pd, offset, fd, tree,
> 		    "Couldn't parse authentication");
>

Regards
-------
Richard Sharpe, sharpe@xxxxxxxxxx, Master Linux Administrator :-),
Samba (Team member, www.samba.org), Ethereal (Team member, www.zing.org)
Co-author, SAMS Teach Yourself Samba in 24 Hours
Author: First Australian 5-day, intensive, hands-on Linux SysAdmin course