Re: 2.6.12-rc5-mm1: drivers/media/dvb/dvb-usb/a800.c compile error

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

 



On Mon, May 30, 2005 at 10:29:26AM +0200, Patrick Boettcher wrote:
> On Sun, 29 May 2005, Adrian Bunk wrote:
> >It seems this patch is responsible for the following compile error with
> >gcc 2.95:
...
> The attached patch solves the problem by adding a '0' to the array 
> declaration. I don't know if this is ethically correct, but I saw it in 
> some v4l-code, so I assume it is.
...
> -	struct dvb_usb_device_description devices[];
> +	struct dvb_usb_device_description devices[0];

That can't work in this context. Did you even try to compile?

.../dibusb-mb.c:178: warning: excess elements in array initializer
.../dibusb-mb.c:178: warning: (near initialization for `dibusb1_1_properties.devices')

The solution below wastes a few 100 bytes of space, but I think we can
live with that. The same thing was done in dvb-pll.h.
---
gcc-2.95 compile fix.

Signed-off-by: Patrick Boettcher <[email protected]>
Signed-off-by: Johannes Stezenbach <[email protected]>

Index: linux/drivers/media/dvb/dvb-usb/dvb-usb.h
===================================================================
RCS file: /cvs/linuxtv/dvb-kernel/linux/drivers/media/dvb/dvb-usb/dvb-usb.h,v
retrieving revision 1.16
diff -u -p -r1.16 dvb-usb.h
--- linux/drivers/media/dvb/dvb-usb/dvb-usb.h	2 May 2005 12:48:01 -0000	1.16
+++ linux/drivers/media/dvb/dvb-usb/dvb-usb.h	30 May 2005 09:09:30 -0000
@@ -193,7 +193,7 @@ struct dvb_usb_properties {
 	} urb;
 
 	int num_device_descs;
-	struct dvb_usb_device_description devices[];
+	struct dvb_usb_device_description devices[8];
 };
 
 
-
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