Received: from localhost (maia-2.hub.org [200.46.204.187]) by postgresql.org (Postfix) with ESMTP id 7BB129FBD7D for ; Tue, 17 Jul 2007 12:26:18 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.187]) (amavisd-maia, port 10024) with ESMTP id 58135-01 for ; Tue, 17 Jul 2007 12:26:06 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.5 Received: from gmp-ea-fw-1.sun.com (gmp-ea-fw-1.sun.com [192.18.1.36]) by postgresql.org (Postfix) with ESMTP id 33A979FBD3E for ; Tue, 17 Jul 2007 12:26:11 -0300 (ADT) Received: from d1-emea-09.sun.com (d1-emea-09.sun.com [192.18.2.119]) by gmp-ea-fw-1.sun.com (8.13.6+Sun/8.12.9) with ESMTP id l6HFQ6qR011699 for ; Tue, 17 Jul 2007 15:26:10 GMT Received: from conversion-daemon.d1-emea-09.sun.com by d1-emea-09.sun.com (Sun Java System Messaging Server 6.2-6.01 (built Apr 3 2006)) id <0JLB00I01XDWQR00@d1-emea-09.sun.com> (original mail from Zdenek.Kotala@Sun.COM) for pgsql-hackers@postgresql.org; Tue, 17 Jul 2007 16:26:06 +0100 (BST) Received: from [129.157.18.76] by d1-emea-09.sun.com (Sun Java System Messaging Server 6.2-6.01 (built Apr 3 2006)) with ESMTPSA id <0JLB009ZFXJHAII9@d1-emea-09.sun.com>; Tue, 17 Jul 2007 16:26:06 +0100 (BST) Date: Tue, 17 Jul 2007 17:25:31 +0200 From: Zdenek Kotala Subject: Re: compiler warnings on the buildfarm In-reply-to: <469BE2DE.6070102@kaltenbrunner.cc> To: Stefan Kaltenbrunner Cc: pgsql-hackers@postgresql.org, peter_e@gmx.net Message-id: <469CDF6B.6080209@sun.com> MIME-version: 1.0 Content-type: text/plain; format=flowed; charset=ISO-8859-1 Content-transfer-encoding: 7BIT References: <46962BBD.5000108@kaltenbrunner.cc> <200707121744.22730.peter_e@gmx.net> <4696548D.7020406@kaltenbrunner.cc> <469769AD.5000703@sun.com> <46976DD2.3050202@kaltenbrunner.cc> <46977B20.9020100@sun.com> <469A60C8.6050404@kaltenbrunner.cc> <469BA8DE.1030004@sun.com> <469BE2DE.6070102@kaltenbrunner.cc> User-Agent: Thunderbird 2.0.0.0 (X11/20070508) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200707/518 X-Sequence-Number: 105433 Stefan Kaltenbrunner napsal(a): > Zdenek Kotala wrote: >> Stefan Kaltenbrunner wrote: >>> Zdenek Kotala wrote: >>>> Stefan Kaltenbrunner wrote: >>>>> Zdenek Kotala wrote: >>>>>> For sun studio -erroff=E_STATEMENT_NOT_REACHED is useful there. If you >>>>>> want to determine warning tags for each warning add -errtags. >>>>> Is that supported on all versions of sun studio(Sun WorkShop 6, Sun >>>>> Studio 8,11) we have on the farm ? >>>> Yes. Also on SS12. >>> hmm - sure about that ? I was about to submit a patch to disable some >>> compiler warnings but then I noted the following discussion thread: >>> >>> http://forum.java.sun.com/thread.jspa?threadID=5163903&messageID=9637391 >>> >>> which seems to indicate that at least the compiler installed on kudu: >>> >>> http://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=kudu&dt=2007-07-15%2003:30:01 >>> >>> >>> does NOT support turning of specific warnings. >>> >> I tested it on cc version 5.3 and it works. See > > ah cool - thanks for testing! > > so on my box we would need to add > -erroff=E_EMPTY_TRANSLATION_UNIT,E_STATEMENT_NOT_REACHED,E_END_OF_LOOP_CODE_NOT_REACHED,E_FUNC_HAS_NO_RETURN_STMT,E_LOOP_NOT_ENTERED_AT_TOP > > to CFLAGS to get down to the following 2 warnings: > > "pgstat.c", line 652: warning: const object should have initializer: > all_zeroes (E_CONST_OBJ_SHOULD_HAVE_INITIZR) > "pgstat.c", line 2118: warning: const object should have initializer: > all_zeroes (E_CONST_OBJ_SHOULD_HAVE_INITIZR) > > the open question is if that is what want or if we would be simply > adding (unnecessary) complexity (or confusion). > > comments ? E_STATEMENT_NOT_REACHED,E_END_OF_LOOP_CODE_NOT_REACHED, E_EMPTY_TRANSLATION_UNIT are probably ok to ignore. E_FUNC_HAS_NO_RETURN_STMT is there because main is leaved by exit() instead return. And In another case It should be regular warning. I think good solution is compare previous warning log with latest build and make a diff. If some new warning appears it is probably regular warning. Zdenek