From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id AA8D2A04B5; Sun, 25 Oct 2020 06:48:56 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 7AB562B84; Sun, 25 Oct 2020 06:46:25 +0100 (CET) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by dpdk.org (Postfix) with ESMTP id D72CE2B8C for ; Sun, 25 Oct 2020 06:46:12 +0100 (CET) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id A582F143B; Sat, 24 Oct 2020 22:46:12 -0700 (PDT) Received: from qc2400f-1.austin.arm.com (qc2400f-1.austin.arm.com [10.118.12.27]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 9DDDF3F66B; Sat, 24 Oct 2020 22:46:12 -0700 (PDT) From: Honnappa Nagarahalli To: dev@dpdk.org, honnappa.nagarahalli@arm.com, konstantin.ananyev@intel.com, stephen@networkplumber.org Cc: dharmik.thakkar@arm.com, ruifeng.wang@arm.com, olivier.matz@6wind.com, david.marchand@redhat.com, nd@arm.com Date: Sun, 25 Oct 2020 00:45:56 -0500 Message-Id: <20201025054556.14277-9-honnappa.nagarahalli@arm.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20201025054556.14277-1-honnappa.nagarahalli@arm.com> References: <20200224203931.21256-1-honnappa.nagarahalli@arm.com> <20201025054556.14277-1-honnappa.nagarahalli@arm.com> Subject: [dpdk-dev] [PATCH v5 8/8] test/ring: user uintptr_t instead of unsigned long X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Use uintptr_t instead of unsigned long while initializing the array of pointers. Signed-off-by: Honnappa Nagarahalli --- 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 3914cb98a..5b7fdfa45 100644 --- a/app/test/test_ring.c +++ b/app/test/test_ring.c @@ -447,7 +447,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.17.1