> From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of > Charles Johnson > Sent: Tuesday, 22 April, 2008 16:48 > > I need a little help in using the /[EMAIL PROTECTED]@*/ annotation. I > can't seem to find usage in the documentation. Here is the > code snippet: > > typedef struct { > FILE *logfp; > int Threshold; > int FacilityList; > } mlog_t; > > mlog_t mlog = { (FILE *)NULL,0,0xffffffff };
Put the annotation before the declaration of the pointer-type field that can be null: ----- #include <stdio.h> typedef struct { /[EMAIL PROTECTED]@*/ FILE *foo; int bar; int baz; } foo_t; foo_t foo = { NULL, 0, 0xffffffff }; ----- That suppresses the null-assignment warning and parses successfully. (I determined this by experimentation; I don't know if it's documented anywhere.) -- Michael Wojcik Principal Software Systems Developer, Micro Focus _______________________________________________ splint-discuss mailing list splint-discuss@mail.cs.virginia.edu http://www.cs.virginia.edu/mailman/listinfo/splint-discuss