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 686DE1CC71 for ; Sat, 12 May 2018 03:59:11 +0200 (CEST) From: Andy Green To: dev@dpdk.org Date: Sat, 12 May 2018 09:59:07 +0800 Message-ID: <152609034736.121661.8183957126379452765.stgit@localhost.localdomain> In-Reply-To: <152609021699.121661.5295227351721865436.stgit@localhost.localdomain> References: <152609021699.121661.5295227351721865436.stgit@localhost.localdomain> User-Agent: StGit/unknown-version Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Subject: [dpdk-dev] [PATCH v3 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: Sat, 12 May 2018 01:59:11 -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; }