From patchwork Tue Apr 17 13:13:42 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "De Lara Guarch, Pablo" X-Patchwork-Id: 38310 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id B2FB38E01; Tue, 17 Apr 2018 15:13:30 +0200 (CEST) Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by dpdk.org (Postfix) with ESMTP id 5A7D47F3C for ; Tue, 17 Apr 2018 15:13:29 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by fmsmga107.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 17 Apr 2018 06:13:28 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.48,463,1517904000"; d="scan'208";a="33250633" Received: from silpixa00399464.ir.intel.com (HELO silpixa00399464.ger.corp.intel.com) ([10.237.222.157]) by fmsmga008.fm.intel.com with ESMTP; 17 Apr 2018 06:13:27 -0700 From: Pablo de Lara To: jerin.jacob@caviumnetworks.com, erik.g.carrillo@intel.com Cc: dev@dpdk.org, Pablo de Lara Date: Tue, 17 Apr 2018 14:13:42 +0100 Message-Id: <20180417131342.32027-1-pablo.de.lara.guarch@intel.com> X-Mailer: git-send-email 2.14.3 Subject: [dpdk-dev] [PATCH] eventdev: fix icc build 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" ICC complains about variable being used before its value is set. Since the variable is only assigned in the for loop, its declaration is moved inside and is initialized. lib/librte_eventdev/rte_event_timer_adapter.c(708): error #592: variable "ret" is used before its value is set RTE_SET_USED(ret); Fixes: 6750b21bd6af ("eventdev: add default software timer adapter") Signed-off-by: Pablo de Lara Acked-by: Ferruh Yigit Acked-by: Erik Gabriel Carrillo --- lib/librte_eventdev/rte_event_timer_adapter.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/lib/librte_eventdev/rte_event_timer_adapter.c b/lib/librte_eventdev/rte_event_timer_adapter.c index 6eba6b44d..9a863f5cb 100644 --- a/lib/librte_eventdev/rte_event_timer_adapter.c +++ b/lib/librte_eventdev/rte_event_timer_adapter.c @@ -695,7 +695,7 @@ check_destination_event_queue(struct rte_event_timer *evtim, static int sw_event_timer_adapter_service_func(void *arg) { - int ret, i, num_msgs; + int i, num_msgs; uint64_t cycles, opaque; uint16_t nb_evs_flushed = 0; uint16_t nb_evs_invalid = 0; @@ -705,8 +705,6 @@ sw_event_timer_adapter_service_func(void *arg) struct rte_timer *tim = NULL; struct msg *msg, *msgs[NB_OBJS]; - RTE_SET_USED(ret); - adapter = arg; sw_data = adapter->data->adapter_priv; @@ -720,6 +718,10 @@ sw_event_timer_adapter_service_func(void *arg) (void **)msgs, NB_OBJS, NULL); for (i = 0; i < num_msgs; i++) { + int ret = 0; + + RTE_SET_USED(ret); + msg = msgs[i]; evtim = msg->evtim;