]> andersk Git - splint.git/blame - test/merge.c
Fixed manual csvoverwrite.
[splint.git] / test / merge.c
CommitLineData
885824d3 1/*@null@*/ int *x;
2
3void f1 (void)
4{
5 int *y = x;
6
7 if (3 > 4)
8 {
9 ;
10 }
11 else
12 {
13 x = NULL;
14 if (y != NULL) free (y);
15 }
16 /* y is unuseable...but no error yet */
17}
18
19void f2 (void)
20{
21 int *y = x;
22
23 if (3 > 4)
24 {
25 ;
26 }
27 else
28 {
29 x = NULL;
30 if (y != NULL) free (y);
31 }
32
33 *y = 23; /* 1. Variable y used in inconsistent state */
34} /* 2. Dereference of possibly null pointer y: *y */
35
36void f3 (void)
37{
38 int *y = x;
39
40 if (3 > 4)
41 {
42 ;
43 }
44 else
45 {
46 x = NULL;
47 if (y != NULL) free (y);
48 }
49
50 y = x;
51 *y = 23; /* 3. Dereference of possibly null pointer y: *y */
52}
53
54
55
This page took 0.115774 seconds and 5 git commands to generate.