From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/4802 Path: news.gmane.org!not-for-mail From: Rich Felker Newsgroups: gmane.linux.lib.musl.general Subject: Re: build with clang-3.4 warnings report Date: Fri, 4 Apr 2014 21:54:43 -0400 Message-ID: <20140405015443.GU26358@brightrain.aerifal.cx> References: <533F0F1A.6040707@embtoolkit.org> <20140404204701.GO26358@brightrain.aerifal.cx> <533F56FB.8060509@embtoolkit.org> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1396662903 31452 80.91.229.3 (5 Apr 2014 01:55:03 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 5 Apr 2014 01:55:03 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-4806-gllmg-musl=m.gmane.org@lists.openwall.com Sat Apr 05 03:54:57 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 1WWFou-0004iU-K0 for gllmg-musl@plane.gmane.org; Sat, 05 Apr 2014 03:54:56 +0200 Original-Received: (qmail 25940 invoked by uid 550); 5 Apr 2014 01:54:55 -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 25931 invoked from network); 5 Apr 2014 01:54:55 -0000 Content-Disposition: inline In-Reply-To: <533F56FB.8060509@embtoolkit.org> User-Agent: Mutt/1.5.21 (2010-09-15) Xref: news.gmane.org gmane.linux.lib.musl.general:4802 Archived-At: On Sat, Apr 05, 2014 at 03:06:03AM +0200, Abdoulaye Walsimou Gaye wrote: > OK I was not building with --enable-warnings! Here is another round without bogus warnings you rejected: > -Wstring-plus-int > -Wtautological-constant-out-of-range-compare > > Thanks, > awg > > src/aio/aio_readwrite.c:20:16: warning: initializer overrides prior initialization of this subobject [-Winitializer-overrides] > .__si_fields.__sigchld.si_pid = __pthread_self()->pid, > ~^~~~~~~~~ > src/aio/aio_readwrite.c:18:20: note: previous initialization is here > .__si_fields.__rt.si_sigval = sev->sigev_value, > ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > src/aio/aio_readwrite.c:8:13: warning: function 'dummy' is not needed and will not be emitted [-Wunneeded-internal-declaration] > static void dummy(void) > ^ > 2 warnings generated. Like I said before, this looks real, and we need to look into it. > 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). > src/env/__init_tls.c:46:14: warning: function 'simple' is not needed and will not be emitted [-Wunneeded-internal-declaration] > static void *simple(void *p) > ^ > 1 warning generated. Thanks! This is a great find, cruft that was left behind in the lazy thread pointer init removal. Fixing it shaved ~40 bytes off the minimal static-linked program size, bringing the net change from the change down to near-zero if I'm not mistaken. :-) Our anti-bloat extremists will be very happy. > src/env/__libc_start_main.c:9:13: warning: function 'dummy' is not needed and will not be emitted [-Wunneeded-internal-declaration] > static void dummy() {} > ^ > 1 warning generated. Another false positive. > In file included from src/errno/strerror.c:7: > src/errno/__strerror.h:100:1: warning: implicit conversion from 'int' to 'unsigned char' changes value from 1133 to 109 [-Wconstant-conversion] > 1133, > ^~~~ > 1 warning generated. Again, I'm confused why we're getting this one. > src/regex/regcomp.c:3123:18: warning: explicitly assigning a variable of type 'reg_errcode_t' (aka 'int') to itself [-Wself-assign] > do { errcode = errcode; if ( 1) goto error_exit; } while ( 0); > ~~~~~~~ ^ ~~~~~~~ This is gratuitous and comes from a macro expansion. The rest are more duplicates of the weak alias false positive (unused static functions). Rich