[patch] remove an unused variable from bpck6.c

From: Adrian Bunk (bunk@fs.tum.de)
Date: Wed May 08 2002 - 16:42:37 EST


Hi,

compiling bpck6.c gives the following warning:

<-- snip -->

...
gcc -D__KERNEL__ -I/home/bunk/linux/kernel-2.4/linux-full/include -Wall
-Wstrict-prototypes -Wno-trigraphs -O2 -fno-strict-aliasing -fno-common -pipe
-mpreferred-stack-boundary=2 -march=k6 -nostdinc -I
/usr/lib/gcc-lib/i386-linux/2.95.4/i
nclude -DKBUILD_BASENAME=bpck6 -c -o bpck6.o bpck6.c
bpck6.c: In function `bpck6_init_proto':
bpck6.c:228: warning: unused variable `i'
...

<-- snip -->

And the compiler is right, this variable isn't used anywhere. The
following patch (made against 2.4.19-pre8-ac1 but it applies to all 2.4
and 2.5 kernels) removes this variable:

--- drivers/block/paride/bpck6.c.old Wed May 8 23:40:18 2002
+++ drivers/block/paride/bpck6.c Wed May 8 23:41:21 2002
@@ -225,8 +225,6 @@

 static void bpck6_init_proto(PIA *pi)
 {
- int i;
-
         /* allocate a state structure for this item */
         pi->privptr=kmalloc(sizeof(PPC_STORAGE),GFP_KERNEL);

cu
Adrian

-- 

You only think this is a free country. Like the US the UK spends a lot of time explaining its a free country because its a police state. Alan Cox

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



This archive was generated by hypermail 2b29 : Tue May 14 2002 - 12:00:10 EST