From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id B53D8A0C41; Fri, 29 Oct 2021 19:16:54 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 48A9040688; Fri, 29 Oct 2021 19:16:54 +0200 (CEST) Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by mails.dpdk.org (Postfix) with ESMTP id 2B88240395 for ; Fri, 29 Oct 2021 19:16:51 +0200 (CEST) X-IronPort-AV: E=McAfee;i="6200,9189,10152"; a="228166591" X-IronPort-AV: E=Sophos;i="5.87,193,1631602800"; d="scan'208";a="228166591" Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Oct 2021 10:16:50 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.87,193,1631602800"; d="scan'208";a="726239006" Received: from jrharri1-clx.ch.intel.com ([143.182.136.99]) by fmsmga005.fm.intel.com with ESMTP; 29 Oct 2021 10:16:44 -0700 From: Jim Harris To: dev@dpdk.org Cc: Jim Harris Date: Fri, 29 Oct 2021 17:14:10 +0000 Message-Id: <20211029171410.330128-1-james.r.harris@intel.com> X-Mailer: git-send-email 2.32.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH] eal: fix unused-but-set-variable error X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 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" clang-13 rightfully complains that the total_mem variable in eal_parse_socket_arg is set but not used, since the final accumulated total_mem result isn't used anywhere. So just remove the total_mem variable. Signed-off-by: Jim Harris --- lib/eal/linux/eal.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/lib/eal/linux/eal.c b/lib/eal/linux/eal.c index 81fdebc6a0..60b4924838 100644 --- a/lib/eal/linux/eal.c +++ b/lib/eal/linux/eal.c @@ -562,7 +562,6 @@ eal_parse_socket_arg(char *strval, volatile uint64_t *socket_arg) char * arg[RTE_MAX_NUMA_NODES]; char *end; int arg_num, i, len; - uint64_t total_mem = 0; len = strnlen(strval, SOCKET_MEM_STRLEN); if (len == SOCKET_MEM_STRLEN) { @@ -594,7 +593,6 @@ eal_parse_socket_arg(char *strval, volatile uint64_t *socket_arg) (arg[i][0] == '\0') || (end == NULL) || (*end != '\0')) return -1; val <<= 20; - total_mem += val; socket_arg[i] = val; } -- 2.32.0