On Sun, Dec 13, 2009 at 2:45 PM, Albert ARIBAUD <albert.arib...@free.fr> wrote:
> Ø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.

Is there an open source lint tool that's worthwhile to use?

Did you try splint on OpenOCD?

>> 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". :/


There are legitimate uses: e.g. recompiling an *old* version with
a newer compiler can yield warnings that are fixed in latest
version of openocd.



-- 
Øyvind Harboe
US toll free 1-866-980-3434 / International +47 51 63 25 00
http://www.zylin.com/zy1000.html
ARM7 ARM9 ARM11 XScale Cortex
JTAG debugger and flash programmer
_______________________________________________
Openocd-development mailing list
Openocd-development@lists.berlios.de
https://lists.berlios.de/mailman/listinfo/openocd-development

Reply via email to