diff options
author | Andreas Jaeger <aj@suse.de> | 2000-12-31 10:52:32 +0000 |
---|---|---|
committer | Andreas Jaeger <aj@suse.de> | 2000-12-31 10:52:32 +0000 |
commit | bf4de8f3675839e9a6b2b20c1f4a319ad75810c9 (patch) | |
tree | acae60e93e6e3c811cf5e0ebfd87c7aa91dffbbe | |
parent | 41b64fc4c1d8922e92e80abd3354a50b0ecfeb8a (diff) | |
download | glibc-bf4de8f3675839e9a6b2b20c1f4a319ad75810c9.zip glibc-bf4de8f3675839e9a6b2b20c1f4a319ad75810c9.tar.gz glibc-bf4de8f3675839e9a6b2b20c1f4a319ad75810c9.tar.bz2 |
* malloc/memusagestat.c (main): Use return instead of exit to
avoid warning.
* io/pwd.c (main): Likewise.
* iconvdata/tst-table-from.c (main): Likewise.
* ctype/test_ctype.c (main): Likewise.
* setjmp/tst-setjmp.c (main): Likewise.
* signal/tst-signal.c (main): Likewise.
* stdlib/tst-strtol.c (main): Likewise.
* stdlib/tst-strtod.c (main): Likewise.
* stdlib/tst-strtoll.c (main): Likewise.
* stdlib/tst-xpg-basename.c (main): Likewise.
* dirent/tst-seekdir.c (main): Likewise.
* grp/testgrp.c (main): Likewise.
* inet/test_ifindex.c (main): Likewise.
* io/test-utime.c (main): Likewise.
* posix/test-vfork.c (main): Likewise.
* posix/testfnm.c (main): Likewise.
* stdio-common/temptest.c (main): Likewise.
* stdio-common/test_rdwr.c (main): Likewise.
* stdio-common/tst-fileno.c (main): Likewise.
* stdio-common/tst-sscanf.c (main): Likewise.
* stdio-common/tstscanf.c (main): Likewise.
* string/bug-strncat1.c (main): Likewise.
* string/bug-strpbrk1.c (main): Likewise.
* string/bug-strspn1.c (main): Likewise.
* string/test-ffs.c (main): Likewise.
* string/tst-inlcall.c (main): Likewise.
* string/tst-svc.c (main): Likewise.
* timezone/test-tz.c (main): Likewise.
* wctype/test_wcfuncs.c (main): Likewise.
* wctype/test_wctype.c (main): Likewise.
* stdlib/tst-random.c: Add attribute noreturn to fail.
-rw-r--r-- | ctype/test_ctype.c | 4 | ||||
-rw-r--r-- | dirent/tst-seekdir.c | 2 | ||||
-rw-r--r-- | grp/testgrp.c | 2 | ||||
-rw-r--r-- | iconvdata/tst-table-from.c | 2 | ||||
-rw-r--r-- | inet/test_ifindex.c | 4 | ||||
-rw-r--r-- | io/pwd.c | 2 | ||||
-rw-r--r-- | io/test-utime.c | 26 | ||||
-rw-r--r-- | malloc/memusagestat.c | 2 | ||||
-rw-r--r-- | posix/test-vfork.c | 3 | ||||
-rw-r--r-- | posix/testfnm.c | 2 | ||||
-rw-r--r-- | setjmp/tst-setjmp.c | 3 | ||||
-rw-r--r-- | signal/tst-signal.c | 3 | ||||
-rw-r--r-- | stdio-common/temptest.c | 2 | ||||
-rw-r--r-- | stdio-common/test_rdwr.c | 4 | ||||
-rw-r--r-- | stdio-common/tst-fileno.c | 9 | ||||
-rw-r--r-- | stdio-common/tst-sscanf.c | 3 | ||||
-rw-r--r-- | stdio-common/tstscanf.c | 2 | ||||
-rw-r--r-- | stdlib/tst-random.c | 2 | ||||
-rw-r--r-- | stdlib/tst-strtod.c | 2 | ||||
-rw-r--r-- | stdlib/tst-strtol.c | 2 | ||||
-rw-r--r-- | stdlib/tst-strtoll.c | 2 | ||||
-rw-r--r-- | stdlib/tst-xpg-basename.c | 2 | ||||
-rw-r--r-- | string/bug-strncat1.c | 2 | ||||
-rw-r--r-- | string/bug-strpbrk1.c | 4 | ||||
-rw-r--r-- | string/bug-strspn1.c | 4 | ||||
-rw-r--r-- | string/test-ffs.c | 4 | ||||
-rw-r--r-- | string/tst-inlcall.c | 6 | ||||
-rw-r--r-- | string/tst-svc.c | 2 | ||||
-rw-r--r-- | timezone/test-tz.c | 4 | ||||
-rw-r--r-- | wctype/test_wcfuncs.c | 2 | ||||
-rw-r--r-- | wctype/test_wctype.c | 4 |
31 files changed, 61 insertions, 56 deletions
diff --git a/ctype/test_ctype.c b/ctype/test_ctype.c index a1f7249..ebebe8f 100644 --- a/ctype/test_ctype.c +++ b/ctype/test_ctype.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1991, 1994, 1996, 1997 Free Software Foundation, Inc. +/* Copyright (C) 1991, 1994, 1996, 1997, 2000 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -97,5 +97,5 @@ main (int argc, char **argv) TRYEM; #undef TRY - exit (lose ? EXIT_FAILURE : EXIT_SUCCESS); + return lose ? EXIT_FAILURE : EXIT_SUCCESS; } diff --git a/dirent/tst-seekdir.c b/dirent/tst-seekdir.c index 5a5c7fd..f4d99ae 100644 --- a/dirent/tst-seekdir.c +++ b/dirent/tst-seekdir.c @@ -38,5 +38,5 @@ main (int argc, char *argv[]) closedir (dirp); - exit(0); + return 0; } diff --git a/grp/testgrp.c b/grp/testgrp.c index 62ba4e4..892cfaa 100644 --- a/grp/testgrp.c +++ b/grp/testgrp.c @@ -37,5 +37,5 @@ main (int argc, char *argv[]) } } - exit (my_passwd && my_group ? EXIT_SUCCESS : EXIT_FAILURE); + return my_passwd && my_group ? EXIT_SUCCESS : EXIT_FAILURE; } diff --git a/iconvdata/tst-table-from.c b/iconvdata/tst-table-from.c index fb4934f..5a2fa9d 100644 --- a/iconvdata/tst-table-from.c +++ b/iconvdata/tst-table-from.c @@ -222,5 +222,5 @@ main (int argc, char *argv[]) exit (1); } - exit (0); + return 0; } diff --git a/inet/test_ifindex.c b/inet/test_ifindex.c index 0441bf0..62a7326 100644 --- a/inet/test_ifindex.c +++ b/inet/test_ifindex.c @@ -1,5 +1,5 @@ /* Test interface name <-> index conversions. - Copyright (C) 1997 Free Software Foundation, Inc. + Copyright (C) 1997, 2000 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Philip Blundell <Philip.Blundell@pobox.com>. @@ -61,5 +61,5 @@ main (void) failures += result; } if_freenameindex (idx); - exit (failures ? 1 : 0); + return failures ? 1 : 0; } @@ -39,5 +39,5 @@ main (void) free (dir); } - exit (dir == NULL ? EXIT_FAILURE : EXIT_SUCCESS); + return (dir == NULL ? EXIT_FAILURE : EXIT_SUCCESS); } diff --git a/io/test-utime.c b/io/test-utime.c index 8dbbcf9..6828d00 100644 --- a/io/test-utime.c +++ b/io/test-utime.c @@ -37,14 +37,14 @@ main (int argc, char *argv[]) if (tmpnam (file) == 0) { perror ("tmpnam"); - exit (1); + return 1; } fd = creat (file, 0666); if (fd < 0) { perror ("creat"); - exit (1); + return 1; } close (fd); @@ -55,14 +55,14 @@ main (int argc, char *argv[]) { perror ("utime"); remove (file); - exit (1); + return 1; } if (stat (file, &st)) { perror ("stat"); remove (file); - exit (1); + return 1; } /* Test utime with NULL. @@ -73,14 +73,14 @@ main (int argc, char *argv[]) { perror ("time"); remove (file); - exit (1); + return 1; } if (utime (file, NULL)) { perror ("utime NULL"); remove (file); - exit (1); + return 1; } now2 = time (NULL); @@ -88,14 +88,14 @@ main (int argc, char *argv[]) { perror ("time"); remove (file); - exit (1); + return 1; } if (stat (file, &stnow)) { perror ("stat"); remove (file); - exit (1); + return 1; } remove (file); @@ -103,27 +103,27 @@ main (int argc, char *argv[]) if (st.st_mtime != ut.modtime) { printf ("modtime %ld != %ld\n", st.st_mtime, ut.modtime); - exit (1); + return 1; } if (st.st_atime != ut.actime) { printf ("actime %ld != %ld\n", st.st_atime, ut.actime); - exit (1); + return 1; } if (stnow.st_mtime < now1 || stnow.st_mtime > now2) { printf ("modtime %ld <%ld >%ld\n", st.st_mtime, now1, now2); - exit (1); + return 1; } if (stnow.st_atime < now1 || stnow.st_atime > now2) { printf ("actime %ld <%ld >%ld\n", st.st_atime, now1, now2); - exit (1); + return 1; } puts ("Test succeeded."); - exit (0); + return 0; } diff --git a/malloc/memusagestat.c b/malloc/memusagestat.c index 1da0ff0..0b01a1d 100644 --- a/malloc/memusagestat.c +++ b/malloc/memusagestat.c @@ -550,7 +550,7 @@ main (int argc, char *argv[]) gdImageDestroy (im_out); - exit (0); + return 0; } diff --git a/posix/test-vfork.c b/posix/test-vfork.c index 66c17c3..dd2b1c7 100644 --- a/posix/test-vfork.c +++ b/posix/test-vfork.c @@ -32,7 +32,8 @@ main (void) if (waitpid (0, &status, 0) != pid || !WIFEXITED (status) || WEXITSTATUS (status) != NR) exit (1); - exit (0); + + return 0; } void diff --git a/posix/testfnm.c b/posix/testfnm.c index a8b85c5..b735a26 100644 --- a/posix/testfnm.c +++ b/posix/testfnm.c @@ -77,5 +77,5 @@ main (void) ++errors ; } - exit (errors != 0); + return errors != 0; } diff --git a/setjmp/tst-setjmp.c b/setjmp/tst-setjmp.c index 90dac05..c1efca5 100644 --- a/setjmp/tst-setjmp.c +++ b/setjmp/tst-setjmp.c @@ -113,5 +113,6 @@ main (void) puts ("Test FAILED!"); else puts ("Test succeeded!"); - exit (lose ? EXIT_FAILURE : EXIT_SUCCESS); + + return lose ? EXIT_FAILURE : EXIT_SUCCESS; } diff --git a/signal/tst-signal.c b/signal/tst-signal.c index ef792e8..6d31787 100644 --- a/signal/tst-signal.c +++ b/signal/tst-signal.c @@ -39,5 +39,6 @@ main (void) } puts ("Got a signal. Test succeeded."); - exit (EXIT_SUCCESS); + + return EXIT_SUCCESS; } diff --git a/stdio-common/temptest.c b/stdio-common/temptest.c index ec8e179..c8cf852 100644 --- a/stdio-common/temptest.c +++ b/stdio-common/temptest.c @@ -24,5 +24,5 @@ main (int argc, char *argv[]) for (i = 0; i < 500; i++) remove (files[i]); - exit (0); + return 0; } diff --git a/stdio-common/test_rdwr.c b/stdio-common/test_rdwr.c index a3b01b7..477069b 100644 --- a/stdio-common/test_rdwr.c +++ b/stdio-common/test_rdwr.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1991, 1992, 1996, 1997, 1998 Free Software Foundation, Inc. +/* Copyright (C) 1991,1992,1996,1997,1998,2000 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -125,5 +125,5 @@ main (int argc, char **argv) puts ("Test succeeded."); } - exit (lose ? EXIT_FAILURE : EXIT_SUCCESS); + return lose ? EXIT_FAILURE : EXIT_SUCCESS; } diff --git a/stdio-common/tst-fileno.c b/stdio-common/tst-fileno.c index 79c768d..3cc37a9 100644 --- a/stdio-common/tst-fileno.c +++ b/stdio-common/tst-fileno.c @@ -24,14 +24,15 @@ static int check (const char *name, FILE *stream, int fd) { int sfd = fileno (stream); - printf ("(fileno (%s) = %d) %c= %d\n", name, sfd, sfd == fd ? '=' : '!', fd); + printf ("(fileno (%s) = %d) %c= %d\n", name, sfd, + sfd == fd ? '=' : '!', fd); return sfd != fd; } int main (void) { - exit (check ("stdin", stdin, STDIN_FILENO) || - check ("stdout", stdout, STDOUT_FILENO) || - check ("stderr", stderr, STDERR_FILENO)); + return (check ("stdin", stdin, STDIN_FILENO) || + check ("stdout", stdout, STDOUT_FILENO) || + check ("stderr", stderr, STDERR_FILENO)); } diff --git a/stdio-common/tst-sscanf.c b/stdio-common/tst-sscanf.c index c0d3c36..d5a0397 100644 --- a/stdio-common/tst-sscanf.c +++ b/stdio-common/tst-sscanf.c @@ -117,5 +117,6 @@ main (void) if (! tst_locale) break; } - exit (result); + + return result; } diff --git a/stdio-common/tstscanf.c b/stdio-common/tstscanf.c index 6cf5738..827f5ad 100644 --- a/stdio-common/tstscanf.c +++ b/stdio-common/tstscanf.c @@ -305,5 +305,5 @@ main (int argc, char **argv) } } - exit (result); + return result; } diff --git a/stdlib/tst-random.c b/stdlib/tst-random.c index 3453d79..2cc8e9c 100644 --- a/stdlib/tst-random.c +++ b/stdlib/tst-random.c @@ -44,7 +44,7 @@ const int nseq = 3; /* number of test sequences */ const int nrnd = 50; /* length of each test sequence */ const unsigned int seed[3] = { 0x12344321U, 0xEE11DD22U, 0xFEDCBA98 }; -void fail (const char *msg, int s, int i); +void fail (const char *msg, int s, int i) __attribute__ ((__noreturn__)); int main (void) diff --git a/stdlib/tst-strtod.c b/stdlib/tst-strtod.c index ffd3975..01c4542 100644 --- a/stdlib/tst-strtod.c +++ b/stdlib/tst-strtod.c @@ -117,7 +117,7 @@ main (int argc, char ** argv) status |= long_dbl (); - exit (status ? EXIT_FAILURE : EXIT_SUCCESS); + return status ? EXIT_FAILURE : EXIT_SUCCESS; } static void diff --git a/stdlib/tst-strtol.c b/stdlib/tst-strtol.c index ae8fdd4..db065d6 100644 --- a/stdlib/tst-strtol.c +++ b/stdlib/tst-strtol.c @@ -169,7 +169,7 @@ main (void) } } - exit (status ? EXIT_FAILURE : EXIT_SUCCESS); + return status ? EXIT_FAILURE : EXIT_SUCCESS; } static void diff --git a/stdlib/tst-strtoll.c b/stdlib/tst-strtoll.c index 1cc7282..9007488 100644 --- a/stdlib/tst-strtoll.c +++ b/stdlib/tst-strtoll.c @@ -157,7 +157,7 @@ main (void) } } - exit (status ? EXIT_FAILURE : EXIT_SUCCESS); + return status ? EXIT_FAILURE : EXIT_SUCCESS; } static void diff --git a/stdlib/tst-xpg-basename.c b/stdlib/tst-xpg-basename.c index 12067e7..8e2d965 100644 --- a/stdlib/tst-xpg-basename.c +++ b/stdlib/tst-xpg-basename.c @@ -63,5 +63,5 @@ main (void) } } - exit (errors); + return errors; } diff --git a/string/bug-strncat1.c b/string/bug-strncat1.c index 3491aa7..f1b5c37 100644 --- a/string/bug-strncat1.c +++ b/string/bug-strncat1.c @@ -27,5 +27,5 @@ main (void) exit (1); } - exit (0); + return 0; } diff --git a/string/bug-strpbrk1.c b/string/bug-strpbrk1.c index 3fdc930..28238b0 100644 --- a/string/bug-strpbrk1.c +++ b/string/bug-strpbrk1.c @@ -13,7 +13,7 @@ main (void) strpbrk (b++, ""); if (b != a + 1) - exit (1); + return 1; - exit (0); + return 0; } diff --git a/string/bug-strspn1.c b/string/bug-strspn1.c index f637b97..a657baf 100644 --- a/string/bug-strspn1.c +++ b/string/bug-strspn1.c @@ -13,7 +13,7 @@ main (void) strspn (b++, ""); if (b != a + 1) - exit (1); + return 1; - exit (0); + return 0; } diff --git a/string/test-ffs.c b/string/test-ffs.c index 8d46d4e..9bc0796 100644 --- a/string/test-ffs.c +++ b/string/test-ffs.c @@ -29,7 +29,7 @@ main (void) int i; auto void try (int value, int expected); - + void try (int value, int expected) { if (ffs (value) != expected) @@ -52,5 +52,5 @@ main (void) else puts ("Test succeeded."); - exit (failures); + return failures; } diff --git a/string/tst-inlcall.c b/string/tst-inlcall.c index 1e39ee4..3557bff 100644 --- a/string/tst-inlcall.c +++ b/string/tst-inlcall.c @@ -1,5 +1,5 @@ /* Tester for calling inline string functions. - Copyright (C) 1998 Free Software Foundation, Inc. + Copyright (C) 1998, 2000 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -40,7 +40,7 @@ main (void) char buf1[1000]; char *cp; char ch; - + cp = strcpy (buf1, "hello world"); if (strcmp ("hello world", cp++) != 0) { @@ -72,5 +72,5 @@ main (void) status = EXIT_FAILURE; printf ("%d errors.\n", errors); } - exit (status); + return status; } diff --git a/string/tst-svc.c b/string/tst-svc.c index 30a161e..1ee5342 100644 --- a/string/tst-svc.c +++ b/string/tst-svc.c @@ -41,5 +41,5 @@ main (int argc, char *argv[]) for (i = 0; i < count; ++i) puts (str[i]); - exit (EXIT_SUCCESS); + return EXIT_SUCCESS; } diff --git a/timezone/test-tz.c b/timezone/test-tz.c index af37d8a..642b45a 100644 --- a/timezone/test-tz.c +++ b/timezone/test-tz.c @@ -46,11 +46,11 @@ main (int argc, char ** argv) if (errors == 0) { puts ("No errors."); - exit (EXIT_SUCCESS); + return EXIT_SUCCESS; } else { printf ("%d errors.\n", errors); - exit (EXIT_FAILURE); + return EXIT_FAILURE; } } diff --git a/wctype/test_wcfuncs.c b/wctype/test_wcfuncs.c index 61328ea..8e4c282 100644 --- a/wctype/test_wcfuncs.c +++ b/wctype/test_wcfuncs.c @@ -84,5 +84,5 @@ main (int argc, char *argv[]) if (result == 0) puts ("All test successful!"); - exit (result); + return result != 0; } diff --git a/wctype/test_wctype.c b/wctype/test_wctype.c index 1c9bf5a..e1fa45a 100644 --- a/wctype/test_wctype.c +++ b/wctype/test_wctype.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1996, 1997 Free Software Foundation, Inc. +/* Copyright (C) 1996, 1997, 2000 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -79,5 +79,5 @@ main (int argc, char *argv[]) if (result == 0) puts ("All test successful!"); - exit (result); + return result; } |