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, 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


I am not sure how we should rewrite this statement.  I can fix
the warning/error by changing:

	!powerof2 (alignment / sizeof (void *)) != 0

to
	(!powerof2 (alignment / sizeof (void *))) != 0

but isn't that just equivalent to:

	powerof2 (alignment / sizeof (void *)) == 0

Steve Ellcey
sellcey@imgtec.com


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