Date: Sun, 10 Apr 2005 11:24:17 +0200 From: Ulrich Spoerlein <q@uni.de> To: takawata@jp.freebsd.org Cc: freebsd-current@freebsd.org Subject: Re: smbfs bug introduced at smbfs_vnops.c:1.58 Message-ID: <20050410092417.GA774@galgenberg.net> In-Reply-To: <200504100251.j3A2pLEH055107@sana.init-main.com> References: <200504100251.j3A2pLEH055107@sana.init-main.com>
next in thread | previous in thread | raw e-mail | index | archive | help
--mYCpIKhGyMATD0i+ Content-Type: text/plain; charset=iso-8859-15 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, 10.04.2005 at 11:51:21 +0900, takawata@jp.freebsd.org wrote: > This is caused by uninitialized vp. The compiler should warn about this. But something fishy is going on ... foo.c: int main(void) { int a; a+=3D1; return (0); } % gcc -O -W -Wall -Wuninitialized -Winit-self foo.c % icc -Wbrief -Wall foo.c foo.c(3): remark #592: variable "a" is used before its value is set % tdfc2 -Wall foo.c >/dev/null "foo.c", line 2: Warning: [ISO C90 6.6.2]: Variable 'a' may be used without being set. "foo.c", line 4: Warning: [ISO C90 6.6.2]: Variable 'a' not used since previous assignment. % lint -i foo.c foo.c(3): warning: a may be used before set [158] % splint foo.c foo.c: (in function main) foo.c:3:3: Variable a used before definition Any magical flags for gcc I'm missing? 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? --mYCpIKhGyMATD0i+ Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.0 (FreeBSD) iD8DBQFCWPDBmArGtfDbn0QRAlv6AKC77uh+sjX194oE+bKlqP4Vu7mCnQCdE6e+ jtlhJSlW7079+S6308/3i24= =Z3PH -----END PGP SIGNATURE----- --mYCpIKhGyMATD0i+--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20050410092417.GA774>