Huge thanks to our Platinum Members Endace and LiveAction,
and our Silver Member Veeam, for supporting the Wireshark Foundation and project.

Wireshark-dev: Re: [Wireshark-dev] buildbot failure in Wireshark (development) on Visual-Studio

From: Stephen Fisher <steve@xxxxxxxxxxxxxxxxxx>
Date: Mon, 28 Mar 2011 23:16:28 -0600
On Mon, Mar 28, 2011 at 09:54:43PM -0400, Ed Beroset wrote:
> Chris Maynard wrote:
> > Stephen Fisher<steve@...>  writes:
> >
> >> packet-vnc.c(1970) : warning C4018: '>' : signed/unsigned mismatch
> >>
> >> Any ideas?
> >
> > I added a cast that fixes it.  I'm not 100% sure why the warning, 
> > but I think it might be because the multiplication operation 
> > promotes the guint8's to int's.
> 
> Yes, that's exactly right.  Since the original code just passed the 
> product of two guint8 quantities into a macro, the compiler is, at 
> least according to my understanding of C99, free to promote that 
> product to either a signed or unsigned int if either would be 
> sufficiently large to hold the result (which is the case for 32-bit 
> ints or uints).

Thanks Chris and Ed.  It makes perfect sense now.