[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
| 
Re: [cdt-dev] compiler warning policy
 | 
After taking a second look at the effectiveness of the warning some 
weeks ago, I came to an agreement with those that disagreed with my 
original position. After enabling the warning in a number of projects 
and addressing each warning, I found that the true positives far 
outweighed the false positives, and that in most cases, I was able to 
re-structure the code to quiet the false positives in a sensible way. 
There were a few cases where, yes, I had to make a redundant check, 
but the annoyance of that was eclipsed by knowing that the warning 
allowed me to fix quite a number of real NPE situations.
John
At 07:23 PM 9/11/2010, kirk.beitz@xxxxxxxxx wrote:
my point is really that for this to be more useful and less 
annoying, the compiler not only has to be smarter about figuring out 
when a potential null may not occur, but also when function calls 
may return null and then be immediately dereferenced.