aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/analyzer/errno-pr107777.c
blob: 65687393657b48f68a779ea44d4d7958ab39ce31 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
int *
__errno_location (void);

long int
read (int, void *, unsigned long int);

struct IOBUF {
  int fd;
};

void
do_getline_end_data (struct IOBUF *iop, int tree)
{
  char end_data;

  if (tree)
    *__errno_location () = 0;

  read (iop->fd, &end_data, sizeof end_data);
}