aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/analyzer/fd-uninit-1.c
blob: 1084d1b4da28071a09a5500f79fe3c07d677b37a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
/* Verify that we check for uninitialized values passed to functions
   that we have special-cased state-machine handling for.  */

int dup (int old_fd);
int not_dup (int old_fd);

int
test_1 ()
{
  int m;
  return dup (m); /* { dg-warning "use of uninitialized value 'm'" "uninit" } */
}

int
test_2 ()
{
  int m;
  return not_dup (m); /* { dg-warning "use of uninitialized value 'm'" } */
}