Ivan Skytte Jørgensen wrote:
> On Monday 15 October 2007 15:41:07 Andrew Hood wrote:
> 
>>Ivan Skytte Jørgensen wrote:
>>
>>>I gave the I also gave it a spin with Flexelint 8.0w. It complains a lot,
>>>and I have included the most interesting warnings. 
> 
> [snip]
> 
>>>The interesting warnings are:
>>
>>==snip==
>>
>>I went through the entire source over the weekend with CFLAGS containing
>>"-Wuninitialized -W -Wall -Werror" ( I normally only use -Wuninitialized ).
>>
>>At a rough guess there are a couple of thousand lines that require
>>fixing. I can't CVS diff the source because it wasn't a clean checkout.
>>
>>Does this qualify as an "interesting thing"?
> 
> 
> Probably. What did you find of genuine errors? The problem with aggressive 
> warning generation is the number of false positives in mature code.

Most of the errors are unused args as noted by Scott in another reply.
I've put -D_U_="__attribute__((unused))" in CFLAGS, and then added _U_
to these args, as is done in many other projects. _U_ can be defined as
empty or appropriately for other compilers.

The next most common were comparisons between signed and unsigned.

There was one incomplete initialiser, where I'd guess the struct had
been changed but not the list.

There may have been a few others.

> On a related note, GCC has improved its warning generation a lot during the 
> recent years. It still lacks laser-precision warning suppression, but it is a 
> vast improvement over, say, version 2.95.3, which I am forced to use on a 
> daily basis. The HP compiler ACC B.06.x series isn't bad either. It is 
> starting to show value tracking, but so far it has not found a genuine error 
> (yet). ACCs warning suppression is essentially non-existant.

I have various versions of gcc. I did this test with 2.95.3 and can see
if 3.4.6 or 4.1.2 make any significant difference.

Many of the compilers people use are not C99 compliant, so we should not
make any C99 specific changes. I've had to get OpenMotif to fix at least
one C99ism in their 2.x series code.

-- 
There's no point in being grown up if you can't be childish sometimes.
                -- Dr. Who
-- 
NEdit Develop mailing list - [email protected]
http://www.nedit.org/mailman/listinfo/develop

Reply via email to