aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/layerscape/patches-5.4/809-jailhouse-0016-ivshmem-net-Silence-compiler-warning.patch
blob: 9094503049398217e8710e74a6484d1485f53375 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
From efa3ff9e6dfa3ff26c3aef463529047f7285f890 Mon Sep 17 00:00:00 2001
From: Jan Kiszka <jan.kiszka@siemens.com>
Date: Tue, 3 Oct 2017 12:24:59 +0200
Subject: [PATCH] ivshmem-net: Silence compiler warning

At least Linaro's gcc 6.3 does not see the initialization and usage
dependency of fhead and num. Let's silence this false positive.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
(cherry picked from commit 4d067d37d835c35e8f85481b97c51f20b713ae71)
---
 drivers/net/ivshmem-net.c | 1 +
 1 file changed, 1 insertion(+)

--- a/drivers/net/ivshmem-net.c
+++ b/drivers/net/ivshmem-net.c
@@ -356,6 +356,7 @@ static void ivshm_net_tx_clean(struct ne
 	last = tx->last_used_idx;
 
 	fdesc = NULL;
+	fhead = 0;
 	num = 0;
 
 	while (last != used_idx) {