[splint-discuss] Splint-3.1.2 bugs - Mudflap

Derek M Jones derek at knosof.co.uk
Fri Aug 1 04:50:22 PDT 2008


Michael,

>>> -  struct operation op;
>>> +  struct operation op = {0,0,0,0,0};
>> This adds extra runtime overhead, but clearly does not fix 
>> any real bug, unlike the other kinds of changes provided.
> 
> It's also unnecessarily verbose, since:
> 
> 	struct operation op = {0};
> 
> will initialize all members of op appropriately...

Verbosity (redundancy) has its uses.  In this case it provides
the opportunity for tools to check whether the number of fields
expected by the developer is the same as the number of fields
that appear in the code.

-- 
Derek M. Jones                         tel: +44 (0) 1252 520 667
Knowledge Software Ltd                 mailto:derek at knosof.co.uk
Source code analysis                   http://www.knosof.co.uk


More information about the splint-discuss mailing list