gcc/testsuite/c-c++-common/analyzer/errno-pr107777.c
raw| 1 | int * |
| 2 | __errno_location (void); |
| 3 | |
| 4 | long int |
| 5 | read (int, void *, unsigned long int); |
| 6 | |
| 7 | struct IOBUF { |
| 8 | int fd; |
| 9 | }; |
| 10 | |
| 11 | void |
| 12 | do_getline_end_data (struct IOBUF *iop, int tree) |
| 13 | { |
| 14 | char end_data; |
| 15 | |
| 16 | if (tree) |
| 17 | *__errno_location () = 0; |
| 18 | |
| 19 | read (iop->fd, &end_data, sizeof end_data); |
| 20 | } |