Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S261569AbVE3JOg (ORCPT ); Mon, 30 May 2005 05:14:36 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S261570AbVE3JOg (ORCPT ); Mon, 30 May 2005 05:14:36 -0400 Received: from ipx10786.ipxserver.de ([80.190.251.108]:39555 "EHLO allen.werkleitz.de") by vger.kernel.org with ESMTP id S261569AbVE3JOO (ORCPT ); Mon, 30 May 2005 05:14:14 -0400 Date: Mon, 30 May 2005 11:14:35 +0200 From: Johannes Stezenbach To: Patrick Boettcher Cc: Adrian Bunk , Andrew Morton , linux-kernel@vger.kernel.org Message-ID: <20050530091434.GA5669@linuxtv.org> Mail-Followup-To: Johannes Stezenbach , Patrick Boettcher , Adrian Bunk , Andrew Morton , linux-kernel@vger.kernel.org References: <20050525134933.5c22234a.akpm@osdl.org> <20050529144548.GC10441@stusta.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.9i X-SA-Exim-Connect-IP: 84.189.241.39 Subject: Re: 2.6.12-rc5-mm1: drivers/media/dvb/dvb-usb/a800.c compile error X-SA-Exim-Version: 4.2 (built Thu, 03 Mar 2005 10:44:12 +0100) X-SA-Exim-Scanned: Yes (on allen.werkleitz.de) Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1787 Lines: 46 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 Signed-off-by: Johannes Stezenbach 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 majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/