Skip to contentSkip to conversation

Char: moxa, fix compiler warning

PATCH New Jiri Slaby 1 participant 1 message Mar 30, 2008 Char and misc drivers

lore
Share & tools
lore

Jiri Slaby

author
#0 lore raw

PATCH 1/1 Char: moxa, fix compiler warning

On CONFIG_MOXA_INTELLIO=y, this warning was emitted:
drivers/char/moxa.c: In function ‘moxa_init’:
drivers/char/moxa.c:1000: warning: unused variable ‘i’

Move it into the conditional section where is only used.

---
 drivers/char/moxa.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
drivers/char/moxa.c +2 -1
index 57616c1..1ab9517 100644
@@ -997,7 +997,7 @@ static struct pci_driver moxa_pci_driver = {
 
 static int __init moxa_init(void)
 {
-	unsigned int i, isabrds = 0;
+	unsigned int isabrds = 0;
 	int retval = 0;
 
 	printk(KERN_INFO "MOXA Intellio family driver version %s\n",
@@ -1029,6 +1029,7 @@ static int __init moxa_init(void)
 #ifdef MODULE
 	{
 	struct moxa_board_conf *brd = moxa_boards;
+	unsigned int i;
 	for (i = 0; i < MAX_BOARDS; i++) {
 		if (!baseaddr[i])
 			break;
Signature · 1 line
1.5.4.4