-Werror now enabled by default

Joseph Myers joseph@codesourcery.com
Wed Dec 10 18:08:00 GMT 2014


On Wed, 10 Dec 2014, Steve Ellcey wrote:

> On Wed, 2014-12-10 at 12:55 +0000, Joseph Myers wrote:
> 
> > In any case, I did test for and fix various warnings on 32-bit x86, ARM, 
> > MIPS and Power during the process of getting the build clean for x86_64 - 
> > even if they aren't 100% clean right now, there are plenty of examples of 
> > fixing warnings to take as a guide for fixing others.
> 
> I am getting a build failure on MIPS.  I think it is because I am
> building with a Top-of-tree GCC.
> 
> 
> malloc.c: In function '__posix_memalign':
> malloc.c:4976:50: error: logical not is only applied to the left hand
> side of comparison [-Werror=logical-not-parentheses]
>        || !powerof2 (alignment / sizeof (void *)) != 0
>                                                   ^
> cc1: all warnings being treated as errors

As I read this code, it's correct but the "!= 0" is redundant and should 
be removed.

-- 
Joseph S. Myers
joseph@codesourcery.com



More information about the Libc-alpha mailing list