Date: Sun, 10 Apr 2005 19:16:17 +0200 From: Jens Schweikhardt <schweikh@schweikhardt.net> To: freebsd-current@freebsd.org Subject: Re: smbfs bug introduced at smbfs_vnops.c:1.58 Message-ID: <20050410171617.GB1355@schweikhardt.net> In-Reply-To: <20050410134837.GC774@galgenberg.net> References: <200504100251.j3A2pLEH055107@sana.init-main.com> <20050410092417.GA774@galgenberg.net> <20050410110836.GA1355@schweikhardt.net> <20050410134837.GC774@galgenberg.net>
next in thread | previous in thread | raw e-mail | index | archive | help
...
# > $ 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
#
# True, but the compiler should warn about bogus source code, even if the
# resulting object code (depending on optmiziation flags) is valid.
Yes, but this type of warning needs data flow analysis, which IIRC is
documented to need at least -O1. So I suspect the original code may have
been compiled without optimization.
Regards,
Jens
--
Jens Schweikhardt http://www.schweikhardt.net/
SIGSIG -- signature too long (core dumped)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20050410171617.GB1355>
