From 6c3416659f77ce882a10e86d90cf398b83894102 Mon Sep 17 00:00:00 2001 From: Honnappa Nagarahalli Date: Sun, 25 Oct 2020 00:45:56 -0500 Subject: [PATCH] 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 Acked-by: Konstantin Ananyev --- app/test/test_ring.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/test/test_ring.c b/app/test/test_ring.c index 2913e41476..80de210362 100644 --- 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 *)(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; -- 2.20.1