summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Qiu <michael.qiu@intel.com>2014-12-10 18:46:42 +0800
committerThomas Monjalon <thomas.monjalon@6wind.com>2014-12-11 01:42:02 +0100
commit42c035e7bbfe95f26ee4ddf2559b94f574974a86 (patch)
treec300ea752a31a479c93414a77c1c441d7e9e243f
parent3736db4f9581d64acafd33c5a6533c00104aae0e (diff)
downloaddpdk-42c035e7bbfe95f26ee4ddf2559b94f574974a86.zip
dpdk-42c035e7bbfe95f26ee4ddf2559b94f574974a86.tar.gz
dpdk-42c035e7bbfe95f26ee4ddf2559b94f574974a86.tar.xz
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 <michael.qiu@intel.com> Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
-rw-r--r--lib/librte_eal/linuxapp/eal/eal.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/librte_eal/linuxapp/eal/eal.c b/lib/librte_eal/linuxapp/eal/eal.c
index 89f3b5e..2fb1acc 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;
}