Skip to contentSkip to conversation

pkt_sched: Annotate uninitialized var in sfq_enqueue()

PATCH Applied Jarek Poplawski 2 participants 2 messages Dec 19, 2008 – Dec 22, 2008

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 pkt_sched: Annotate uninitialized var in sfq_enqueue()

Some gcc versions warn that ret may be used uninitialized in sfq_enqueue(). It's a false positive, so let's annotate this.

---

 net/sched/sch_sfq.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
net/sched/sch_sfq.c +1 -1
index ab8cfee..f3965df 100644
@@ -281,7 +281,7 @@ sfq_enqueue(struct sk_buff *skb, struct Qdisc *sch)
 	struct sfq_sched_data *q = qdisc_priv(sch);
 	unsigned int hash;
 	sfq_index x;
-	int ret;
+	int uninitialized_var(ret);
 
 	hash = sfq_classify(skb, sch, &ret);
 	if (hash == 0) {