From: Ferruh Yigit Date: Fri, 22 Jul 2016 14:13:36 +0000 (+0100) Subject: examples/l2fwd-ivshmem: fix build with icc X-Git-Tag: spdx-start~6096 X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=aedbf1e308a0147662363346e0809fc14ab3d8f2;p=dpdk.git examples/l2fwd-ivshmem: fix build with icc icc version 16.0.2, compile error: 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 Acked-by: Anatoly Burakov --- diff --git a/examples/l2fwd-ivshmem/host/host.c b/examples/l2fwd-ivshmem/host/host.c index cd284b7d3a..da7b00d9fc 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;