]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUILD: htx: fix fprintf format inconsistency on 32-bit platforms
authorWilly Tarreau <w@1wt.eu>
Mon, 26 Nov 2018 18:35:30 +0000 (19:35 +0100)
committerWilly Tarreau <w@1wt.eu>
Mon, 26 Nov 2018 18:37:32 +0000 (19:37 +0100)
commit6689609090aa7f9ce7b7e84b4f9625db77467ae2
tree1f536b6bb8dac0cb3308f1ff88233226f3d2f7d7
parent7c756a8ccc4e64fcb46d72a3cfc38dcf1ddbbc54
BUILD: htx: fix fprintf format inconsistency on 32-bit platforms

Building on 32 bits gives this :

  include/proto/htx.h: In function 'htx_dump':
  include/proto/htx.h:443:25: warning: format '%lu' expects argument of type 'long unsigned int', but argument 8 has type 'uint64_t {aka long long unsigned int}' [-Wformat=]
         fprintf(stderr, "htx:%p [ size=%u - data=%u - used=%u - wrap=%s - extra=%lu]\n",
                         ^
In htx_dump(), fprintf() uses %lu but the value is an uint64_t so it
doesn't match on 32-bit. Let's cast this to unsigned long long and use
%llu instead.
include/proto/htx.h