[splint-discuss] Loops over pointers
akarl
fusionfive at comhem.se
Wed Aug 24 20:27:23 EDT 2005
Tommy Pettersson wrote:
> On Wed, Aug 24, 2005 at 03:17:36PM +0200, akarl wrote:
>
>>By default Splint also complains about statements like
>>
>> if (n) { ... }
>>
>>where n is an int, whereas
>>
>> if (n != 0) { ... }
>>
>>is OK. This behavior can be changed with the predboolint option. Maybe
>>we are looking for a predboolptr option here.
>
>
> The pred-bool-ptr option exists and muffles
>
> if (ptr)
>
> and
>
> if (!ptr)
>
> but it doesn't convince splint that ptr really is or isn't
> NULL for some mysterious reason. Bug or not, I think it would
> be great if it did so, although thinking won't change splint...
OK, then it's most certainly a bug.
August
More information about the splint-discuss
mailing list