]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
* malloc/memusagestat.c (main): Use return instead of exit to
authorAndreas Jaeger <aj@suse.de>
Sun, 31 Dec 2000 10:52:32 +0000 (10:52 +0000)
committerAndreas Jaeger <aj@suse.de>
Sun, 31 Dec 2000 10:52:32 +0000 (10:52 +0000)
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.

31 files changed:
ctype/test_ctype.c
dirent/tst-seekdir.c
grp/testgrp.c
iconvdata/tst-table-from.c
inet/test_ifindex.c
io/pwd.c
io/test-utime.c
malloc/memusagestat.c
posix/test-vfork.c
posix/testfnm.c
setjmp/tst-setjmp.c
signal/tst-signal.c
stdio-common/temptest.c
stdio-common/test_rdwr.c
stdio-common/tst-fileno.c
stdio-common/tst-sscanf.c
stdio-common/tstscanf.c
stdlib/tst-random.c
stdlib/tst-strtod.c
stdlib/tst-strtol.c
stdlib/tst-strtoll.c
stdlib/tst-xpg-basename.c
string/bug-strncat1.c
string/bug-strpbrk1.c
string/bug-strspn1.c
string/test-ffs.c
string/tst-inlcall.c
string/tst-svc.c
timezone/test-tz.c
wctype/test_wcfuncs.c
wctype/test_wctype.c

index a1f72492ebd826f5b52adc6084f03c73d3592c24..ebebe8f297d387310a47b167ed902c5b9eb78ffd 100644 (file)
@@ -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;
 }
index 5a5c7fdd36e1cfa50d85b5080789d48476950cdc..f4d99ae6326f7a64a64545f07344aea6b6b05851 100644 (file)
@@ -38,5 +38,5 @@ main (int argc, char *argv[])
 
 
   closedir (dirp);
-  exit(0);
+  return 0;
 }
index 62ba4e4a6248bfac8e69199fa50200c44622182d..892cfaaa21529be443c69677ed93ea89821b1d91 100644 (file)
@@ -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;
 }
index fb4934f0deef6ce41a4a78e514f5036594853c5a..5a2fa9d47a4d44b84a071ee564aa950977a7969e 100644 (file)
@@ -222,5 +222,5 @@ main (int argc, char *argv[])
       exit (1);
     }
 
-  exit (0);
+  return 0;
 }
index 0441bf0feb3cedf5303f475079a0da34aa323d7f..62a7326b9e96cdac89c756377d5dd51bc6d1361b 100644 (file)
@@ -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;
 }
index 21f4e5154181d6abc9c83a616f05c7dc27002e4d..1624dc49a3dc16bada46b7829b47b8ba775bf0db 100644 (file)
--- a/io/pwd.c
+++ b/io/pwd.c
@@ -39,5 +39,5 @@ main (void)
       free (dir);
     }
 
-  exit (dir == NULL ? EXIT_FAILURE : EXIT_SUCCESS);
+  return (dir == NULL ? EXIT_FAILURE : EXIT_SUCCESS);
 }
index 8dbbcf990d3b90075253a3f2756f701b30a37741..6828d005813e21bceae4d2aab626d81a7e71bfe4 100644 (file)
@@ -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;
 }
index 1da0ff0ce930aed3c9dbd22e894c9248e8b4c9ee..0b01a1d6b5a7a03cb6ccd0d63417d480b8276730 100644 (file)
@@ -550,7 +550,7 @@ main (int argc, char *argv[])
 
   gdImageDestroy (im_out);
 
-  exit (0);
+  return 0;
 }
 
 
index 66c17c3d901255d008db99b6f9fb7917dc524b52..dd2b1c77277a36d45e9aab554bf82036373b933c 100644 (file)
@@ -32,7 +32,8 @@ main (void)
   if (waitpid (0, &status, 0) != pid
       || !WIFEXITED (status) || WEXITSTATUS (status) != NR)
     exit (1);
-  exit (0);
+
+  return 0;
 }
 
 void
index a8b85c56adf8e5dad4fd5ffb326a7f98feba37b4..b735a265792b30e40046715cf1fbeb21f8927985 100644 (file)
@@ -77,5 +77,5 @@ main (void)
        ++errors ;
     }
 
-  exit (errors != 0);
+  return errors != 0;
 }
index 90dac0585c97ae227241c47328fd8cba2690dcc8..c1efca54106af50aa911dd01852a931b8307885d 100644 (file)
@@ -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;
 }
index ef792e8cbf08e2ebde6f037fbc118d8134a930b9..6d3178792a7e6b69ca19080d14a5116634f3a170 100644 (file)
@@ -39,5 +39,6 @@ main (void)
     }
 
   puts ("Got a signal.  Test succeeded.");
-  exit (EXIT_SUCCESS);
+
+  return EXIT_SUCCESS;
 }
index ec8e179f03b94930f0a1253480451459e6dbd908..c8cf8529f1e02ff53da9eb2158108693cc9d5400 100644 (file)
@@ -24,5 +24,5 @@ main (int argc, char *argv[])
   for (i = 0; i < 500; i++)
     remove (files[i]);
 
-  exit (0);
+  return 0;
 }
index a3b01b7c7cef1cfd89d91ea6401b6916d51f18cd..477069bb5a86ed835ab284326b08ea238ab4d174 100644 (file)
@@ -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;
 }
index 79c768d732983a5248c57308f458575e0b964498..3cc37a98762a8ca17c29c8bb8152c5e69fe53ee7 100644 (file)
@@ -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));
 }
index c0d3c36f4b2bcc76061cde7eb16f4508a926fe98..d5a039755972ed40861a1ec57b56ad4dafa1733a 100644 (file)
@@ -117,5 +117,6 @@ main (void)
       if (! tst_locale)
        break;
     }
-  exit (result);
+
+  return result;
 }
index 6cf57384161b2780120844127fa35baa4326f734..827f5adcc8e2cda4ecb87be4d8d0f2644f601f17 100644 (file)
@@ -305,5 +305,5 @@ main (int argc, char **argv)
       }
   }
 
-  exit (result);
+  return result;
 }
index 3453d794c418d7b8219084213da67b891806cc30..2cc8e9c60c88373e75b7998bb018325886049fb1 100644 (file)
@@ -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)
index ffd397502082dc7d0bf0f6ea885bc2bec4c9d09d..01c454261fbeeb5b9b2c565fa24f2a73c224b912 100644 (file)
@@ -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
index ae8fdd490587cf8c17e5d299b280bd652faa7de4..db065d6f0acb50adce8883c1eb6a4ee1e032a78e 100644 (file)
@@ -169,7 +169,7 @@ main (void)
        }
     }
 
-  exit (status ? EXIT_FAILURE : EXIT_SUCCESS);
+  return status ? EXIT_FAILURE : EXIT_SUCCESS;
 }
 
 static void
index 1cc72823b655f0508f8baff3361264b1ab4e16cd..9007488d80b88f5fb348a629bb1071ca9a56633e 100644 (file)
@@ -157,7 +157,7 @@ main (void)
        }
     }
 
-  exit (status ? EXIT_FAILURE : EXIT_SUCCESS);
+  return status ? EXIT_FAILURE : EXIT_SUCCESS;
 }
 
 static void
index 12067e702d81090089ba7e941a27454eded0b993..8e2d9653943920fdf74d65ac2aa64e7c0d7391b2 100644 (file)
@@ -63,5 +63,5 @@ main (void)
        }
     }
 
-  exit (errors);
+  return errors;
 }
index 3491aa7d1f2f80a4bf4f3f5ef00eb17d112efd9d..f1b5c37c5cd14b96fbb9672486700de22e0a7720 100644 (file)
@@ -27,5 +27,5 @@ main (void)
       exit (1);
     }
 
-  exit (0);
+  return 0;
 }
index 3fdc930c3eed0c1d337bb931d61cc7a32546e6f0..28238b0f50a588ed5719f0fd802a87466eed3871 100644 (file)
@@ -13,7 +13,7 @@ main (void)
 
   strpbrk (b++, "");
   if (b != a + 1)
-    exit (1);
+    return 1;
 
-  exit (0);
+  return 0;
 }
index f637b97ef0b4a4dd181c87d37477cbc9c6dca198..a657bafc43f4b07c3c40660dc715dfefd3f10e69 100644 (file)
@@ -13,7 +13,7 @@ main (void)
 
   strspn (b++, "");
   if (b != a + 1)
-    exit (1);
+    return 1;
 
-  exit (0);
+  return 0;
 }
index 8d46d4e076827a24527c2632f7e151ae8af0fdae..9bc0796a1e7ed88fba9bad231fa6e149c60e0ce4 100644 (file)
@@ -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;
 }
index 1e39ee48706b7cb12a6959452fc26d763461a566..3557bff84fd8596ac6e24e64daa8bb84ee2a536c 100644 (file)
@@ -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;
 }
index 30a161e70a4b21927f6320439bf16aed95d34951..1ee5342aa94ac52e7cc4e5dbbe3e0eea4828b5b6 100644 (file)
@@ -41,5 +41,5 @@ main (int argc, char *argv[])
   for (i = 0; i < count; ++i)
     puts (str[i]);
 
-  exit (EXIT_SUCCESS);
+  return EXIT_SUCCESS;
 }
index af37d8ae6aa6b1dca1472f599bd2bfa1198937d9..642b45a0ed831a3fdb9a0a8517caf10cb880906b 100644 (file)
@@ -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;
     }
 }
index 61328ea22dedf0a25fe158520fae4dc076809c65..8e4c2823b471bc517bb5ca29b903c702b6761a53 100644 (file)
@@ -84,5 +84,5 @@ main (int argc, char *argv[])
 
   if (result == 0)
     puts ("All test successful!");
-  exit (result);
+  return result != 0;
 }
index 1c9bf5aa3be07e367ad5c257ca1ac689250fd26d..e1fa45a1e59f2c22d3fe6aa89a77a3d38ad6e56b 100644 (file)
@@ -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;
 }