From patchwork Thu Jan 25 07:03:50 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Yang, Zhiyong" X-Patchwork-Id: 34435 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 2411EA84E; Thu, 25 Jan 2018 08:03:57 +0100 (CET) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id 7B19EA84C for ; Thu, 25 Jan 2018 08:03:55 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 24 Jan 2018 23:03:54 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.46,409,1511856000"; d="scan'208";a="22173204" Received: from unknown (HELO dpdk5.bj.intel.com) ([172.16.182.198]) by orsmga003.jf.intel.com with ESMTP; 24 Jan 2018 23:03:52 -0800 From: Zhiyong Yang To: dev@dpdk.org Cc: liang.j.ma@intel.com, peter.mccarthy@intel.com, ferruh.yigit@intel.com, Zhiyong Yang Date: Thu, 25 Jan 2018 15:03:50 +0800 Message-Id: <20180125070350.14735-1-zhiyong.yang@intel.com> X-Mailer: git-send-email 2.13.3 Subject: [dpdk-dev] [PATCH] event/opdl: fix ICC fails at compile time 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 reports the issue at compile time as follows. error #592: variable "i" is used before its value is set RTE_SET_USED(i); The patch is to fix it. GCC and CLANG has been tested as well. Fixes: d548ef513cd7 ("event/opdl: add unit tests") Cc: liang.j.ma@intel.com Cc: peter.mccarthy@intel.com Cc: ferruh.yigit@intel.com Signed-off-by: Zhiyong Yang Acked-by: Liang Ma --- drivers/event/opdl/opdl_test.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/event/opdl/opdl_test.c b/drivers/event/opdl/opdl_test.c index 13d4f6b45..39c6cf8cf 100644 --- a/drivers/event/opdl/opdl_test.c +++ b/drivers/event/opdl/opdl_test.c @@ -562,7 +562,6 @@ single_link_w_stats(struct test *t) uint32_t deq_pkts; struct rte_mbuf *mbufs[3]; RTE_SET_USED(mbufs); - RTE_SET_USED(i); /* Create instance with 3 ports */ if (init(t, 2, tx_port + 1) < 0 || @@ -702,10 +701,8 @@ single_link(struct test *t) /* const uint8_t w3_port = 3; */ const uint8_t tx_port = 2; int err; - int i; struct rte_mbuf *mbufs[3]; RTE_SET_USED(mbufs); - RTE_SET_USED(i); /* Create instance with 5 ports */ if (init(t, 2, tx_port+1) < 0 ||