[PATCH xserver 1/4] Replace deprecated CWARNFLAGS with BASE_CFLAGS and NO_STRICT_ALIASING_CFLAG

Jeremy Huddleston jeremyhu at apple.com
Sat Dec 10 10:13:37 PST 2011


On Dec 9, 2011, at 8:06 PM, Alan Coopersmith wrote:

> On 12/09/11 15:10, Keith Packard wrote:
>> On Fri, 09 Dec 2011 13:33:17 -0500, Gaetan Nadon<memsize at videotron.ca>  wrote:
>> 
>>> Thanks for checking, it's the first time we use these new 1.16 macros.
>> 
>> Wow. Those are sure chatty. Are you sure we want all of these new
>> warnings? -Winline doesn't seem useful to me. Also a lot of noise from
>> -Wredundant-decls and -Wshadow.
> 
> Now you can see why you've gotten so many warning cleanup patches since
> Jeremy added the additional flags to the defaults and some of us pulled
> the git master and started building with them.
> 
> I agree that -Winline doesn't seem that useful unless you're in the middle
> of doing performance tuning and needing that level of detail - mostly it
> seems to tell me that gcc doesn't support inlining vararg functions like
> those xtrans uses for printing debug messages.

Well I selected a set that I felt gave the best chance of providing useful information for telling the developer that they might not be doing what they intended.  I made the most egregious cases where something is definitely wrong -Werror= and others simply -W.  If you feel some are too noisy right now, perhaps we should comment them out until the codebase has gotten spit-shined a bit more.  I'm willing to do this cleanup but have been a bit occupied by my primary responsibilities at Apple and need some free time to work on it.

FWIW, adding these warnings has revealed "real" bugs that may have otherwise gone unnoticed.

Re: -Winline specifically since you brought it up.  If the intent is to make an inline function for performance reasons, and that function actually can't be inlined, I'd think we'd want to know.  Specifically regarding xtrans, perhaps we should just make those vararg functions !inline.




More information about the xorg-devel mailing list