From mboxrd@z Thu Jan 1 00:00:00 1970 From: Adrien Mazarguil Subject: Re: [PATCH] eal: fix type of pointer arithmetic result Date: Fri, 26 Jul 2013 14:12:44 +0200 Message-ID: <20130726121244.GK7849@6wind.com> References: <1374838440-21429-1-git-send-email-thomas.monjalon@6wind.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: dev-VfR2kkLFssw@public.gmane.org To: Thomas Monjalon Return-path: Content-Disposition: inline In-Reply-To: <1374838440-21429-1-git-send-email-thomas.monjalon-pdR9zngts4EAvxtiuMwx3w@public.gmane.org> List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces-VfR2kkLFssw@public.gmane.org Sender: "dev" On Fri, Jul 26, 2013 at 01:34:00PM +0200, Thomas Monjalon wrote: > 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 > --- > lib/librte_eal/common/include/rte_common.h | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) Acked-by: Adrien Mazarguil -- Adrien Mazarguil 6WIND