On Thu, Mar 19, 2009 at 11:12:03AM -0700, Guy Harris wrote:
> 
> On Mar 19, 2009, at 10:44 AM, wme...@wireshark.org wrote:
> 
> > -As suggested by Jakub Zawadzki: use sizeof(...) rather than a  
> > numeric constant in various places;
> 
> Warning: g_snprintf()'s function signature has an annoying botch in it  
> - the size argument is a gulong, not a gsize.
> 
> Not a problem in the UN*X and Windows ILP32 environment and in the  
> UN*X LP64 environment, but it causes the Microsoft compiler to  
> (correctly) warn about a conversion from a 64-bit integer to a 32-bit  
> integer in the Windows LLP64 environment.  Cast sizeof - ...

Btw. I've just check log of Win64 build #116 [1]
For instance in packet-vcdu.c:203 there is:
  g_snprintf(juliantime, sizeof(juliantime), fmt, year, julianday, hour, 
minute, second, pb5_milliseconds);
and it compiles without warning, so if size value is known compile-time we 
don't need cast size to gulong.
(Uff...)

[1] - 
http://buildbot.wireshark.org/trunk/builders/Windows-XP-Win64/builds/116/steps/nmake%20all/logs/stdio
___________________________________________________________________________
Sent via:    Wireshark-dev mailing list <wireshark-dev@wireshark.org>
Archives:    http://www.wireshark.org/lists/wireshark-dev
Unsubscribe: https://wireshark.org/mailman/options/wireshark-dev
             mailto:wireshark-dev-requ...@wireshark.org?subject=unsubscribe

Reply via email to