Debian Codegraph @

gcc/testsuite/gcc.dg/analyzer/pipe-void-return.c

raw
1 /* { dg-additional-options "-fno-analyzer-suppress-followups" } */
2
3 extern void pipe(int pipefd[2]);
4 extern int close(int fd);
5
6 void
7 test_unchecked (void)
8 {
9 int fds[2];
10 pipe (fds); /* { dg-message "when 'pipe' fails" } */
11 close (fds[0]); /* { dg-warning "use of uninitialized value 'fds\\\[0\\\]'" } */
12 close (fds[1]); /* { dg-warning "use of uninitialized value 'fds\\\[1\\\]'" } */
13 }