[splint-discuss] Using /*@null@*/
John Carter
john.carter at tait.co.nz
Tue Apr 22 16:26:43 PDT 2008
On Tue, 22 Apr 2008, Charles Johnson wrote:
> null.c:8:17: Global mlog.logfp initialized to null value:
> mlog.logfp = (FILE *)NULL
> If I alter the typdef like so:
>
> typedef struct {
> /*@null@*/ FILE *logfp;
> int Threshold;
> int FacilityList;
> } mlog_t;
I would expect that annotation to resolve the 'plaint at null.c:8:17....
> does not make splint happy.
...but cause splint to insist you check that logfp is not NULL before
you use elsewhere. Furthermore, splint may also be whinging about the
fact you are overwriting whatever was in logfp without freeing it.
ie. Splint might be happier.... but splint simply doesn't have a Shiny Happy nature.
John Carter Phone : (64)(3) 358 6639
Tait Electronics Fax : (64)(3) 359 4632
PO Box 1645 Christchurch Email : john.carter at tait.co.nz
New Zealand
More information about the splint-discuss
mailing list