Wireshark-bugs: [Wireshark-bugs] [Bug 6394] Support for SMB 2.22 features

Date: Fri, 30 Sep 2011 18:42:22 -0700 (PDT)
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6394

--- Comment #7 from Stefan Metzmacher <metze@xxxxxxxxx> 2011-09-30 18:42:21 PDT ---
(In reply to comment #6)
> On Windows when compiling the patched packet-smb2.c, I get:
> 
> packet-smb2.c(2005) : warning C4244: '=' : conversion from 'guint16' to
> 'guint8', possible loss of data
> packet-smb2.c(4056) : warning C4244: '=' : conversion from 'guint64' to
> 'gfloat', possible loss of data
> packet-smb2.c(4059) : warning C4244: '=' : conversion from 'guint64' to
> 'gfloat', possible loss of data
> packet-smb2.c(4062) : warning C4244: '=' : conversion from 'guint64' to
> 'gfloat', possible loss of data
> packet-smb2.c(4065) : warning C4244: '=' : conversion from 'guint64' to
> 'gfloat', possible loss of data
> 
> ========
> The first: (line 2005)
> 
>     sf = tvb_get_letohs(tvb, offset);
> 
> presumably should be:
> 
>     sf = tvb_get_guint8(tvb, offset);

yes

> 
> =========
> 
> For the others: (lines 4056, 4059,...)
> 
>     if (link_speed >= (1000*1000*1000)) {
> ==>        val = link_speed / (1000*1000*1000);
>         unit = "G";
>     } else if (link_speed >= (1000*1000)) {
> ==>        val = link_speed / (1000*1000);
>         unit = "M";
>     } else if (link_speed >= (1000)) {
> ==>        val = link_speed / (1000);
>         unit = "K";
>     } else {
> ==>        val = link_speed;
>         unit = "";
> 
> ???
> 

you just add (gfloat) casts there.

metze

-- 
Configure bugmail: https://bugs.wireshark.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching all bug changes.