Wireshark-bugs: [Wireshark-bugs] [Bug 5169] Dissection of uncodocumented AFP func FPSpotlightRPC

Date: Thu, 2 Sep 2010 17:01:13 -0700 (PDT)
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5169

--- Comment #6 from Stephen Fisher <steve@xxxxxxxxxxxxxxxxxx> 2010-09-02 18:01:11 MDT ---
The #if 0 block should be left out since it can easily be added back later if
needed.

The code looks fine other than cross-platform compilation issues: As noted in
doc/README.developer, don't use %lu or %lx as long can be 32 or 64-bit
depending on the platform.  Instead, use the GLIB macro G_GUINT_FORMAT in place
of the lu portion, for example:

printf("This is a 64-bit unsigned integer: %" G_GUINT64_FORMAT ", integer);

Note how the macro doesn't include the percent sign, so you can still specify
formatting numbers.  That should also work with the %lx but put the x at the
beginning of the next quote:

printf("This is a 64-bit unsigned integer: %" G_GUINT64_FORMAT "x", integer);

.. although I haven't verified this work.

The final error, which I don't have time to look into right now is:

packet-afp.c:4085: warning: integer constant is too large for 'long' type
packet-afp.c:4086: warning: integer constant is too large for 'long' type

Where lines 4085-4086 are:

(query_data64 & 0xffffffff00000000) >> 32,
((query_data64 & 0xffffffff00000000) >> 32) * 8,

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