dev.dpdk.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] librte_eal/common: Fix cast from pointer to integer of different size
@ 2015-03-02  7:27 Michael Qiu
       [not found] ` <1425281223-14043-1-git-send-email-michael.qiu-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
  0 siblings, 1 reply; 15+ messages in thread
From: Michael Qiu @ 2015-03-02  7:27 UTC (permalink / raw)
  To: dev-VfR2kkLFssw

/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 <michael.qiu-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
---
 lib/librte_eal/common/include/arch/x86/rte_memcpy.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/librte_eal/common/include/arch/x86/rte_memcpy.h b/lib/librte_eal/common/include/arch/x86/rte_memcpy.h
index 7b2d382..6565c00 100644
--- a/lib/librte_eal/common/include/arch/x86/rte_memcpy.h
+++ b/lib/librte_eal/common/include/arch/x86/rte_memcpy.h
@@ -589,12 +589,12 @@ COPY_BLOCK_64_BACK15:
 	 * unaligned copy functions require up to 15 bytes
 	 * backwards access.
 	 */
-	dstofss = 16 - (int)((long long)(void *)dst & 0x0F) + 16;
+	dstofss = 16 - (int)((long)(void *)dst & 0x0F) + 16;
 	n -= dstofss;
 	rte_mov32((uint8_t *)dst, (const uint8_t *)src);
 	src = (const uint8_t *)src + dstofss;
 	dst = (uint8_t *)dst + dstofss;
-	srcofs = (int)((long long)(const void *)src & 0x0F);
+	srcofs = (int)((long)(const void *)src & 0x0F);
 
 	/**
 	 * For aligned copy
-- 
1.9.3

^ permalink raw reply related	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2015-03-09 11:43 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-03-02  7:27 [PATCH] librte_eal/common: Fix cast from pointer to integer of different size Michael Qiu
     [not found] ` <1425281223-14043-1-git-send-email-michael.qiu-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2015-03-02 11:39   ` Gonzalez Monroy, Sergio
2015-03-03  2:02     ` Qiu, Michael
2015-03-03  2:20   ` [PATCH v2] " Michael Qiu
     [not found]     ` <1425349251-15663-1-git-send-email-michael.qiu-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2015-03-03  8:25       ` Pawel Wodkowski
2015-03-03  9:59         ` Qiu, Michael
     [not found]           ` <533710CFB86FA344BFBF2D6802E60286CED932-0J0gbvR4kThpB2pF5aRoyrfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2015-03-03 13:37             ` Pawel Wodkowski
2015-03-04  1:58               ` Qiu, Michael
     [not found]                 ` <533710CFB86FA344BFBF2D6802E60286CEDC0D-0J0gbvR4kThpB2pF5aRoyrfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2015-03-04  8:18                   ` Pawel Wodkowski
2015-03-04 11:24                     ` Qiu, Michael
2015-03-05  7:46   ` [PATCH v3] " Michael Qiu
     [not found]     ` <1425541598-8669-1-git-send-email-michael.qiu-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2015-03-05  8:25       ` Tang, HaifengX
2015-03-06  3:13       ` [PATCH] " Michael Qiu
     [not found]         ` <1425611587-769-1-git-send-email-michael.qiu-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2015-03-09  5:38           ` Wang, Zhihong
     [not found]             ` <F60F360A2500CD45ACDB1D700268892D0E792B73-0J0gbvR4kThpB2pF5aRoyrfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2015-03-09 11:43               ` Thomas Monjalon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).