From: Stephen Hemminger Date: Thu, 15 Feb 2018 22:25:50 +0000 (-0800) Subject: mem: use z specifier to format size_t X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=2f35377892b0c34a8ece03ce44342d491277ec84;p=dpdk.git mem: use z specifier to format size_t The recommended way to format size_t in printf is to use the z modifier which handles the case where size_t maybe 32 or 64 bits. Signed-off-by: Stephen Hemminger --- diff --git a/lib/librte_eal/linuxapp/eal/eal_memory.c b/lib/librte_eal/linuxapp/eal/eal_memory.c index 38853b753a..86df674802 100644 --- a/lib/librte_eal/linuxapp/eal/eal_memory.c +++ b/lib/librte_eal/linuxapp/eal/eal_memory.c @@ -1390,16 +1390,16 @@ rte_eal_hugepage_attach(void) max_seg = s; if (base_addr != MAP_FAILED) { /* errno is stale, don't use */ - RTE_LOG(ERR, EAL, "Could not mmap %llu bytes " + RTE_LOG(ERR, EAL, "Could not mmap %zu bytes " "in /dev/zero at [%p], got [%p] - " "please use '--base-virtaddr' option\n", - (unsigned long long)mcfg->memseg[s].len, + mcfg->memseg[s].len, mcfg->memseg[s].addr, base_addr); munmap(base_addr, mcfg->memseg[s].len); } else { - RTE_LOG(ERR, EAL, "Could not mmap %llu bytes " + RTE_LOG(ERR, EAL, "Could not mmap %zu bytes " "in /dev/zero at [%p]: '%s'\n", - (unsigned long long)mcfg->memseg[s].len, + mcfg->memseg[s].len, mcfg->memseg[s].addr, strerror(errno)); } if (aslr_enabled() > 0) {