Wireshark-bugs: [Wireshark-bugs] [Bug 4539] Add Address mapping table to IEEE 802.15.4 dissector
Date: Tue, 9 Mar 2010 15:03:18 -0800 (PST)
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=4539

--- Comment #3 from Jaap Keuter <jaap.keuter@xxxxxxxxx> 2010-03-10 00:03:16 CET ---
This patch fails:

cc1: warnings being treated as errors
packet-ieee802154.c: In function ‘addr_uat_addr16_tostr_cb’:
packet-ieee802154.c:199: error: format ‘%x’ expects type ‘unsigned int’, but
argument 2 has type ‘long int’
packet-ieee802154.c: In function ‘addr_uat_pan_tostr_cb’:
packet-ieee802154.c:200: error: format ‘%x’ expects type ‘unsigned int’, but
argument 2 has type ‘long int’
packet-ieee802154.c: In function ‘dissect_ieee802154_decrypt’:
packet-ieee802154.c:1863: error: implicit declaration of function ‘fprintf’
packet-ieee802154.c:1863: error: incompatible implicit declaration of built-in
function ‘fprintf’
packet-ieee802154.c:1863: error: ‘stderr’ undeclared (first use in this
function)
packet-ieee802154.c:1863: error: (Each undeclared identifier is reported only
once
packet-ieee802154.c:1863: error: for each function it appears in.)
packet-ieee802154.c: In function ‘proto_register_ieee802154’:
packet-ieee802154.c:2530: error: passing argument 12 of ‘uat_new’ from
incompatible pointer type
../../epan/uat.h:243: note: expected ‘uat_post_update_cb_t’ but argument is of
type ‘struct uat_field_t *’
packet-ieee802154.c:2530: error: too few arguments to function ‘uat_new’
packet-ieee802154.c: In function ‘proto_init_ieee802154’:
packet-ieee802154.c:2626: error: passing argument 2 of ‘g_hash_table_new’ from
incompatible pointer type
/usr/include/glib-2.0/glib/ghash.h:60: note: expected ‘GEqualFunc’ but argument
is of type ‘guint (*)(const void *, const void *)’
make[2]: *** [libdissectors_la-packet-ieee802154.lo] Error 1


Because it doesn't follow the portability guidelines in README.developer:

  Use "%d", "%u", "%x", and "%o" to print those types;
don't use "%ld", "%lu", "%lx", or "%lo", as longs are 64 bits long on
many platforms, but "guint32" is 32 bits long.

Don't use "long" to mean "signed 32-bit integer", and don't use
"unsigned long" to mean "unsigned 32-bit integer"; "long"s are 64 bits
long on many platforms.  Use "gint32" for signed 32-bit integers and use
"guint32" for unsigned 32-bit integers.

Don't use "long" to mean "signed 64-bit integer" and don't use "unsigned
long" to mean "unsigned 64-bit integer"; "long"s are 32 bits long on
many other platforms.  Don't use "long long" or "unsigned long long",
either, as not all platforms support them; use "gint64" or "guint64",
which will be defined as the appropriate types for 64-bit signed and
unsigned integers.

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