Skip to contentSkip to conversation

-2.6.10-rc2: Fix Compiler Warning parport_pc.c

PATCH New Bryan Batten 1 participant 1 message Nov 18, 2004

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 -2.6.10-rc2: Fix Compiler Warning parport_pc.c

After patching up to 2.6.10-rc2, I get the following compiler warning when building the kernel with gcc 2.95:

drivers/parport/parport_pc.c:3317: warning: initialization from incompatible pointer type

The warning occurs because parport_init_mode_setup() wants 'char *' instead of 'const char *'.

The fix is to just remove the 'const' from the declaration.

Here's the patch to drivers/parport/parport_pc.c:
--------------------------------snip-snip-----------------------------

# diff -up *orig/drivers/parport/parport_pc.c *6x/drivers/parport
--- linux-2.6.9orig/drivers/parport/parport_pc.c        Mon Nov 15 22:44:11 2004
+++ linux-2.6x/drivers/parport/parport_pc.c     Wed Nov 17 22:35:37 2004
@@ -3154,7 +3154,7 @@ static int __init parport_parse_dma(cons
                                     PARPORT_DMA_NONE, PARPORT_DMA_NOFIFO);
 }

-static int __init parport_init_mode_setup(const char *str) { +static int __init parport_init_mode_setup(char *str) {

        printk(KERN_DEBUG "parport_pc.c: Specified parameter parport_init_mode=%s\n", str);

------------------------------end-snip-snip---------------------------

(Signed-off-by: Bryan Batten <[email protected]>)