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 55C9DA0C41; Fri, 29 Oct 2021 19:17:35 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 328AE40688; Fri, 29 Oct 2021 19:17:35 +0200 (CEST) Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by mails.dpdk.org (Postfix) with ESMTP id 0226940395 for ; Fri, 29 Oct 2021 19:17:33 +0200 (CEST) X-IronPort-AV: E=McAfee;i="6200,9189,10152"; a="294171188" X-IronPort-AV: E=Sophos;i="5.87,193,1631602800"; d="scan'208";a="294171188" Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Oct 2021 10:17:33 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.87,193,1631602800"; d="scan'208";a="598276990" Received: from jrharri1-clx.ch.intel.com ([143.182.136.99]) by orsmga004.jf.intel.com with ESMTP; 29 Oct 2021 10:17:32 -0700 From: Jim Harris To: dev@dpdk.org, david.hunt@intel.com Cc: Jim Harris Date: Fri, 29 Oct 2021 17:15:50 +0000 Message-Id: <20211029171550.330229-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] power: 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 tot_ppi variable in update_stats is set but not used, since the final accumulated tot_ppi results isn't used anywhere. So just remove the tot_ppi variable. Signed-off-by: Jim Harris --- lib/power/rte_power_empty_poll.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/power/rte_power_empty_poll.c b/lib/power/rte_power_empty_poll.c index 975aa92997..8a2d60c576 100644 --- a/lib/power/rte_power_empty_poll.c +++ b/lib/power/rte_power_empty_poll.c @@ -207,7 +207,7 @@ update_training_stats(struct priority_worker *poll_stats, static __rte_always_inline uint32_t update_stats(struct priority_worker *poll_stats) { - uint64_t tot_edpi = 0, tot_ppi = 0; + uint64_t tot_edpi = 0; uint32_t j, percent; struct priority_worker *s = poll_stats; @@ -237,7 +237,6 @@ update_stats(struct priority_worker *poll_stats) for (j = 0; j < BINS_AV; j++) { tot_edpi += s->edpi_av[j]; - tot_ppi += s->ppi_av[j]; } tot_edpi = tot_edpi / BINS_AV; -- 2.32.0