lkml.org 
[lkml]   [2006]   [May]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH -mm] zatm_open gcc 4.1 warning fix
It looks like this warning could be a bug. Where alloc_shaper() could 
return without an error, and not touch "pcr" . Needs review ..

Fixes the following warning,

drivers/atm/zatm.c: In function 'zatm_open':
drivers/atm/zatm.c:920: warning: 'pcr' may be used uninitialized in this function

Signed-Off-By: Daniel Walker <dwalker@mvista.com>

Index: linux-2.6.16/drivers/atm/zatm.c
===================================================================
--- linux-2.6.16.orig/drivers/atm/zatm.c
+++ linux-2.6.16/drivers/atm/zatm.c
@@ -917,7 +917,8 @@ static int open_tx_first(struct atm_vcc
unsigned long flags;
u32 *loop;
unsigned short chan;
- int pcr,unlimited;
+ int pcr = ATM_OC3_PCR;
+ int unlimited;

DPRINTK("open_tx_first\n");
zatm_dev = ZATM_DEV(vcc->dev);
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
\
 
 \ /
  Last update: 2006-05-10 05:00    [W:0.025 / U:0.732 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site