This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: -Werror now enabled by default


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]