]> git.proxmox.com Git - mirror_iproute2.git/commit
devlink: fix format string warning for 32bit targets
authorBaruch Siach <baruch@tkos.co.il>
Thu, 27 Jun 2019 18:37:18 +0000 (21:37 +0300)
committerStephen Hemminger <stephen@networkplumber.org>
Fri, 28 Jun 2019 22:20:00 +0000 (15:20 -0700)
commitee09370a7206ad361653e437ca6429533a1c02a9
treef90adb6afeadfa2478f0b5dfbf6c5ad887b17a6b
parent68c46872ce4394376c8b5e804be4f5a2bbd43828
devlink: fix format string warning for 32bit targets

32bit targets define uint64_t as long long unsigned. This leads to the
following build warning:

devlink.c: In function ‘pr_out_u64’:
devlink.c:1729:11: warning: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 4 has type ‘uint64_t {aka long long unsigned int}’ [-Wformat=]
    pr_out("%s %lu", name, val);
           ^
devlink.c:59:21: note: in definition of macro ‘pr_out’
   fprintf(stdout, ##args);   \
                     ^~~~

Use uint64_t specific conversion specifiers in the format string to fix
that.

Cc: Aya Levin <ayal@mellanox.com>
Cc: Moshe Shemesh <moshe@mellanox.com>
Signed-off-by: Baruch Siach <baruch@tkos.co.il>
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
devlink/devlink.c