Skip to content

Commit

Permalink
ibacm: Fix format string warning on 32 bit compile
Browse files Browse the repository at this point in the history
Need to use PRIx64 to print uint64_t's

Signed-off-by: Jason Gunthorpe <[email protected]>
  • Loading branch information
jgunthorpe committed May 16, 2019
1 parent 1ac4517 commit 476e483
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion ibacm/src/acm_util.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@

#include <stdio.h>
#include <stdlib.h>
#include <inttypes.h>
#include <net/if_arp.h>
#include <string.h>
#include <unistd.h>
Expand Down Expand Up @@ -207,7 +208,7 @@ static void acm_if_iter(struct nl_object *obj, void *_ctx_and_cb)
if (acm_if_get_pkey(rtnl_link_get_name(link), &pkey))
return;

acm_log(2, "name: %5s label: %9s index: %2d flags: %s addr: %s pkey: 0x%04x guid: 0x%lx\n",
acm_log(2, "name: %5s label: %9s index: %2d flags: %s addr: %s pkey: 0x%04x guid: 0x%" PRIx64 "\n",
rtnl_link_get_name(link), label,
rtnl_addr_get_ifindex(addr),
rtnl_link_flags2str(rtnl_link_get_flags(link), flags_str, sizeof(flags_str)),
Expand Down

0 comments on commit 476e483

Please sign in to comment.