DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] examples/l2fwd-ivshmem: fix icc compile error
@ 2016-07-22 14:13 Ferruh Yigit
  2016-07-22 14:51 ` Burakov, Anatoly
  0 siblings, 1 reply; 3+ messages in thread
From: Ferruh Yigit @ 2016-07-22 14:13 UTC (permalink / raw)
  To: dev; +Cc: Anatoly Burakov

icc version 16.0.2, compile error:

== host
  CC host.o
/root/development/dpdk/examples/l2fwd-ivshmem/host/host.c(157):
error #3656: variable "total_vm_packets_dropped"
             may be used before its value is set
        total_vm_packets_dropped += ctrl->vm_ports[portid].stats.dropped;
        ^

Fixes: 6aa497249172 ("examples/l2fwd-ivshmem: import sample application")

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
 examples/l2fwd-ivshmem/host/host.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/examples/l2fwd-ivshmem/host/host.c b/examples/l2fwd-ivshmem/host/host.c
index cd284b7..da7b00d 100644
--- a/examples/l2fwd-ivshmem/host/host.c
+++ b/examples/l2fwd-ivshmem/host/host.c
@@ -110,7 +110,8 @@ static void
 print_stats(void)
 {
 	uint64_t total_packets_dropped, total_packets_tx, total_packets_rx;
-	uint64_t total_vm_packets_dropped, total_vm_packets_tx, total_vm_packets_rx;
+	uint64_t total_vm_packets_dropped = 0;
+	uint64_t total_vm_packets_tx, total_vm_packets_rx;
 	unsigned portid;
 
 	total_packets_dropped = 0;
-- 
2.7.4

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [dpdk-dev] [PATCH] examples/l2fwd-ivshmem: fix icc compile error
  2016-07-22 14:13 [dpdk-dev] [PATCH] examples/l2fwd-ivshmem: fix icc compile error Ferruh Yigit
@ 2016-07-22 14:51 ` Burakov, Anatoly
  2016-07-22 16:00   ` Thomas Monjalon
  0 siblings, 1 reply; 3+ messages in thread
From: Burakov, Anatoly @ 2016-07-22 14:51 UTC (permalink / raw)
  To: Yigit, Ferruh, dev

> -----Original Message-----
> From: Yigit, Ferruh
> Sent: Friday, July 22, 2016 3:14 PM
> To: dev@dpdk.org
> Cc: Burakov, Anatoly <anatoly.burakov@intel.com>
> Subject: [PATCH] examples/l2fwd-ivshmem: fix icc compile error
> 
> icc version 16.0.2, compile error:
> 
> == host
>   CC host.o
> /root/development/dpdk/examples/l2fwd-ivshmem/host/host.c(157):
> error #3656: variable "total_vm_packets_dropped"
>              may be used before its value is set
>         total_vm_packets_dropped += ctrl->vm_ports[portid].stats.dropped;
>         ^
> 
> Fixes: 6aa497249172 ("examples/l2fwd-ivshmem: import sample
> application")
> 
> Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
> ---
>  examples/l2fwd-ivshmem/host/host.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/examples/l2fwd-ivshmem/host/host.c b/examples/l2fwd-
> ivshmem/host/host.c
> index cd284b7..da7b00d 100644
> --- a/examples/l2fwd-ivshmem/host/host.c
> +++ b/examples/l2fwd-ivshmem/host/host.c
> @@ -110,7 +110,8 @@ static void
>  print_stats(void)
>  {
>  	uint64_t total_packets_dropped, total_packets_tx, total_packets_rx;
> -	uint64_t total_vm_packets_dropped, total_vm_packets_tx,
> total_vm_packets_rx;
> +	uint64_t total_vm_packets_dropped = 0;
> +	uint64_t total_vm_packets_tx, total_vm_packets_rx;
>  	unsigned portid;
> 
>  	total_packets_dropped = 0;
> --
> 2.7.4

Acked-by: Anatoly  Burakov <anatoly.burakov@intel.com>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [dpdk-dev] [PATCH] examples/l2fwd-ivshmem: fix icc compile error
  2016-07-22 14:51 ` Burakov, Anatoly
@ 2016-07-22 16:00   ` Thomas Monjalon
  0 siblings, 0 replies; 3+ messages in thread
From: Thomas Monjalon @ 2016-07-22 16:00 UTC (permalink / raw)
  To: Yigit, Ferruh; +Cc: dev, Burakov, Anatoly

> > icc version 16.0.2, compile error:
> > 
> > == host
> >   CC host.o
> > /root/development/dpdk/examples/l2fwd-ivshmem/host/host.c(157):
> > error #3656: variable "total_vm_packets_dropped"
> >              may be used before its value is set
> >         total_vm_packets_dropped += ctrl->vm_ports[portid].stats.dropped;
> >         ^
> > 
> > Fixes: 6aa497249172 ("examples/l2fwd-ivshmem: import sample
> > application")
> > 
> > Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
> 
> Acked-by: Anatoly  Burakov <anatoly.burakov@intel.com>

Applied, thanks

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-07-22 16:00 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-07-22 14:13 [dpdk-dev] [PATCH] examples/l2fwd-ivshmem: fix icc compile error Ferruh Yigit
2016-07-22 14:51 ` Burakov, Anatoly
2016-07-22 16:00   ` 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).