[linux-dvb] [PATCH] gcc 2.95

Olaf Titz olaf at bigred.inka.de
Sat Feb 26 20:10:22 CET 2005


Don't know exactly why, but GCC 2.95 doesn't grok the variable length
array initializer in dvb-pll.h. Also, another case of mixed
declarations/statements in dvb-dibusb-core.c.

Olaf

Index: linux/drivers/media/dvb/frontends/dvb-pll.h
===================================================================
RCS file: /cvs/linuxtv/dvb-kernel/linux/drivers/media/dvb/frontends/dvb-pll.h,v
retrieving revision 1.1
diff -b -u -r1.1 dvb-pll.h
--- linux/drivers/media/dvb/frontends/dvb-pll.h	16 Feb 2005 19:50:06 -0000	1.1
+++ linux/drivers/media/dvb/frontends/dvb-pll.h	26 Feb 2005 19:06:06 -0000
@@ -2,6 +2,12 @@
  * $Id: dvb-pll.h,v 1.1 2005/02/16 19:50:06 js Exp $
  */

+#if __GNUC__ < 3
+#define MAX_PLL_ENTRIES 10
+#else
+#define MAX_PLL_ENTRIES
+#endif
+
 struct dvb_pll_desc {
 	char *name;
 	u32  min;
@@ -14,7 +20,7 @@
 		u32 stepsize;
 		u8  cb1;
 		u8  cb2;
-	} entries[];
+	} entries[MAX_PLL_ENTRIES];
 };

 extern struct dvb_pll_desc dvb_pll_thomson_dtt7579;
Index: linux/drivers/media/dvb/dibusb/dvb-dibusb-core.c
===================================================================
RCS file: /cvs/linuxtv/dvb-kernel/linux/drivers/media/dvb/dibusb/dvb-dibusb-core.c,v
retrieving revision 1.22
diff -b -u -r1.22 dvb-dibusb-core.c
--- linux/drivers/media/dvb/dibusb/dvb-dibusb-core.c	19 Feb 2005 19:07:15 -0000	1.22
+++ linux/drivers/media/dvb/dibusb/dvb-dibusb-core.c	26 Feb 2005 19:06:04 -0000
@@ -416,8 +416,8 @@
 static struct dibusb_usb_device * dibusb_find_device (struct usb_device *udev,int *cold)
 {
 	int i,j;
-	*cold = -1;
 	struct dibusb_usb_device *dev = NULL;
+	*cold = -1;

 	for (i = 0; i < sizeof(dibusb_devices)/sizeof(struct dibusb_usb_device); i++) {
 		for (j = 0; j < DIBUSB_ID_MAX_NUM && dibusb_devices[i].cold_ids[j] != NULL; j++) {

=== end of patch ===





More information about the linux-dvb mailing list