From owner-freebsd-multimedia Sun Nov 9 13:04:36 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id NAA04672 for multimedia-outgoing; Sun, 9 Nov 1997 13:04:36 -0800 (PST) (envelope-from owner-freebsd-multimedia) Received: from gaia.coppe.ufrj.br ([146.164.5.200]) by hub.freebsd.org (8.8.7/8.8.7) with ESMTP id NAA04666 for ; Sun, 9 Nov 1997 13:04:32 -0800 (PST) (envelope-from jonny@coppe.ufrj.br) Received: (from jonny@localhost) by gaia.coppe.ufrj.br (8.8.7/8.8.7) id TAA12699 for multimedia@freebsd.org; Sun, 9 Nov 1997 19:04:29 -0200 (EDT) (envelope-from jonny) From: Joao Carlos Mendes Luis Message-Id: <199711092104.TAA12699@gaia.coppe.ufrj.br> Subject: Oops, bt848 driver problems in -stable ? To: multimedia@freebsd.org Date: Sun, 9 Nov 1997 19:04:29 -0200 (EDT) X-Mailer: ELM [version 2.4ME+ PL32 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-multimedia@freebsd.org X-Loop: FreeBSD.org Precedence: bulk cvsup from yesterday: cc -c -O -m486 -pipe -fexpensive-optimizations -fomit-frame-pointer -malign-functions=2 -malign-jumps=2 -malign-loops=2 -Wreturn-type -Wcomment -Wredundant-decls -Wimplicit -Wnested-externs -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -nostdinc -I- -I. -I../.. -I../../../include -DDEVFS -DMFS -DMSDOSFS -DNFS -DFFS -DIPX_ERRPRINTFS=0 -DIPXPRINTFS=0 -DIPX -DJONNY -DCOMPAT_43 -DINET -DKERNEL ../../pci/brooktree848.c ../../pci/brooktree848.c: In function `video_ioctl': ../../pci/brooktree848.c:1955: parse error before `par' ../../pci/brooktree848.c:1961: `write' undeclared (first use this function) ../../pci/brooktree848.c:1961: (Each undeclared identifier is reported only once ../../pci/brooktree848.c:1961: for each function it appears in.) ../../pci/brooktree848.c:1962: `i2c_addr' undeclared (first use this function) ../../pci/brooktree848.c:1962: `i2c_port' undeclared (first use this function) ../../pci/brooktree848.c:1962: `data' undeclared (first use this function) ../../pci/brooktree848.c:1966: `par' undeclared (first use this function) Of course, this is wrong: case BT848_I2CWR: u_long par = *(u_long *)arg; u_char write = (par >> 24) & 0xff ; int i2c_addr = (par >> 16) & 0xff ; int i2c_port = (par >> 8) & 0xff ; u_long data = (par) & 0xff ; A switch case does not define a new block, and variables may only be defined in the beginning of a block. So, either define these variables in another place, or create a new block with {} (yuck). Does this compile in -current ? Jonny -- Joao Carlos Mendes Luis jonny@gta.ufrj.br +55 21 290-4698 jonny@coppe.ufrj.br Universidade Federal do Rio de Janeiro UFRJ/COPPE/CISI PGP fingerprint: 29 C0 50 B9 B6 3E 58 F2 83 5F E3 26 BF 0F EA 67