From owner-freebsd-current@FreeBSD.ORG Sun Apr 10 13:48:41 2005 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0D00D16A4CE for ; Sun, 10 Apr 2005 13:48:41 +0000 (GMT) Received: from wrzx35.rz.uni-wuerzburg.de (wrzx35.rz.uni-wuerzburg.de [132.187.3.35]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2948843D1D for ; Sun, 10 Apr 2005 13:48:40 +0000 (GMT) (envelope-from q@uni.de) Received: from wrzx34.rz.uni-wuerzburg.de (wrzx34.rz.uni-wuerzburg.de [132.187.3.34]) by wrzx35.rz.uni-wuerzburg.de (Postfix) with ESMTP id CDC8EE105E; Sun, 10 Apr 2005 15:48:38 +0200 (CEST) Received: from virusscan (localhost [127.0.0.1]) by wrzx34.rz.uni-wuerzburg.de (Postfix) with ESMTP id ADAACA79DE; Sun, 10 Apr 2005 15:48:38 +0200 (CEST) Received: from wrzx28.rz.uni-wuerzburg.de (wrzx28.rz.uni-wuerzburg.de [132.187.3.28]) by wrzx34.rz.uni-wuerzburg.de (Postfix) with ESMTP id 86BF5A77E2; Sun, 10 Apr 2005 15:48:38 +0200 (CEST) Received: from frodo.galgenberg.net (wwsx14.win-screen.uni-wuerzburg.de [132.187.253.14]) by wrzx28.rz.uni-wuerzburg.de (Postfix) with ESMTP id 6CD47D8498; Sun, 10 Apr 2005 15:48:38 +0200 (CEST) Received: from coyote.q.local (gb-21-237.galgenberg.net [172.16.21.237]) by frodo.galgenberg.net (8.13.1/8.13.1) with ESMTP id j3ADmcsa019898; Sun, 10 Apr 2005 15:48:38 +0200 (CEST) (envelope-from q@uni.de) Received: from roadrunner.q.local (roadrunner.q.local [192.168.0.148]) by coyote.q.local (8.13.1/8.13.1) with ESMTP id j3ADmcv2016324; Sun, 10 Apr 2005 15:48:38 +0200 (CEST) (envelope-from q@uni.de) Received: from roadrunner.q.local (localhost [127.0.0.1]) by roadrunner.q.local (8.13.3/8.13.1) with ESMTP id j3ADmc2S012982; Sun, 10 Apr 2005 15:48:38 +0200 (CEST) (envelope-from q@uni.de) Received: (from q@localhost) by roadrunner.q.local (8.13.3/8.13.1/Submit) id j3ADmbJZ012981; Sun, 10 Apr 2005 15:48:37 +0200 (CEST) (envelope-from q@uni.de) Date: Sun, 10 Apr 2005 15:48:37 +0200 From: Ulrich Spoerlein To: Jens Schweikhardt Message-ID: <20050410134837.GC774@galgenberg.net> Mail-Followup-To: Jens Schweikhardt , freebsd-current@freebsd.org References: <200504100251.j3A2pLEH055107@sana.init-main.com> <20050410092417.GA774@galgenberg.net> <20050410110836.GA1355@schweikhardt.net> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="z4+8/lEcDcG5Ke9S" Content-Disposition: inline In-Reply-To: <20050410110836.GA1355@schweikhardt.net> User-Agent: Mutt/1.5.8i X-Virus-Scanned: by amavisd-new (Rechenzentrum Universitaet Wuerzburg) cc: freebsd-current@freebsd.org Subject: Re: smbfs bug introduced at smbfs_vnops.c:1.58 X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 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: Sun, 10 Apr 2005 13:48:41 -0000 --z4+8/lEcDcG5Ke9S Content-Type: text/plain; charset=iso-8859-15 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, 10.04.2005 at 13:08:36 +0200, Jens Schweikhardt wrote: > # The compiler should warn about this. But something fishy is going on ... > #=20 > # foo.c: > # int main(void) { > # int a; > # a+=3D1; > # return (0); > # } >=20 > Not so fishy. No warning because -O completely optimizes 'a' away. Try > this instead: >=20 > $ cat foo.c > int main(void) { > int a; > a+=3D1; > return a; > } > $ gcc -O -W -Wall -Wuninitialized -Winit-self foo.c > foo.c: In function `main': > foo.c:2: warning: 'a' might be used uninitialized in this function True, but the compiler should warn about bogus source code, even if the resulting object code (depending on optmiziation flags) is valid. IMHO Let's get back to the bug in smbfs_vnops.c, did the compiler issue a warning? Ulrich Sp=F6rlein --=20 PGP Key ID: F0DB9F44 Encrypted mail welcome! Fingerprint: F1CE D062 0CA9 ADE3 349B 2FE8 980A C6B5 F0DB 9F44 Ok, which part of "Ph'nglui mglw'nafh Cthulhu R'lyeh wgah'nagl fhtagn." didn't you understand? --z4+8/lEcDcG5Ke9S Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.0 (FreeBSD) iD8DBQFCWS61mArGtfDbn0QRAt04AKCVUoCrJ+WV40dYYLkw/7ckoVxmSQCfdmHv ZqgR9tVrIromvkolqdfnzLI= =FSaw -----END PGP SIGNATURE----- --z4+8/lEcDcG5Ke9S--