eal: fix type of pointer arithmetic result
authorThomas Monjalon <thomas.monjalon@6wind.com>
Fri, 12 Jul 2013 10:54:35 +0000 (12:54 +0200)
committerDavid Marchand <david.marchand@6wind.com>
Wed, 26 Feb 2014 10:01:13 +0000 (11:01 +0100)
commit894f5cc4411e1d853f80af4db6c74c1ec413f992
treed81725737be44ff2dbee86a004a8d58cc1a4a285
parentf9a08f650211977b48d8e982697a4c789e5b2ab3
eal: fix type of pointer arithmetic result

Adding or subtracting a value to a pointer makes a new pointer
of unknown type.
So typeof() is replaced by (void*) in RTE_PTR_ADD() and RTE_PTR_SUB().

But RTE_PTR_ALIGN_* macros have in their explicit API to return a pointer
of the same type. Since RTE_PTR_ALIGN_CEIL is based on RTE_PTR_ADD, a
typeof() is added to keep the original behaviour.

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
app/test/test_common.c
lib/librte_eal/common/include/rte_common.h