Various minor fixes for compiler/linter (other then splint itself) warnings.
[splint-patched.git] / test / clauses.c
blobd52dcaa6395d73eefd7d0aab03c6db5ada82b3af
1 int f(/*@only@*/ int *x, /*@only@*/ int *y, /*@only@*/ int *z, /*@only@*/ int *z2)
3 if (3 > 4)
5 free (x);
6 } /* 1. Variable x is released in true branch, but live in continuation. */
8 while (3 < 4)
10 free (y);
11 } /* 2. Variable y is released in while body, but live if loop is not taken. */
13 if (3 > 4)
15 free (z);
17 else
19 free (z2);
20 } /* 3. Variable z2 is released in false branch, but live in true branch. */
21 /* 4. Variable z is released in true branch, but live in false branch. */
22 return 3;