File: ud.c

package info (click to toggle)
splint 1%3A3.1.2%2Bdfsg-5
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, sid, trixie
  • size: 21,004 kB
  • sloc: ansic: 150,869; yacc: 3,465; sh: 3,034; makefile: 2,157; lex: 412
file content (69 lines) | stat: -rw-r--r-- 783 bytes parent folder | download | duplicates (10)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
int g;

int f(int a, int b)
{
  int x, y, z, z2, z3, z4, z5, z6;

  x = a; /* okay */
  x = y; /* bad */
  y = b; /* okay */
  z = z; /* bad */
  z = g; /* okay */

  if (z == g)
      z2 = 3;
  else
      z2 = 4;

  x = z2; /* okay */

  if (z == g)
    z3 = 3;
  else
    z4 = 4;

  x = z3; /* bad */
  x = z4; /* bad */

  if (z == g)
    z6 = 4;

  x = z6; /* bad */

  if (z == g)
    {
      int i, j;
      
      i = x;  /* okay */
      i = j;  /* bad */
      z2 = i; /* okay */
      z3 = i; /* okay */
    }
  else
    {
      int i, j;

      {
	int m;

	j = i;  /* bad */
	i = z5; /* bad */
	z3 = j; /* okay */
	m = x;
      }
    }
  
  x = z5; /* bad */
  x = z3; /* okay */

  if (x == z3)
    {
      z4 = 7;
    }

  x = z4; /* < not reported> */
  return 5;
}