Date: Sat, 12 Sep 1998 14:26:36 +0900 (JST)
From: shigio@wafu.netgate.net
To: FreeBSD-gnats-submit@FreeBSD.ORG
Cc: shigio@wafu.netgate.net
Subject: kern/7903: unmatched '{}' blocks.
Message-ID: <199809120524.WAA27183@hub.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 7903
>Category: kern
>Synopsis: unmatched '{}' blocks.
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Fri Sep 11 22:30:01 PDT 1998
>Last-Modified:
>Originator: Shigio Yamaguchi
>Organization:
Freelance programmer
>Release: FreeBSD 3.0-19980804-SNAP
>Environment:
>Description:
I have found three errors which doesn't come up to the surface.
Probably nobody define the macros which make valid these blocks.
[dev/pdq/pdq_ifsubr.c]
Arp_ifinit() start at line 82 and pdq_ifinit() start at line 96
without arp_ifini()'s ending.
80 #if defined(__bsdi__) && _BSDI_VERSION < 199506 /* XXX */
81 static void
> 82 arp_ifinit(
83 struct arpcom *ac,
84 struct ifaddr *ifa)
85 {
86 sc->sc_ac.ac_ipaddr = IA_SIN(ifa)->sin_addr;
87 arpwhohas(&sc->sc_ac, &IA_SIN(ifa)->sin_addr);
88 #if _BSDI_VERSION >= 199401
89 ifa->ifa_rtrequest = arp_rtrequest;
90 ifa->ifa_flags |= RTF_CLONING;
91 #endif
92 #endif
93
94
95 void
> 96 pdq_ifinit(
97 pdq_softc_t *sc)
98 {
[gnu/i386/isa/dgb.c]
It seems that there is a extra '}' at line 2137.
2132 #ifdef LEAVE_FREE_CHARS
2133 if(tail>head) {
2134 size=tail-head-LEAVE_FREE_CHARS;
2135 if (size <0)
2136 size==0;
> 2137 } else {
2138 size=port->txbufsize-head;
2139 if(tail+port->txbufsize < head)
2140 size==0;
2141 }
2142 }
2143 #else
[pc98/boot/biosboot/boot.c]
Extra '{' and '}'.
96 #ifdef PC98
> 97 for(ret = 0; ret < 2; ret ++) {
98 if (*(unsigned char*)V(0xA155d) & (1 << ret)) {
99 bootinfo.bi_bios_geom[ret] = get_diskinfo(ret +
100 }
101 #else /* IBM-PC */
102 for(ret = 0; ret < N_BIOS_GEOM; ret ++)
103 bootinfo.bi_bios_geom[ret] = get_diskinfo(ret + 0x80);
104 #endif /* PC98 */
> 105 }
>How-To-Repeat:
>Fix:
[dev/pdq/pdq_ifsubr.c]
Add '}' at 93.
[gnu/i386/isa/dgb.c]
Remove '}' at 2137 or add '{' at 2135.
[pc98/boot/biosboot/boot.c]
Remove '{' at 97 and '}' at 105.
>Audit-Trail:
>Unformatted:
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199809120524.WAA27183>
