Øyvind Harboe a écrit :
> On Sun, Dec 13, 2009 at 12:13 AM, Carsten Breuer
> <carstenbreueropen...@textwork.de> wrote:
>> Hi all,
>>
>>
>> "treat warning as errors" (-wall) is a fine thing but sometimes breaks
>> the build..
> 
> This is a good thing to have as a default behavior, we want warning
> fixes fed back. It cleans up the code and finds real bugs.

Reminds me of my teachers' motto regarding C: roughly rendered, it went 
"when the C compiler emits an error, that's because it cannot turn your 
source code into its equivalent executable form. When it emits warning, 
that's because it will not." -- to which experience prompts me to add 
"... and when it emits neither errors nor warnings, that's because your 
source code does not do what you think it does."

-Wall is the minimum that should be applied to source code. Running it 
through Splint (or some other verification tool) would not hurt either.

> You *can* disable error on warnings at configure time.

I personally would never turn this off, and I hate when a codebase 
requires it to be turned off because someone was not bothered enough by 
some warning to fix the root cause. There are places where the policy is 
"when changing code, verify that you dont get *more* warnings than 
before". :/

Amicalement,
-- 
Albert.
_______________________________________________
Openocd-development mailing list
Openocd-development@lists.berlios.de
https://lists.berlios.de/mailman/listinfo/openocd-development

Reply via email to