File: ud2.c

package info (click to toggle)
splint 3.1.1-4
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 13,480 kB
  • ctags: 14,810
  • sloc: ansic: 147,834; yacc: 3,450; sh: 3,027; makefile: 2,187; lex: 411
file content (24 lines) | stat: -rw-r--r-- 372 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
void g (void)
{
  char *x;
  char **y;

  f1(&x); 
  printf("%s\n", x); 

  f1(y); /* 1. Unallocated storage y passed as out parameter: y */
  printf("%s\n", *y);
}

void h (void)
{
  int z;
  char *x;
  char **y;

  f3 (&z); /* okay! */
  f2 (&x); /* 2. Value &x used before definition, */
  printf ("%s\n", x);  

  f2 (y);  /* 3. Variable y used before definition */
}