[PATCH -mm] zatm_open gcc 4.1 warning fix

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 <[email protected]>

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 [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux