Wireshark mailing list archives

Re: Should existing use of 'LL' and 'ULL' when specifying a constant be fixed ?


From: Pascal Quantin <pascal.quantin () gmail com>
Date: Wed, 18 Dec 2013 16:37:39 +0100

2013/12/17 Bill Meier <wmeier () newsguy com>

README.developer says:

 When specifying an integral constant that doesn't fit in 32 bits, don't
 use "LL" at the end of the constant - not all compilers use "LL" for
 that.  Instead, put the constant in a call to the "G_GINT64_CONSTANT()"
 macro, e.g.

    G_GINT64_CONSTANT(11644473600U)

 rather than

    11644473600ULL


I note that in current SVN there are a number of cases where ULL (or LL)
are used.

e.g.: packet-9p.c:#define _9P_GETATTR_MODE         0x00000001ULL

Should these be fixed ? (or is the README outdated ?)

If they should be fixed:

   It appears that G_GUINT64_CONSTANT can be used (since we require
   GLib 2.16 and based upon an EMail from a while back it seems that
   GLib 2.10 & newer define G_GUINT64_CONSTANT).

   So: I would update README.developer and make the
   source changes.

If the README is outdated, I would remove the statement from the README.


Hi Bill,

as I would vote for the use of G_G(U)INT 64_CONSTANT macros everywhere to
be consistent with the existing code.

BR,
Pascal.
___________________________________________________________________________
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-request () wireshark org?subject=unsubscribe

Current thread: