|
|
Message-ID: <20140404204701.GO26358@brightrain.aerifal.cx>
Date: Fri, 4 Apr 2014 16:47:01 -0400
From: Rich Felker <dalias@...ifal.cx>
To: musl@...ts.openwall.com
Subject: Re: build with clang-3.4 warnings report
On Fri, Apr 04, 2014 at 09:59:22PM +0200, Abdoulaye Walsimou Gaye wrote:
> 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,
> ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> 1 warning generated.
This looks like an actual bug. If these two members overlap, we can't
store both.
> src/ctype/towctrans.c:239:3: warning: add explicit braces to avoid dangling else [-Wdangling-else]
> else return wc + 0x2d00 - 0x10a0;
> ^
> src/ctype/towctrans.c:242:3: warning: add explicit braces to avoid dangling else [-Wdangling-else]
> else return wc + 0x10a0 - 0x2d00;
> ^
> 2 warnings generated.
Bogus, so this looks like one we should disable from configure.
> 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.
I thought this was fixed (and only on mips). The conversion in the
current source is not implicit but explicit.
> src/internal/shgetc.c:16:15: warning: '&&' within '||' [-Wlogical-op-parentheses]
> if (f->shlim && f->shcnt >= f->shlim || (c=__uflow(f)) < 0) {
> ~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~ ~~
> src/internal/shgetc.c:16:15: note: place parentheses around the '&&' expression to silence this warning
> if (f->shlim && f->shcnt >= f->shlim || (c=__uflow(f)) < 0) {
> ^
> ( )
> 1 warning generated.
Bogus.
> In file included from src/ipc/semtimedop.c:2:
> In file included from ./include/sys/sem.h:28:
> ../include/endian.h:32:25: warning: '&' within '|' [-Wbitwise-op-parentheses]
> return __x>>24 | __x>>8&0xff00 | __x<<8&0xff0000 | __x<<24;
> ~ ~~~~~~^~~~~~~
> ../include/endian.h:32:25: note: place parentheses around the '&' expression to silence this warning
> return __x>>24 | __x>>8&0xff00 | __x<<8&0xff0000 | __x<<24;
> ^
> ( )
> ../include/endian.h:32:41: warning: '&' within '|' [-Wbitwise-op-parentheses]
> return __x>>24 | __x>>8&0xff00 | __x<<8&0xff0000 | __x<<24;
> ~ ~~~~~~^~~~~~~~~
> ../include/endian.h:32:41: note: place parentheses around the '&' expression to silence this warning
> return __x>>24 | __x>>8&0xff00 | __x<<8&0xff0000 | __x<<24;
> ^
> ( )
> ../include/endian.h:37:23: warning: operator '<<' has lower precedence than '+'; '+' will be evaluated first [-Wshift-op-parentheses]
> return __bswap32(__x)+0ULL<<32 | __bswap32(__x>>32);
> ~~~~~~~~~~~~~~^~~~~~~
> ../include/endian.h:37:23: note: place parentheses around the '+' expression to silence this warning
> return __bswap32(__x)+0ULL<<32 | __bswap32(__x>>32);
> ^
> ( )
> 3 warnings generated.
Another bogus one. Does -Wno-parentheses fail to silence these?
> src/locale/iconv.c:323:7: warning: adding 'unsigned int' to a string does not append to the string [-Wstring-plus-int]
> +c%256}, &(size_t){4},
> ^~~~~~
> src/locale/iconv.c:323:7: note: use array indexing to silence this warning
> +c%256}, &(size_t){4},
> ^
Another bogus one.
> src/math/fma.c:334:15: warning: pragma STDC FENV_ACCESS ON is not supported, ignoring pragma [-Wunknown-pragmas]
> #pragma STDC FENV_ACCESS ON
> ^
> 1 warning generated.
We have -Wno-unknown-pragmas... so why is this appearing?
> src/regex/regcomp.c:2659:24: warning: equality comparison with extraneous parentheses [-Wparentheses-equality]
> if (((lit)->code_min == -4))
> ~~~~~~~~~~~~~~~~^~~~~
> src/regex/regcomp.c:2659:24: note: remove extraneous parentheses around the comparison to silence this warning
> if (((lit)->code_min == -4))
> ~ ^ ~
> src/regex/regcomp.c:2659:24: note: use '=' to turn this equality comparison into an assignment
> if (((lit)->code_min == -4))
> ^~
> =
> 1 warning generated.
Another one, but these parens could be removed. I think they're a
leftover from removing other conditions in the same if statement.
> src/time/localtime_r.c:9:9: warning: comparison of constant -67908586910515200 with expression of type 'const time_t' (aka 'const long') is always false [-Wtautological-constant-out-of-range-compare]
> if (*t < (-1-0x7fffffff) * 31622400LL || *t > 0x7fffffff * 31622400LL) {
> ~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> src/time/localtime_r.c:9:46: warning: comparison of constant 67908586878892800 with expression of type 'const time_t' (aka 'const long') is always false [-Wtautological-constant-out-of-range-compare]
> if (*t < (-1-0x7fffffff) * 31622400LL || *t > 0x7fffffff * 31622400LL) {
> ~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~
> 2 warnings generated.
More bogus. It's not tautological; it's arch-specific whether it can
be true or not.
The second half of the email was all duplicates from the shared
library build.
Rich
Powered by blists - more mailing lists
Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.