From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/4822 Path: news.gmane.org!not-for-mail From: Oliver Schneider Newsgroups: gmane.linux.lib.musl.general Subject: Re: build with clang-3.4 warnings report Date: Mon, 07 Apr 2014 11:17:55 +0000 Organization: CYREN Iceland Message-ID: <53428963.9030609@f-prot.com> References: <533F0F1A.6040707@embtoolkit.org> <20140404204701.GO26358@brightrain.aerifal.cx> <533F56FB.8060509@embtoolkit.org> <20140405015443.GU26358@brightrain.aerifal.cx> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1396869500 10189 80.91.229.3 (7 Apr 2014 11:18:20 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 7 Apr 2014 11:18:20 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-4826-gllmg-musl=m.gmane.org@lists.openwall.com Mon Apr 07 13:18:14 2014 Return-path: Envelope-to: gllmg-musl@plane.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by plane.gmane.org with smtp (Exim 4.69) (envelope-from ) id 1WX7Z7-0006ZT-QE for gllmg-musl@plane.gmane.org; Mon, 07 Apr 2014 13:18:13 +0200 Original-Received: (qmail 19681 invoked by uid 550); 7 Apr 2014 11:18:10 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Original-Received: (qmail 19667 invoked from network); 7 Apr 2014 11:18:10 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.0 In-Reply-To: <20140405015443.GU26358@brightrain.aerifal.cx> X-Antivirus: Scanned by F-PROT Antivirus (http://www.f-prot.com) Xref: news.gmane.org gmane.linux.lib.musl.general:4822 Archived-At: On 2014-04-05 01:54, Rich Felker wrote: >> src/env/__init_security.c:8:13: warning: function 'dummy' is not needed and will not be emitted [-Wunneeded-internal-declaration] >> static void dummy(void *ent) >> ^ >> 1 warning generated. > > This is a bug in the compiler; the function dummy has an externally > visible alias, so it will not be omitted (and if it is actually > omitted, that means the compiler is generating broken output). There is yet another possibility ;) The ccc-analyzer could simply be buggy in this case. Would be interesting to look at the optimized intermediate code whether this gets optimized out. I think it probably doesn't, but who knows. The dangling else warnings could also be resolved by simply adding braces. It doesn't add to the code size, and the times when developers where paid by LoC are long over (I hope). // Oliver