git.droids-corp.org
/
dpdk.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
31354c7
)
test/ring: fix integer cast to pointer
author
Honnappa Nagarahalli
<honnappa.nagarahalli@arm.com>
Sun, 25 Oct 2020 05:45:56 +0000
(
00:45
-0500)
committer
David Marchand
<david.marchand@redhat.com>
Thu, 29 Oct 2020 13:13:31 +0000
(14:13 +0100)
Use uintptr_t instead of unsigned long while initializing the
array of pointers.
Signed-off-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
app/test/test_ring.c
patch
|
blob
|
history
diff --git
a/app/test/test_ring.c
b/app/test/test_ring.c
index
2913e41
..
80de210
100644
(file)
--- a/
app/test/test_ring.c
+++ b/
app/test/test_ring.c
@@
-262,7
+262,7
@@
test_ring_mem_init(void *obj, unsigned int count, int esize)
/* Legacy queue APIs? */
if (esize == -1)
for (i = 0; i < count; i++)
- ((void **)obj)[i] = (void *)(u
nsigned long
)i;
+ ((void **)obj)[i] = (void *)(u
intptr_t
)i;
else
for (i = 0; i < (count * esize / sizeof(uint32_t)); i++)
((uint32_t *)obj)[i] = i;