Wireshark-dev: Re: [Wireshark-dev] Compile broken on 64-bit Linux -- packet-dtls.c
From: Jeff Morriss <[email protected]>
Date: Wed, 18 Apr 2007 12:19:54 +0800

Guy Harris wrote:
On Apr 16, 2007, at 3:16 PM, Mike Duigou wrote:

packet-dtls.c: In function 'dissect_dtls':
packet-dtls.c:433: warning: cast to pointer from integer of different size
That call happens to do something that's probably safe on platforms  
where
	1) "int" has no more bits than a pointer

and

	2) converting from int to pointer doesn't mangle the bits

which is true of all the platforms we currently support.
... and I thought compilers were (generally) supposed to not warn you if 
you're explicitly casting (on the assumption you should know what you're 
doing).
However, it's still a good idea to fix it. There is no code in Wireshark that actually *uses* the DTLS tap, so we could just get rid of the tap. It seems a bit odd that the data passed to the tap is the proto_dtls value - that doesn't seem like very interesting information to pass to a tap, as it doesn't change from call to call.
The same warning shows up in packet-ssl.c (same problem).

There seem to be a lot of unused taps in there so I just changed the parameter to NULL for now--I guess if someone eventually wants to use it they can fill in some interesting data.