[Bug 1107] New: printf format warnings on 32-bit build (git 20161230) (patch)

bugzilla-daemon at netfilter.org bugzilla-daemon at netfilter.org
Sat Dec 31 00:44:05 CET 2016


https://bugzilla.netfilter.org/show_bug.cgi?id=1107

            Bug ID: 1107
           Summary: printf format warnings on 32-bit build (git 20161230)
                    (patch)
           Product: iptables
           Version: CVS (please indicate timestamp)
          Hardware: i386
                OS: All
            Status: NEW
          Severity: normal
          Priority: P5
         Component: iptables
          Assignee: netfilter-buglog at lists.netfilter.org
          Reporter: duncan_roe at acslink.net.au

Created attachment 488
  --> https://bugzilla.netfilter.org/attachment.cgi?id=488&action=edit
Fixes warnings as per bug description

This is the well-known %lu with uint64_t again. It does actually result in bad
output: little-endian systems will show value mod 4G and big-endian will show
value / 4G.
The source already addresses this in 2 ways:
1. use %llu and cast to long long unsigned int
2. Use macro PRIu64 from <inttypes.h>
I offer a patch using method 2: using the macro still gets a warning if the
base type is inappropriate but with a cast there can be no warning

-- 
You are receiving this mail because:
You are watching all bug changes.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.netfilter.org/pipermail/netfilter-buglog/attachments/20161230/4414ded3/attachment.html>


More information about the netfilter-buglog mailing list