From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id BFF602142 for ; Wed, 6 Apr 2016 14:20:57 +0200 (CEST) Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga101.jf.intel.com with ESMTP; 06 Apr 2016 05:17:32 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.24,447,1455004800"; d="scan'208";a="926630932" Received: from irvmail001.ir.intel.com ([163.33.26.43]) by orsmga001.jf.intel.com with ESMTP; 06 Apr 2016 05:17:29 -0700 Received: from sivswdev02.ir.intel.com (sivswdev02.ir.intel.com [10.237.217.46]) by irvmail001.ir.intel.com (8.14.3/8.13.6/MailSET/Hub) with ESMTP id u36CHSP7030532; Wed, 6 Apr 2016 13:17:28 +0100 Received: from sivswdev02.ir.intel.com (localhost [127.0.0.1]) by sivswdev02.ir.intel.com with ESMTP id u36CHSNM007630; Wed, 6 Apr 2016 13:17:28 +0100 Received: (from fyigit@localhost) by sivswdev02.ir.intel.com with id u36CHSYj007626; Wed, 6 Apr 2016 13:17:28 +0100 From: Ferruh Yigit To: dev@dpdk.org Cc: Jan Medala , Jakub Palider , Netanel Belgazal , Evgeny Schemeilin , Ferruh Yigit Date: Wed, 6 Apr 2016 13:17:26 +0100 Message-Id: <1459945046-7595-1-git-send-email-ferruh.yigit@intel.com> X-Mailer: git-send-email 1.7.4.1 Subject: [dpdk-dev] [PATCH] ena: icc fix compilation warning #3656 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Apr 2016 12:20:58 -0000 With (ICC) 16.0.2 20160204, getting following warnings: .../drivers/net/ena/base/ena_com.c(492): error #3656: variable "flags" may be used before its value is set ENA_SPINLOCK_LOCK(admin_queue->q_lock, flags); .../drivers/net/ena/base/ena_com.c(1971): error #3656: variable "mem_handle" may be used before its value is set ENA_MEM_ALLOC_COHERENT(ena_dev->dmadev, len, For both warnings the variable value is ignored, so there is no defect. To comfort compiler warning, a initial value provided to variables. Signed-off-by: Ferruh Yigit --- drivers/net/ena/base/ena_com.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/ena/base/ena_com.c b/drivers/net/ena/base/ena_com.c index f886760..a21a951 100644 --- a/drivers/net/ena/base/ena_com.c +++ b/drivers/net/ena/base/ena_com.c @@ -478,7 +478,7 @@ ena_com_wait_and_process_admin_cq_polling( struct ena_comp_ctx *comp_ctx, struct ena_com_admin_queue *admin_queue) { - unsigned long flags; + unsigned long flags = 0; u64 start_time; int ret; @@ -1964,7 +1964,7 @@ int ena_com_get_dev_extended_stats(struct ena_com_dev *ena_dev, char *buff, int ret = 0; struct ena_admin_aq_get_stats_cmd get_cmd; struct ena_admin_acq_get_stats_resp get_resp; - ena_mem_handle_t mem_handle; + ena_mem_handle_t mem_handle = 0; void *virt_addr; dma_addr_t phys_addr; -- 2.5.5