]> andersk Git - splint.git/blob - test/metastate/file4.c
*** empty log message ***
[splint.git] / test / metastate / file4.c
1 static void checkOpen (/*@open@*/ /*@null@*/ FILE *);
2 static void checkClosed (/*@closed@*/ /*@null@*/ FILE *);
3
4 void passOpen (/*@open@*/ FILE *f)
5 {
6   (void) fputc (3, f);
7 } /* okay, still open */
8
9 int main (void)
10 {
11   FILE *fle = NULL;
12   char s[10];
13
14   checkClosed (fle); /* okay */
15   checkOpen (fle); /* error */
16
17   fle = fopen ("test", "r");
18
19   if (fle == NULL) 
20     {
21       return 0;
22     }
23
24   passOpen (fle);
25   (void) fclose (fle);
26
27   return 0; 
28
29
This page took 0.037981 seconds and 5 git commands to generate.