]> git.openfabrics.org - ~emulex/infiniband.git/commitdiff
pkt_sched: fix warning in net/sched/sch_hfsc.c
authorIngo Molnar <mingo@elte.hu>
Wed, 26 Nov 2008 00:50:02 +0000 (16:50 -0800)
committerDavid S. Miller <davem@davemloft.net>
Wed, 26 Nov 2008 00:50:02 +0000 (16:50 -0800)
this warning:

  net/sched/sch_hfsc.c: In function ‘hfsc_enqueue’:
  net/sched/sch_hfsc.c:1577: warning: ‘err’ may be used uninitialized in this function

triggers because GCC does not recognize the (correct) error flow
between hfsc_classify(), 'cl' and 'err'.

Annotate it.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/sched/sch_hfsc.c

index 51dd3f4016231121a9af5718caf81666d2f2596c..613179c9969cf547b9dbd1e712b30cf8a0b101b1 100644 (file)
@@ -1563,7 +1563,7 @@ static int
 hfsc_enqueue(struct sk_buff *skb, struct Qdisc *sch)
 {
        struct hfsc_class *cl;
-       int err;
+       int uninitialized_var(err);
 
        cl = hfsc_classify(skb, sch, &err);
        if (cl == NULL) {