* [dpdk-dev] [PATCH] ena: icc fix compilation warning #3656
@ 2016-04-06 12:17 Ferruh Yigit
2016-04-06 13:48 ` Thomas Monjalon
0 siblings, 1 reply; 2+ messages in thread
From: Ferruh Yigit @ 2016-04-06 12:17 UTC (permalink / raw)
To: dev
Cc: Jan Medala, Jakub Palider, Netanel Belgazal, Evgeny Schemeilin,
Ferruh Yigit
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 <ferruh.yigit@intel.com>
---
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
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [dpdk-dev] [PATCH] ena: icc fix compilation warning #3656
2016-04-06 12:17 [dpdk-dev] [PATCH] ena: icc fix compilation warning #3656 Ferruh Yigit
@ 2016-04-06 13:48 ` Thomas Monjalon
0 siblings, 0 replies; 2+ messages in thread
From: Thomas Monjalon @ 2016-04-06 13:48 UTC (permalink / raw)
To: Ferruh Yigit
Cc: dev, Jan Medala, Jakub Palider, Netanel Belgazal, Evgeny Schemeilin
2016-04-06 13:17, Ferruh Yigit:
> 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 <ferruh.yigit@intel.com>
Applied, thanks
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-04-06 13:50 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-04-06 12:17 [dpdk-dev] [PATCH] ena: icc fix compilation warning #3656 Ferruh Yigit
2016-04-06 13:48 ` Thomas Monjalon
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).