From: Rich Felker <dalias@aerifal.cx>
To: musl@lists.openwall.com
Subject: Re: build with clang-3.4 warnings report
Date: Fri, 4 Apr 2014 21:54:43 -0400 [thread overview]
Message-ID: <20140405015443.GU26358@brightrain.aerifal.cx> (raw)
In-Reply-To: <533F56FB.8060509@embtoolkit.org>
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
next prev parent reply other threads:[~2014-04-05 1:54 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-04-04 19:59 Abdoulaye Walsimou Gaye
2014-04-04 20:47 ` Rich Felker
2014-04-05 1:06 ` Abdoulaye Walsimou Gaye
2014-04-05 1:54 ` Rich Felker [this message]
2014-04-05 9:04 ` Jens Gustedt
2014-04-05 9:31 ` Szabolcs Nagy
2014-04-05 13:07 ` Rich Felker
2014-04-05 14:37 ` Jens Gustedt
2014-04-05 16:35 ` Rich Felker
2014-04-05 22:08 ` Jens Gustedt
2014-04-06 1:57 ` Rich Felker
2014-04-06 16:37 ` Jens Gustedt
2014-04-06 16:49 ` Rich Felker
2014-04-07 11:17 ` Oliver Schneider
2014-04-07 17:23 ` Rich Felker
2014-04-07 19:40 ` Abdoulaye Walsimou Gaye
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20140405015443.GU26358@brightrain.aerifal.cx \
--to=dalias@aerifal.cx \
--cc=musl@lists.openwall.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/musl/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).