netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] pkt_sched: Annotate uninitialized var in sfq_enqueue()
@ 2008-12-19  8:44 Jarek Poplawski
  2008-12-22  4:15 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Jarek Poplawski @ 2008-12-19  8:44 UTC (permalink / raw)
  To: David Miller; +Cc: netdev

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

Signed-off-by: Jarek Poplawski <jarkao2@gmail.com>
---

 net/sched/sch_sfq.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/net/sched/sch_sfq.c b/net/sched/sch_sfq.c
index ab8cfee..f3965df 100644
--- a/net/sched/sch_sfq.c
+++ b/net/sched/sch_sfq.c
@@ -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) {

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2008-12-22  4:15 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-12-19  8:44 [PATCH] pkt_sched: Annotate uninitialized var in sfq_enqueue() Jarek Poplawski
2008-12-22  4:15 ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).