Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 9 Nov 1997 19:04:29 -0200 (EDT)
From:      Joao Carlos Mendes Luis <jonny@coppe.ufrj.br>
To:        multimedia@freebsd.org
Subject:   Oops, bt848 driver problems in -stable ?
Message-ID:  <199711092104.TAA12699@gaia.coppe.ufrj.br>

next in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199711092104.TAA12699>