On Mon, Oct 15, 2012 at 06:00:01PM +0200, The git bot wrote:
====== remove compilation error messages (As noted by Alan Buxey)
removes the following at compile time:
dhcp.c: In function ‘fr_dhcp_add_arp_entry’: dhcp.c:1561: warning: format ‘%lu’ expects type ‘long unsigned int’, but argument 2 has type ‘unsigned int’ dhcp.c:1561: warning: format ‘%lu’ expects type ‘long unsigned int’, but argument 3 has type ‘size_t’
Arran Cudbard-Bell@2012-10-15T16:07:57Z Files modified: * src/lib/dhcp.c
Commit diff: https://github.com/FreeRADIUS/freeradius-server/commit/df5ebfae4e20ad523dd4e... ======
Aside: this uses "%u", sizeof(...) for the first argument. Is it guaranteed that sizeof() is int on all platforms? There is an example at http://en.wikipedia.org/wiki/Sizeof which uses "%zu" for sizeof() values. I guess if there's any doubt, "%lu", (long)sizeof(...) should be pretty safe.