Wireshark-dev: Re: [Wireshark-dev] [Wireshark-commits] rev 25171: /trunk/epan/dissectors/ /trun
From: "Martin Mathieson" <martin.r.mathieson@xxxxxxxxxxxxxx>
Date: Fri, 25 Apr 2008 20:17:34 +0100


On Fri, Apr 25, 2008 at 8:08 PM, Guy Harris <guy@xxxxxxxxxxxx> wrote:
Bill Meier wrote:

> I expect that the next buildbot Windows compile of packet-umts_fp will
> fail (since it does on my Windows system):
>
> packet-umts_fp.c(861) : warning C4244: 'function' : conversion from
> 'unsigned __int64 ' to 'unsigned int ', possible
> s of data
> Generating Code...
> NMAKE : fatal error U1077: 'cl' : return code '0x2'

If "credits" is really 11 bits long (i.e., if that call to
proto_tree_add_bits_ret_val() will never put a value > 2047 into
"credits"), it could be cast to a guint (with a comment explaining
this), which should suppress the warning.

Yes, have done now (you shamed me into going back to add a comment).

Does anyone know of a gcc flag we can add to catch cases like this?  It (obviously) compiled clean on my work machine.
 

_______________________________________________
Wireshark-dev mailing list
Wireshark-dev@xxxxxxxxxxxxx
http://www.wireshark.org/mailman/listinfo/wireshark-dev