test/ring: fix integer cast to pointer

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>
This commit is contained in:
Honnappa Nagarahalli 2020-10-25 00:45:56 -05:00 committed by David Marchand
parent 31354c762c
commit 6c3416659f

View File

@ -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 *)(unsigned long)i;
((void **)obj)[i] = (void *)(uintptr_t)i;
else
for (i = 0; i < (count * esize / sizeof(uint32_t)); i++)
((uint32_t *)obj)[i] = i;