Various minor fixes for compiler/linter (other then splint itself) warnings.
[splint-patched.git] / test / clauses3.c
blobb4d92e95b48c6ed9e24d1d30bb06d091e173523c
1 typedef struct { /*@null@*/ /*@only@*/ int *x; } *st;
3 void f(/*@only@*/ st x)
5 if (x->x != NULL)
7 free (x->x);
8 } ;
10 free (x);
13 void f2 (/*@only@*/ st x)
15 if (x->x != NULL)
17 free (x->x);
19 else
24 free (x);
27 void g (/*@only@*/ st x)
29 if (x->x == NULL)
32 else
34 free (x->x);
37 free (x);
40 void h(/*@only@*/ st x)
42 if (7 > 3)
44 if (x->x != NULL)
46 free (x->x);
48 } /* 1. Storage x->x is released in one path, but live in another. */
50 free (x);
53 void m(/*@only@*/ st x)
55 if (7 > 3)
58 else
60 free (x->x); /* 2. Possibly null storage passed as non-null param: x->x */
61 } /* 3. Storage x->x is released in one path, but live in another. */
63 free (x);