Skip to contentSkip to conversation

zatm_open gcc 4.1 warning fix

PATCH New Daniel Walker 1 participant 1 message May 10, 2006 ATM

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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

drivers/atm/zatm.c +2 -1
Index: 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);