> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] On Behalf Of 
> Michael Wojcik
> Sent: Tuesday, 22 April, 2008 18:17
> 
> 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.

Hmm. I missed the statement in your initial note that said you tried
this and it "does not make splint happy". What didn't work? In my tests
that properly annotated the pointer as allowing a null value.

-- 
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

Reply via email to