From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.warmcat.com (mail.warmcat.com [163.172.24.82]) by dpdk.org (Postfix) with ESMTP id 5CE3C1C08A for ; Fri, 11 May 2018 03:59:23 +0200 (CEST) From: Andy Green To: dev@dpdk.org Date: Fri, 11 May 2018 09:59:19 +0800 Message-ID: <152600395962.54839.7515267724716237345.stgit@localhost.localdomain> In-Reply-To: <152600382101.54839.18392182958431211001.stgit@localhost.localdomain> References: <152600382101.54839.18392182958431211001.stgit@localhost.localdomain> User-Agent: StGit/unknown-version Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Subject: [dpdk-dev] [PATCH v2 05/24] lib/librte_eal: explicit cast for signed change 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: , X-List-Received-Date: Fri, 11 May 2018 01:59:23 -0000 /projects/lagopus/src/dpdk/build/include/rte_lcore.h: In function 'rte_lcore_index': /projects/lagopus/src/dpdk/build/include/rte_lcore.h:122:14: warning: conversion to 'int' from 'unsigned int' may change the sign of the result [-Wsign-conversion] lcore_id = rte_lcore_id(); Signed-off-by: Andy Green --- lib/librte_eal/common/include/rte_lcore.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/librte_eal/common/include/rte_lcore.h b/lib/librte_eal/common/include/rte_lcore.h index 1a2f37eaa..6e09d9181 100644 --- a/lib/librte_eal/common/include/rte_lcore.h +++ b/lib/librte_eal/common/include/rte_lcore.h @@ -119,7 +119,7 @@ rte_lcore_index(int lcore_id) if (lcore_id >= RTE_MAX_LCORE) return -1; if (lcore_id < 0) - lcore_id = rte_lcore_id(); + lcore_id = (int)rte_lcore_id(); return lcore_config[lcore_id].core_index; }