[PATCH 2.4.31 3/9] gcc4: fix nested function declaration errors

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

 



gcc4 generates a few compile-time errors like:

In file included from ehci-hcd.c:249:
ehci-q.c: In function 'ehci_urb_done':
ehci-q.c:203: error: invalid storage class for function 'ehci_urb_enqueue'
make[3]: *** [ehci-hcd.o] Error 1
make[3]: Leaving directory `/tmp/linux-2.4.31/drivers/usb/host'
make[2]: *** [_modsubdir_host] Error 2
make[2]: Leaving directory `/tmp/linux-2.4.31/drivers/usb'
make[1]: *** [_modsubdir_usb] Error 2
make[1]: Leaving directory `/tmp/linux-2.4.31/drivers'
make: *** [_mod_drivers] Error 2

This is because function prototype declarations in nested scopes are
no longer accepted. The fix is to remove redundant declarations, or
to move non-redundant ones to the top level.

Signed-off-by: Mikael Pettersson <[email protected]>

 drivers/usb/host/ehci-q.c |    2 --
 1 files changed, 2 deletions(-)

diff -rupN linux-2.4.31/drivers/usb/host/ehci-q.c linux-2.4.31.gcc4-nested-fundec-errors/drivers/usb/host/ehci-q.c
--- linux-2.4.31/drivers/usb/host/ehci-q.c	2005-01-19 18:00:53.000000000 +0100
+++ linux-2.4.31.gcc4-nested-fundec-errors/drivers/usb/host/ehci-q.c	2005-06-12 11:44:05.000000000 +0200
@@ -199,8 +199,6 @@ ehci_urb_done (struct ehci_hcd *ehci, st
 #ifdef	INTR_AUTOMAGIC
 	struct urb		*resubmit = 0;
 	struct usb_device	*dev = 0;
-
-	static int ehci_urb_enqueue (struct usb_hcd *, struct urb *, int);
 #endif
 
 	if (likely (urb->hcpriv != 0)) {
-
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