From owner-freebsd-current@FreeBSD.ORG Wed Oct 22 20:44:15 2008 Return-Path: Delivered-To: current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BBA51106566B for ; Wed, 22 Oct 2008 20:44:15 +0000 (UTC) (envelope-from david@catwhisker.org) Received: from bunrab.catwhisker.org (adsl-63-193-123-122.dsl.snfc21.pacbell.net [63.193.123.122]) by mx1.freebsd.org (Postfix) with ESMTP id 7D7D58FC1D for ; Wed, 22 Oct 2008 20:44:15 +0000 (UTC) (envelope-from david@catwhisker.org) Received: from bunrab.catwhisker.org (localhost [127.0.0.1]) by bunrab.catwhisker.org (8.13.3/8.13.3) with ESMTP id m9MKiEIC026786; Wed, 22 Oct 2008 13:44:14 -0700 (PDT) (envelope-from david@bunrab.catwhisker.org) Received: (from david@localhost) by bunrab.catwhisker.org (8.13.3/8.13.1/Submit) id m9MKiESY026785; Wed, 22 Oct 2008 13:44:14 -0700 (PDT) (envelope-from david) Date: Wed, 22 Oct 2008 13:44:14 -0700 From: David Wolfskill To: current@freebsd.org Message-ID: <20081022204414.GR11652@bunrab.catwhisker.org> Mail-Followup-To: David Wolfskill , current@freebsd.org Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="80Ds8Z/hZmemMosa" Content-Disposition: inline User-Agent: Mutt/1.4.2.1i Cc: Subject: Parenthesizing problem in sys/i386/i386/identcpu.c X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Oct 2008 20:44:15 -0000 --80Ds8Z/hZmemMosa Content-Type: multipart/mixed; boundary="E1BPhOSoTthPQdPL" Content-Disposition: inline --E1BPhOSoTthPQdPL Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable This was from around line 847; whine I saw was: >>> Kernel build for FREEBEAST started on Wed Oct 22 12:50:05 PDT 2008 =2E.. >>> stage 3.2: building everything =2E.. cc -c -O -pipe -std=3Dc99 -g -Wall -Wredundant-decls -Wnested-externs -Wst= rict-prototypes -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual = -Wundef -Wno-pointer-sign -fformat-extensions -nostdinc -I. -I/usr/src/sy= s -I/usr/src/sys/contrib/altq -D_KERNEL -DHAVE_KERNEL_OPTION_HEADERS -inclu= de opt_global.h -fno-common -finline-limit=3D8000 --param inline-unit-growt= h=3D100 --param large-function-growth=3D1000 -mno-align-long-strings -mpre= ferred-stack-boundary=3D2 -mno-mmx -mno-3dnow -mno-sse -mno-sse2 -mno-sse3= -ffreestanding -fstack-protector -Werror /usr/src/sys/i386/i386/identcpu.c cc1: warnings being treated as errors /usr/src/sys/i386/i386/identcpu.c: In function 'printcpuinfo': /usr/src/sys/i386/i386/identcpu.c:847: warning: suggest parentheses around = && within || /usr/src/sys/i386/i386/identcpu.c:847: error: expected statement before ')'= token *** Error code 1 Stop in /common/S4/obj/usr/src/sys/FREEBEAST. *** Error code 1 Stop in /usr/src. [End of excerpt...] The attached patch got me through the buildkernel, and the resulting kernel booted OK -- for me. I'm only using the i386 arch; I don't know if there might be similar issues for any other arch. It applied to rev. 1.190 of src/sys/i386/i386/identcpu.c. (Sorry; I'm still reading about Subversion, and haven't got my thinking converted yet.) Peace, david --=20 David H. Wolfskill david@catwhisker.org Depriving a girl or boy of an opportunity for education is evil. See http://www.catwhisker.org/~david/publickey.gpg for my public key. --E1BPhOSoTthPQdPL Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="identcpu.c.diff" Content-Transfer-Encoding: quoted-printable Index: sys/i386/i386/identcpu.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /cvs/freebsd/src/sys/i386/i386/identcpu.c,v retrieving revision 1.190 diff -u -r1.190 identcpu.c --- sys/i386/i386/identcpu.c 22 Oct 2008 00:01:53 -0000 1.190 +++ sys/i386/i386/identcpu.c 22 Oct 2008 20:10:15 -0000 @@ -841,10 +841,10 @@ "AuthenticAMD") =3D=3D 0) cpu_feature &=3D ~CPUID_HTT; =20 - if (!tsc_is_invariant && - (strcmp(cpu_vendor, "AuthenticAMD") =3D=3D 0 && - (amd_pminfo & AMDPM_TSC_INVARIANT) !=3D 0 || - I386_CPU_FAMILY(cpu_id) >=3D 0x10))) { + if ((!tsc_is_invariant && + strcmp(cpu_vendor, "AuthenticAMD") =3D=3D 0 && + (amd_pminfo & AMDPM_TSC_INVARIANT) !=3D 0) || + I386_CPU_FAMILY(cpu_id) >=3D 0x10) { tsc_is_invariant =3D 1; printf("\n P-state invariant TSC"); } --E1BPhOSoTthPQdPL-- --80Ds8Z/hZmemMosa Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.0 (FreeBSD) iEYEARECAAYFAkj/kJ4ACgkQmprOCmdXAD1ctQCdHvoSUeRloGmKdN3pv+QVUcKw yy8AnRnJMB1cLylDlZ4rCv24YNjc6Vzz =tQtp -----END PGP SIGNATURE----- --80Ds8Z/hZmemMosa--