From owner-freebsd-fs@FreeBSD.ORG Sun Apr 10 11:09:02 2005 Return-Path: Delivered-To: freebsd-fs@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 23FB716A4CE; Sun, 10 Apr 2005 11:09:02 +0000 (GMT) Received: from bremen.shuttle.de (bremen.shuttle.de [194.95.249.251]) by mx1.FreeBSD.org (Postfix) with ESMTP id C98B143D2F; Sun, 10 Apr 2005 11:09:00 +0000 (GMT) (envelope-from schweikh@schweikhardt.net) Received: by bremen.shuttle.de (Postfix, from userid 10) id DBBD23B8C3; Sun, 10 Apr 2005 13:08:58 +0200 (CEST) Received: from hal9000.schweikhardt.net (localhost [127.0.0.1]) j3AB8aD2003502; Sun, 10 Apr 2005 13:08:36 +0200 (CEST) (envelope-from schweikh@hal9000.schweikhardt.net) Received: (from schweikh@localhost) by hal9000.schweikhardt.net (8.13.3/8.13.3/Submit) id j3AB8aMK003501; Sun, 10 Apr 2005 13:08:36 +0200 (CEST) (envelope-from schweikh) Date: Sun, 10 Apr 2005 13:08:36 +0200 From: Jens Schweikhardt To: takawata@jp.freebsd.org, jeff@freebsd.org, bp@freebsd.org, freebsd-fs@freebsd.org, freebsd-current@freebsd.org Message-ID: <20050410110836.GA1355@schweikhardt.net> References: <200504100251.j3A2pLEH055107@sana.init-main.com> <20050410092417.GA774@galgenberg.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20050410092417.GA774@galgenberg.net> User-Agent: Mutt/1.5.9i Subject: Re: smbfs bug introduced at smbfs_vnops.c:1.58 X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 10 Apr 2005 11:09:02 -0000 On Sun, Apr 10, 2005 at 11:24:17AM +0200, Ulrich Spoerlein wrote: # 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+=1; # return (0); # } Not so fishy. No warning because -O completely optimizes 'a' away. Try this instead: $ cat foo.c int main(void) { int a; a+=1; 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 Regards, Jens -- Jens Schweikhardt http://www.schweikhardt.net/ SIGSIG -- signature too long (core dumped)