This is the mail archive of the libc-hacker@sources.redhat.com mailing list for the glibc project.
Note that libc-hacker is a closed list. You may look at the archives of this list, but subscription and posting are not open.
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
The appended patch fixes all "no previous prototype" warnings while
running `make check'.
Ok to commit?
Andreas
2000-12-27 Andreas Jaeger <aj@suse.de>
* setjmp/tst-setjmp.c: Make local functions static.
* setjmp/jmpbug.c: Likewise.
* signal/tst-signal.c: Likewise.
* stdio-common/tfformat.c: Likewise.
* string/tst-svc.c: Likewise.
* time/clocktest.c: Likewise.
* time/tst-getdate.c: Likewise.
* dirent/list.c: Likewise.
* dirent/opendir-tst1.c: Likewise.
* posix/runtests.c: Likewise.
* posix/tst-getaddrinfo.c: Likewise.
* posix/tst-chmod.c: Likewise.
* posix/wordexp-test.c: Likewise.
* misc/tst-efgcvt.c: Likewise.
* timezone/tst-timezone.c: Likewise.
* rt/tst-clock.c: Likewise.
* rt/tst-shm.c: Likewise.
* rt/tst-aio2.c: Likewise.
* rt/tst-aio3.c: Likewise.
* rt/tst-aio4.c: Likewise.
* rt/tst-aio5.c: Likewise.
* dlfcn/failtest.c: Add prototype for foo.
* dlfcn/glrefmain.c: Add prototype for do_test.
* dlfcn/tst-dladdr.c: Add prototype for do_test.
* string/test-ffs.c (main): Add prototype for nested function.
============================================================
Index: setjmp/tst-setjmp.c
--- setjmp/tst-setjmp.c 1998/03/29 16:58:15 1.6
+++ setjmp/tst-setjmp.c 2000/12/27 18:15:13
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1992, 1997, 1998 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1992, 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
@@ -23,7 +23,7 @@
static jmp_buf env;
static int last_value = -1, lose = 0;
-void
+static void
jump (int val)
{
longjmp (env, val);
============================================================
Index: setjmp/jmpbug.c
--- setjmp/jmpbug.c 1996/03/12 13:44:40 1.2
+++ setjmp/jmpbug.c 2000/12/27 18:15:13
@@ -4,13 +4,13 @@
#include <setjmp.h>
#include <alloca.h>
-void
+static void
sub5 (jmp_buf buf)
{
longjmp (buf, 1);
}
-void
+static void
test (int x)
{
jmp_buf buf;
============================================================
Index: signal/tst-signal.c
--- signal/tst-signal.c 1997/05/29 12:03:06 1.4
+++ signal/tst-signal.c 2000/12/27 18:15:13
@@ -5,7 +5,7 @@
int win = 0;
-void
+static void
handler (int sig)
{
printf ("Received signal %d (%s).\n", sig, strsignal(sig));
============================================================
Index: stdio-common/tfformat.c
--- stdio-common/tfformat.c 2000/05/23 06:33:40 1.5
+++ stdio-common/tfformat.c 2000/12/27 18:15:24
@@ -4023,7 +4023,8 @@
int required_precision = 13;
#if defined(__STDC__) || defined(__cplusplus)
-int matches(register char *result, register const char *desired)
+static int
+matches (register char *result, register const char *desired)
#else
int matches(result, desired)
register char *result; register const char *desired;
============================================================
Index: string/tst-svc.c
--- string/tst-svc.c 1997/05/21 01:06:37 1.1
+++ string/tst-svc.c 2000/12/27 18:15:24
@@ -7,7 +7,7 @@
#define MAX_STRINGS 256
#define MAX_LINE_SIZE 32
-int
+static int
compare (const void *p1, const void *p2)
{
return strverscmp (*((char **) p1), *((char **) p2));
============================================================
Index: string/test-ffs.c
--- string/test-ffs.c 1997/02/19 04:42:54 1.5
+++ string/test-ffs.c 2000/12/27 18:15:24
@@ -1,4 +1,4 @@
-/* Copyright (C) 1994, 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1994, 1997, 2000 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Joel Sherrill (jsherril@redstone-emh2.army.mil),
On-Line Applications Research Corporation.
@@ -27,6 +27,9 @@
{
int failures = 0;
int i;
+
+ auto void try (int value, int expected);
+
void try (int value, int expected)
{
if (ffs (value) != expected)
============================================================
Index: time/clocktest.c
--- time/clocktest.c 2000/09/14 09:41:15 1.6
+++ time/clocktest.c 2000/12/27 18:15:24
@@ -6,7 +6,7 @@
volatile int gotit = 0;
-void
+static void
alarm_handler (int signal)
{
gotit = 1;
============================================================
Index: dirent/list.c
--- dirent/list.c 1998/03/18 11:59:23 1.5
+++ dirent/list.c 2000/12/27 18:15:24
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1993, 1997, 1998 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1993, 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
@@ -23,7 +23,7 @@
#include <dirent.h>
-int
+static int
test (const char *name)
{
DIR *dirp;
============================================================
Index: dirent/opendir-tst1.c
--- dirent/opendir-tst1.c 1998/11/16 11:54:09 1.2
+++ dirent/opendir-tst1.c 2000/12/27 18:15:24
@@ -1,4 +1,4 @@
-/* Copyright (C) 1998 Free Software Foundation, Inc.
+/* Copyright (C) 1998, 2000 Free Software Foundation, Inc.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1998.
The GNU C Library is free software; you can redistribute it and/or
@@ -84,7 +84,7 @@
}
-void
+static void
do_cleanup (void)
{
remove (tmpname);
============================================================
Index: posix/runtests.c
--- posix/runtests.c 2000/10/31 04:09:29 1.4
+++ posix/runtests.c 2000/12/27 18:15:24
@@ -48,7 +48,7 @@
-int
+static int
run_a_test (int id, const struct a_test * t)
{
static const char * last_pattern = 0;
============================================================
Index: posix/tst-getaddrinfo.c
--- posix/tst-getaddrinfo.c 2000/06/21 12:38:44 1.2
+++ posix/tst-getaddrinfo.c 2000/12/27 18:15:24
@@ -23,7 +23,7 @@
#include <netinet/in.h>
#include <netdb.h>
-int
+static int
do_test (void)
{
const int family[3] = { AF_INET, AF_INET6, AF_UNIX };
============================================================
Index: posix/tst-chmod.c
--- posix/tst-chmod.c 2000/10/27 03:41:11 1.3
+++ posix/tst-chmod.c 2000/12/27 18:15:24
@@ -36,7 +36,7 @@
goto fail; \
} while (0)
-int
+static int
do_test (int argc, char *argv[])
{
const char *builddir;
============================================================
Index: posix/wordexp-test.c
--- posix/wordexp-test.c 2000/06/21 12:38:44 1.27
+++ posix/wordexp-test.c 2000/12/27 18:15:25
@@ -208,7 +208,7 @@
static int testit (struct test_case_struct *tc);
static int tests;
-void
+static void
command_line_test (const char *words)
{
wordexp_t we;
============================================================
Index: misc/tst-efgcvt.c
--- misc/tst-efgcvt.c 2000/12/16 07:53:57 1.13
+++ misc/tst-efgcvt.c 2000/12/27 18:15:25
@@ -86,7 +86,7 @@
{ -1.0, 0, 0, "" }
};
-void
+static void
output_error (const char *name, double value, int ndigit,
const char *exp_p, int exp_decpt, int exp_sign,
char *res_p, int res_decpt, int res_sign)
@@ -101,7 +101,7 @@
}
-void
+static void
output_r_error (const char *name, double value, int ndigit,
const char *exp_p, int exp_decpt, int exp_sign, int exp_return,
char *res_p, int res_decpt, int res_sign, int res_return)
@@ -115,7 +115,7 @@
++error_count;
}
-void
+static void
test (testcase tests[], efcvt_func efcvt, const char *name)
{
int no = 0;
@@ -136,7 +136,7 @@
}
}
-void
+static void
test_r (testcase tests[], efcvt_r_func efcvt_r, const char *name)
{
int no = 0;
@@ -160,7 +160,7 @@
}
}
-void
+static void
special (void)
{
int decpt, sign, res;
============================================================
Index: timezone/tst-timezone.c
--- timezone/tst-timezone.c 1999/08/30 19:22:31 1.10
+++ timezone/tst-timezone.c 2000/12/27 18:15:25
@@ -1,6 +1,6 @@
-/* Copyright (C) 1998, 1999 Free Software Foundation, Inc.
+/* Copyright (C) 1998, 1999, 2000 Free Software Foundation, Inc.
This file is part of the GNU C Library.
- Contributed by Andreas Jaeger <aj@arthur.rhein-neckar.de>, 1998.
+ Contributed by Andreas Jaeger <aj@suse.de>, 1998.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public License as
@@ -52,7 +52,7 @@
/* This string will be used for `putenv' calls. */
char envstring[100];
-void
+static void
print_tzvars (void)
{
printf ("tzname[0]: %s\n", tzname[0]);
@@ -62,7 +62,7 @@
}
-void
+static void
check_tzvars (const char *name, int dayl, int timez, const char *const tznam[])
{
int i;
============================================================
Index: rt/tst-clock.c
--- rt/tst-clock.c 2000/04/11 16:13:23 1.1
+++ rt/tst-clock.c 2000/12/27 18:15:25
@@ -28,7 +28,7 @@
/* We expect to run at least 10 seconds. */
#define TIMEOUT 15
-int
+static int
clock_test (clockid_t cl)
{
struct timespec old_ts;
@@ -101,7 +101,7 @@
return result;
}
-int
+static int
do_test (void)
{
clockid_t cl;
============================================================
Index: rt/tst-shm.c
--- rt/tst-shm.c 2000/04/12 06:48:04 1.1
+++ rt/tst-shm.c 2000/12/27 18:15:25
@@ -122,7 +122,7 @@
}
-int
+static int
do_test (void)
{
int fd;
============================================================
Index: rt/tst-aio2.c
--- rt/tst-aio2.c 2000/07/26 06:28:38 1.1
+++ rt/tst-aio2.c 2000/12/27 18:15:26
@@ -27,14 +27,14 @@
int flag;
-void
+static void
thrfct (sigval_t arg)
{
flag = 1;
}
-int
+static int
do_test (int argc, char *argv[])
{
char name[] = "/tmp/aio2.XXXXXX";
============================================================
Index: rt/tst-aio3.c
--- rt/tst-aio3.c 2000/07/26 10:14:28 1.1
+++ rt/tst-aio3.c 2000/12/27 18:15:26
@@ -26,14 +26,14 @@
int flag;
-void
+static void
thrfct (sigval_t arg)
{
flag = 1;
}
-int
+static int
do_test (int argc, char *argv[])
{
char name[] = "/tmp/aio3.XXXXXX";
============================================================
Index: rt/tst-aio4.c
--- rt/tst-aio4.c 2000/08/09 09:16:15 1.2
+++ rt/tst-aio4.c 2000/12/27 18:15:26
@@ -31,13 +31,13 @@
volatile sig_atomic_t flag;
-void
+static void
sighandler (const int signo)
{
flag = signo;
}
-int
+static int
wait_flag (void)
{
while (flag == 0)
@@ -56,7 +56,7 @@
}
-int
+static int
do_test (int argc, char *argv[])
{
char name[] = "/tmp/aio4.XXXXXX";
============================================================
Index: rt/tst-aio5.c
--- rt/tst-aio5.c 2000/07/26 13:10:41 1.1
+++ rt/tst-aio5.c 2000/12/27 18:15:26
@@ -31,13 +31,13 @@
volatile sig_atomic_t flag;
-void
+static void
callback (sigval_t s)
{
flag = s.sival_int;
}
-int
+static int
wait_flag (void)
{
while (flag == 0)
@@ -56,7 +56,7 @@
}
-int
+static int
do_test (int argc, char *argv[])
{
char name[] = "/tmp/aio5.XXXXXX";
============================================================
Index: dlfcn/failtest.c
--- dlfcn/failtest.c 2000/06/10 04:29:18 1.1
+++ dlfcn/failtest.c 2000/12/27 18:15:26
@@ -52,6 +52,8 @@
}
+extern void foo (void);
+
void
foo (void)
{
============================================================
Index: dlfcn/glrefmain.c
--- dlfcn/glrefmain.c 2000/04/03 03:38:59 1.2
+++ dlfcn/glrefmain.c 2000/12/27 18:15:26
@@ -35,6 +35,8 @@
#define TEST_FUNCTION do_test ()
+extern int do_test (void);
+
int
do_test (void)
{
============================================================
Index: dlfcn/tst-dladdr.c
--- dlfcn/tst-dladdr.c 2000/07/28 08:13:05 1.1
+++ dlfcn/tst-dladdr.c 2000/12/27 18:15:26
@@ -26,6 +26,7 @@
#define TEST_FUNCTION do_test ()
+extern int do_test (void);
int
do_test (void)
--
Andreas Jaeger
SuSE Labs aj@suse.de
private aj@arthur.inka.de
http://www.suse.de/~aj
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |