From: David S. Miller Date: Thu, 27 Sep 2012 22:35:47 +0000 (-0400) Subject: pkt_sched: Fix warning false positives. X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a01e2a853c9aa6ca4e5c5f734e151b5cae9efd9b;p=pandora-kernel.git pkt_sched: Fix warning false positives. commit f54ba7798848ce1385a71b36a2c997422c82220a upstream. GCC refuses to recognize that all error control flows do in fact set err to something. Add an explicit initialization to shut it up. net/sched/sch_drr.c: In function ‘drr_enqueue’: net/sched/sch_drr.c:359:11: warning: ‘err’ may be used uninitialized in this function [-Wmaybe-uninitialized] net/sched/sch_qfq.c: In function ‘qfq_enqueue’: net/sched/sch_qfq.c:885:11: warning: ‘err’ may be used uninitialized in this function [-Wmaybe-uninitialized] Signed-off-by: David S. Miller [bwh: Backported to 3.2: adjust context] Signed-off-by: Ben Hutchings --- diff --git a/net/sched/sch_drr.c b/net/sched/sch_drr.c index 6b7fe4a84f13..7ce8acc5594b 100644 --- a/net/sched/sch_drr.c +++ b/net/sched/sch_drr.c @@ -351,7 +351,7 @@ static int drr_enqueue(struct sk_buff *skb, struct Qdisc *sch) { struct drr_sched *q = qdisc_priv(sch); struct drr_class *cl; - int err; + int err = 0; cl = drr_classify(skb, sch, &err); if (cl == NULL) { diff --git a/net/sched/sch_qfq.c b/net/sched/sch_qfq.c index ca0fb48d3e55..4ade9189b13b 100644 --- a/net/sched/sch_qfq.c +++ b/net/sched/sch_qfq.c @@ -846,7 +846,7 @@ static int qfq_enqueue(struct sk_buff *skb, struct Qdisc *sch) struct qfq_sched *q = qdisc_priv(sch); struct qfq_group *grp; struct qfq_class *cl; - int err; + int err = 0; u64 roundedS; int s;