mirror of
https://sourceware.org/git/glibc.git
synced 2024-11-26 23:10:06 +00:00
* 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.
This commit is contained in:
parent
41b64fc4c1
commit
bf4de8f367
@ -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;
|
||||
}
|
||||
|
@ -38,5 +38,5 @@ main (int argc, char *argv[])
|
||||
|
||||
|
||||
closedir (dirp);
|
||||
exit(0);
|
||||
return 0;
|
||||
}
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -222,5 +222,5 @@ main (int argc, char *argv[])
|
||||
exit (1);
|
||||
}
|
||||
|
||||
exit (0);
|
||||
return 0;
|
||||
}
|
||||
|
@ -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;
|
||||
}
|
||||
|
2
io/pwd.c
2
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);
|
||||
}
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -550,7 +550,7 @@ main (int argc, char *argv[])
|
||||
|
||||
gdImageDestroy (im_out);
|
||||
|
||||
exit (0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
@ -32,7 +32,8 @@ main (void)
|
||||
if (waitpid (0, &status, 0) != pid
|
||||
|| !WIFEXITED (status) || WEXITSTATUS (status) != NR)
|
||||
exit (1);
|
||||
exit (0);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -77,5 +77,5 @@ main (void)
|
||||
++errors ;
|
||||
}
|
||||
|
||||
exit (errors != 0);
|
||||
return errors != 0;
|
||||
}
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -39,5 +39,6 @@ main (void)
|
||||
}
|
||||
|
||||
puts ("Got a signal. Test succeeded.");
|
||||
exit (EXIT_SUCCESS);
|
||||
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
|
@ -24,5 +24,5 @@ main (int argc, char *argv[])
|
||||
for (i = 0; i < 500; i++)
|
||||
remove (files[i]);
|
||||
|
||||
exit (0);
|
||||
return 0;
|
||||
}
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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));
|
||||
}
|
||||
|
@ -117,5 +117,6 @@ main (void)
|
||||
if (! tst_locale)
|
||||
break;
|
||||
}
|
||||
exit (result);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
@ -305,5 +305,5 @@ main (int argc, char **argv)
|
||||
}
|
||||
}
|
||||
|
||||
exit (result);
|
||||
return result;
|
||||
}
|
||||
|
@ -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)
|
||||
|
@ -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
|
||||
|
@ -169,7 +169,7 @@ main (void)
|
||||
}
|
||||
}
|
||||
|
||||
exit (status ? EXIT_FAILURE : EXIT_SUCCESS);
|
||||
return status ? EXIT_FAILURE : EXIT_SUCCESS;
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -157,7 +157,7 @@ main (void)
|
||||
}
|
||||
}
|
||||
|
||||
exit (status ? EXIT_FAILURE : EXIT_SUCCESS);
|
||||
return status ? EXIT_FAILURE : EXIT_SUCCESS;
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -63,5 +63,5 @@ main (void)
|
||||
}
|
||||
}
|
||||
|
||||
exit (errors);
|
||||
return errors;
|
||||
}
|
||||
|
@ -27,5 +27,5 @@ main (void)
|
||||
exit (1);
|
||||
}
|
||||
|
||||
exit (0);
|
||||
return 0;
|
||||
}
|
||||
|
@ -13,7 +13,7 @@ main (void)
|
||||
|
||||
strpbrk (b++, "");
|
||||
if (b != a + 1)
|
||||
exit (1);
|
||||
return 1;
|
||||
|
||||
exit (0);
|
||||
return 0;
|
||||
}
|
||||
|
@ -13,7 +13,7 @@ main (void)
|
||||
|
||||
strspn (b++, "");
|
||||
if (b != a + 1)
|
||||
exit (1);
|
||||
return 1;
|
||||
|
||||
exit (0);
|
||||
return 0;
|
||||
}
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -41,5 +41,5 @@ main (int argc, char *argv[])
|
||||
for (i = 0; i < count; ++i)
|
||||
puts (str[i]);
|
||||
|
||||
exit (EXIT_SUCCESS);
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
@ -84,5 +84,5 @@ main (int argc, char *argv[])
|
||||
|
||||
if (result == 0)
|
||||
puts ("All test successful!");
|
||||
exit (result);
|
||||
return result != 0;
|
||||
}
|
||||
|
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user