summaryrefslogtreecommitdiffstats
path: root/recipes-extended/dpdk/dpdk/0001-examples-Fix-maybe-uninitialized-warning.patch
diff options
context:
space:
mode:
Diffstat (limited to 'recipes-extended/dpdk/dpdk/0001-examples-Fix-maybe-uninitialized-warning.patch')
-rw-r--r--recipes-extended/dpdk/dpdk/0001-examples-Fix-maybe-uninitialized-warning.patch42
1 files changed, 0 insertions, 42 deletions
diff --git a/recipes-extended/dpdk/dpdk/0001-examples-Fix-maybe-uninitialized-warning.patch b/recipes-extended/dpdk/dpdk/0001-examples-Fix-maybe-uninitialized-warning.patch
deleted file mode 100644
index 2facd39..0000000
--- a/recipes-extended/dpdk/dpdk/0001-examples-Fix-maybe-uninitialized-warning.patch
+++ /dev/null
@@ -1,42 +0,0 @@
1From 41ac64efa5050430b73e0f8813dffc7327083273 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Tue, 1 Aug 2017 20:18:46 -0700
4Subject: [PATCH] examples: Fix maybe-uninitialized warning
5
6Initialize arrays to 0, makes compiler happy about
7
8error: 'vals[0]' may be used uninitialized in this function [-Werror=maybe-uninitialized]
9
10Signed-off-by: Khem Raj <raj.khem@gmail.com>
11
12---
13 examples/qos_sched/args.c | 2 +-
14 examples/vhost/virtio_net.c | 2 +-
15 2 files changed, 2 insertions(+), 2 deletions(-)
16
17diff --git a/examples/qos_sched/args.c b/examples/qos_sched/args.c
18index 83eee95cc28e..3d2c0fbd6d0a 100644
19--- a/examples/qos_sched/args.c
20+++ b/examples/qos_sched/args.c
21@@ -212,7 +212,7 @@ static int
22 app_parse_flow_conf(const char *conf_str)
23 {
24 int ret;
25- uint32_t vals[5];
26+ uint32_t vals[5] = {0};
27 struct flow_conf *pconf;
28 uint64_t mask;
29
30diff --git a/examples/vhost/virtio_net.c b/examples/vhost/virtio_net.c
31index f6e00674d9af..a4a90704d7b4 100644
32--- a/examples/vhost/virtio_net.c
33+++ b/examples/vhost/virtio_net.c
34@@ -293,7 +293,7 @@ vs_dequeue_pkts(struct vhost_dev *dev, uint16_t queue_id,
35 {
36 struct vhost_queue *queue;
37 struct rte_vhost_vring *vr;
38- uint32_t desc_indexes[MAX_PKT_BURST];
39+ uint32_t desc_indexes[MAX_PKT_BURST] = {0};
40 uint32_t used_idx;
41 uint32_t i = 0;
42 uint16_t free_entries;