From: Michael Qiu Date: Wed, 10 Dec 2014 10:46:42 +0000 (+0800) Subject: eal: fix build with icc X-Git-Tag: spdx-start~9962 X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=42c035e7bbfe95f26ee4ddf2559b94f574974a86;p=dpdk.git eal: fix build with icc lib/librte_eal/linuxapp/eal/eal.c(461): error #2259: non-pointer conversion from "long long" to "void *" may lose significant bits RTE_PTR_ALIGN_CEIL((uintptr_t)addr, RTE_PGSIZE_16M); The root cause is that "RTE_PGSIZE_16M" is defined as unsigned long long. But in i686 platform "void *" is 32-bit. It is safe to cast to size_t and make it works in both 32 & 64-bit platform. Signed-off-by: Michael Qiu Acked-by: Thomas Monjalon --- diff --git a/lib/librte_eal/linuxapp/eal/eal.c b/lib/librte_eal/linuxapp/eal/eal.c index 89f3b5eaad..2fb1acc201 100644 --- a/lib/librte_eal/linuxapp/eal/eal.c +++ b/lib/librte_eal/linuxapp/eal/eal.c @@ -458,7 +458,7 @@ eal_parse_base_virtaddr(const char *arg) * it can align to 2MB for x86. So this alignment can also be used * on x86 */ internal_config.base_virtaddr = - RTE_PTR_ALIGN_CEIL((uintptr_t)addr, RTE_PGSIZE_16M); + RTE_PTR_ALIGN_CEIL((uintptr_t)addr, (size_t)RTE_PGSIZE_16M); return 0; }