From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Monjalon Subject: Re: [PATCH] librte_eal/common: Fix cast from pointer to integer of different size Date: Mon, 09 Mar 2015 12:43:38 +0100 Message-ID: <3556491.n1SbkH6aXT@xps13> References: <1425541598-8669-1-git-send-email-michael.qiu@intel.com> <1425611587-769-1-git-send-email-michael.qiu@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7Bit Cc: dev-VfR2kkLFssw@public.gmane.org To: "Qiu, Michael" Return-path: In-Reply-To: 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" > > ./i686-native-linuxapp-gcc/include/rte_memcpy.h:592:23: error: > > cast from pointer to integer of different size [-Werror=pointer-to-int-cast] > > > > dstofss = 16 - (int)((long long)(void *)dst & 0x0F) + 16; > > > > Type 'long long' is 64-bit in i686 platform while 'void *' > > is 32-bit. > > > > Signed-off-by: Michael Qiu > > Signed-off-by: Zhihong Wang > > --- > > v4 --> v3: > > fix dstofss/bits to size_t in rte_memcpy() > > v3 --> v2: > > make dstofss and srcofs to be type size_t > > casting type use uintptr_t > > > > v2 --> v1: > > Remove unnecessary casting (void *) > > Acked-by: Wang, Zhihong Applied, thanks