Fix unused warnings.
[official-gcc/graphite-test-results.git] / gcc / testsuite / gcc.c-torture / compile / 991026-2.c
blobbb358f411ec9c5ad872eb81f877efc9548cf6982
1 typedef int __pid_t;
2 extern __pid_t fork (void) ;
3 extern int printf (__const char *__restrict __format, ...) ;
4 extern char *strerror (int __errnum) ;
5 extern int errno;
6 extern int *__errno_location (void) __attribute__ ((__const__));
7 extern void _exit (int __status) __attribute__ ((__noreturn__));
8 extern void exit (int __status) __attribute__ ((__noreturn__));
9 extern int close (int __fd) ;
10 extern int dup (int __fd) ;
11 extern int open (__const char *__file, int __oflag, ...) ;
14 char myname[]="foo";
16 detach()
18 switch(fork()) {
19 case -1:
20 printf("%s: Error: fork - %s\n",myname, strerror((*__errno_location ()) ));
21 exit(255);
22 case 0:
24 close(0);
25 close(1);
26 close(2);
27 dup(dup(open("/dev/null", 02 )));
28 return;
29 default:
31 _exit(0);