aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Andersen <andersen@codepoet.org>2001-10-18 04:11:39 +0000
committerEric Andersen <andersen@codepoet.org>2001-10-18 04:11:39 +0000
commit74400ccfd08e8ff72b9147951dd437dd3bb7abb1 (patch)
treed1e5c30982d3ef735c33b3b52722aaaadd8daaaa
parent8acbf1d3079e9ed6d15c39bd57135b13ecb4076f (diff)
downloadbusybox-w32-74400ccfd08e8ff72b9147951dd437dd3bb7abb1.tar.gz
busybox-w32-74400ccfd08e8ff72b9147951dd437dd3bb7abb1.tar.bz2
busybox-w32-74400ccfd08e8ff72b9147951dd437dd3bb7abb1.zip
Scrub up some function prototypes.
-Erik
-rw-r--r--Makefile5
-rw-r--r--archival/gzip.c2
-rw-r--r--archival/libunarchive/decompress_unzip.c6
-rw-r--r--archival/libunarchive/unzip.c6
-rw-r--r--ash.c31
-rw-r--r--coreutils/tail.c2
-rw-r--r--coreutils/test.c42
-rw-r--r--findutils/grep.c1
-rw-r--r--grep.c1
-rw-r--r--gzip.c2
-rw-r--r--init.c8
-rw-r--r--init/init.c8
-rw-r--r--libbb/unzip.c6
-rw-r--r--libbb/vherror_msg.c3
-rw-r--r--libbb/xgethostbyname.c3
-rw-r--r--mkswap.c2
-rw-r--r--shell/ash.c31
-rw-r--r--swaponoff.c2
-rw-r--r--tail.c2
-rw-r--r--test.c42
-rw-r--r--util-linux/mkswap.c2
-rw-r--r--util-linux/swaponoff.c2
22 files changed, 95 insertions, 114 deletions
diff --git a/Makefile b/Makefile
index 1ba43f1ba..3cabc7afa 100644
--- a/Makefile
+++ b/Makefile
@@ -86,7 +86,7 @@ STRIPTOOL = $(CROSS)strip
86 86
87# To compile vs uClibc, just use the compiler wrapper built by uClibc... 87# To compile vs uClibc, just use the compiler wrapper built by uClibc...
88# Everything should compile and work as expected these days... 88# Everything should compile and work as expected these days...
89#CC = ../uClibc/extra/gcc-uClibc/i386-uclibc-gcc 89#CC = /usr/i386-linux-uclibc/usr/bin/i386-uclibc-gcc
90 90
91# To compile vs some other alternative libc, you may need to use/adjust 91# To compile vs some other alternative libc, you may need to use/adjust
92# the following lines to meet your needs... 92# the following lines to meet your needs...
@@ -110,8 +110,7 @@ STRIPTOOL = $(CROSS)strip
110OPTIMIZATION := $(shell if $(CC) -Os -S -o /dev/null -xc /dev/null >/dev/null 2>&1; \ 110OPTIMIZATION := $(shell if $(CC) -Os -S -o /dev/null -xc /dev/null >/dev/null 2>&1; \
111 then echo "-Os"; else echo "-O2" ; fi) 111 then echo "-Os"; else echo "-O2" ; fi)
112 112
113WARNINGS = -Wall -Wshadow 113WARNINGS=-Wall -Wstrict-prototypes -Wshadow
114
115ARFLAGS = -r 114ARFLAGS = -r
116 115
117# 116#
diff --git a/archival/gzip.c b/archival/gzip.c
index 53646df7c..5c86c1070 100644
--- a/archival/gzip.c
+++ b/archival/gzip.c
@@ -354,7 +354,7 @@ static void clear_bufs(void)
354 bytes_in = 0L; 354 bytes_in = 0L;
355} 355}
356 356
357static void write_error_msg() 357static void write_error_msg(void)
358{ 358{
359 fprintf(stderr, "\n"); 359 fprintf(stderr, "\n");
360 perror(""); 360 perror("");
diff --git a/archival/libunarchive/decompress_unzip.c b/archival/libunarchive/decompress_unzip.c
index ee746216d..bb32891be 100644
--- a/archival/libunarchive/decompress_unzip.c
+++ b/archival/libunarchive/decompress_unzip.c
@@ -115,13 +115,13 @@ static const unsigned short mask_bits[] = {
115 * Signal and error handler. 115 * Signal and error handler.
116 */ 116 */
117 117
118static void abort_gzip() 118static void abort_gzip(void)
119{ 119{
120 error_msg("gzip aborted\n"); 120 error_msg("gzip aborted\n");
121 exit(ERROR); 121 exit(ERROR);
122} 122}
123 123
124static void make_crc_table() 124static void make_crc_table(void)
125{ 125{
126 unsigned long table_entry; /* crc shift register */ 126 unsigned long table_entry; /* crc shift register */
127 unsigned long poly = 0; /* polynomial exclusive-or pattern */ 127 unsigned long poly = 0; /* polynomial exclusive-or pattern */
@@ -853,7 +853,7 @@ static int inflate_block(int *e)
853 * 853 *
854 * GLOBAL VARIABLES: outcnt, bk, bb, hufts, inptr 854 * GLOBAL VARIABLES: outcnt, bk, bb, hufts, inptr
855 */ 855 */
856static int inflate() 856static int inflate(void)
857{ 857{
858 int e; /* last block flag */ 858 int e; /* last block flag */
859 int r; /* result code */ 859 int r; /* result code */
diff --git a/archival/libunarchive/unzip.c b/archival/libunarchive/unzip.c
index ee746216d..bb32891be 100644
--- a/archival/libunarchive/unzip.c
+++ b/archival/libunarchive/unzip.c
@@ -115,13 +115,13 @@ static const unsigned short mask_bits[] = {
115 * Signal and error handler. 115 * Signal and error handler.
116 */ 116 */
117 117
118static void abort_gzip() 118static void abort_gzip(void)
119{ 119{
120 error_msg("gzip aborted\n"); 120 error_msg("gzip aborted\n");
121 exit(ERROR); 121 exit(ERROR);
122} 122}
123 123
124static void make_crc_table() 124static void make_crc_table(void)
125{ 125{
126 unsigned long table_entry; /* crc shift register */ 126 unsigned long table_entry; /* crc shift register */
127 unsigned long poly = 0; /* polynomial exclusive-or pattern */ 127 unsigned long poly = 0; /* polynomial exclusive-or pattern */
@@ -853,7 +853,7 @@ static int inflate_block(int *e)
853 * 853 *
854 * GLOBAL VARIABLES: outcnt, bk, bb, hufts, inptr 854 * GLOBAL VARIABLES: outcnt, bk, bb, hufts, inptr
855 */ 855 */
856static int inflate() 856static int inflate(void)
857{ 857{
858 int e; /* last block flag */ 858 int e; /* last block flag */
859 int r; /* result code */ 859 int r; /* result code */
diff --git a/ash.c b/ash.c
index 8a213d876..a65275893 100644
--- a/ash.c
+++ b/ash.c
@@ -2508,9 +2508,7 @@ out:
2508 * of all the rest.) 2508 * of all the rest.)
2509 */ 2509 */
2510 2510
2511static inline void 2511static inline void evalpipe(union node *n)
2512evalpipe(n)
2513 union node *n;
2514{ 2512{
2515 struct job *jp; 2513 struct job *jp;
2516 struct nodelist *lp; 2514 struct nodelist *lp;
@@ -3453,8 +3451,8 @@ pgetc(void)
3453 * PEOF may be pushed back. 3451 * PEOF may be pushed back.
3454 */ 3452 */
3455 3453
3456static void 3454static void pungetc(void)
3457pungetc() { 3455{
3458 parsenleft++; 3456 parsenleft++;
3459 parsenextc--; 3457 parsenextc--;
3460} 3458}
@@ -3496,8 +3494,8 @@ popallfiles(void) {
3496 * after a fork is done. 3494 * after a fork is done.
3497 */ 3495 */
3498 3496
3499static void 3497static void closescript(void)
3500closescript() { 3498{
3501 popallfiles(); 3499 popallfiles();
3502 if (parsefile->fd > 0) { 3500 if (parsefile->fd > 0) {
3503 close(parsefile->fd); 3501 close(parsefile->fd);
@@ -3511,9 +3509,7 @@ closescript() {
3511 * interrupts off. 3509 * interrupts off.
3512 */ 3510 */
3513 3511
3514static void 3512static void setinputfd(int fd, int push)
3515setinputfd(fd, push)
3516 int fd, push;
3517{ 3513{
3518 (void) fcntl(fd, F_SETFD, FD_CLOEXEC); 3514 (void) fcntl(fd, F_SETFD, FD_CLOEXEC);
3519 if (push) { 3515 if (push) {
@@ -4471,10 +4467,7 @@ expandarg(arg, arglist, flag)
4471 * input string. 4467 * input string.
4472 */ 4468 */
4473 4469
4474static inline char * 4470static inline char * evalvar(char *p, int flag)
4475evalvar(p, flag)
4476 char *p;
4477 int flag;
4478{ 4471{
4479 int subtype; 4472 int subtype;
4480 int varflags; 4473 int varflags;
@@ -6075,7 +6068,7 @@ static inline void putprompt(const char *s) {
6075 6068
6076#ifdef ASH_ALIAS 6069#ifdef ASH_ALIAS
6077static int 6070static int
6078pgetc2() 6071pgetc2(void)
6079{ 6072{
6080 int c; 6073 int c;
6081 do { 6074 do {
@@ -6349,7 +6342,8 @@ static int fd0_redirected = 0;
6349 6342
6350/* Return true if fd 0 has already been redirected at least once. */ 6343/* Return true if fd 0 has already been redirected at least once. */
6351static inline int 6344static inline int
6352fd0_redirected_p () { 6345fd0_redirected_p (void)
6346{
6353 return fd0_redirected != 0; 6347 return fd0_redirected != 0;
6354} 6348}
6355 6349
@@ -7971,8 +7965,7 @@ readcmdfile(const char *name)
7971 7965
7972 7966
7973static inline char * 7967static inline char *
7974find_dot_file(mybasename) 7968find_dot_file(char *mybasename)
7975 char *mybasename;
7976{ 7969{
7977 char *fullname; 7970 char *fullname;
7978 const char *path = pathval(); 7971 const char *path = pathval();
@@ -12761,7 +12754,7 @@ findvar(struct var **vpp, const char *name)
12761/* 12754/*
12762 * Copyright (c) 1999 Herbert Xu <herbert@debian.org> 12755 * Copyright (c) 1999 Herbert Xu <herbert@debian.org>
12763 * This file contains code for the times builtin. 12756 * This file contains code for the times builtin.
12764 * $Id: ash.c,v 1.25 2001/09/11 01:14:02 mjn3 Exp $ 12757 * $Id: ash.c,v 1.26 2001/10/18 04:11:38 andersen Exp $
12765 */ 12758 */
12766static int timescmd (int argc, char **argv) 12759static int timescmd (int argc, char **argv)
12767{ 12760{
diff --git a/coreutils/tail.c b/coreutils/tail.c
index 90cc2a6ef..5e5fbc14f 100644
--- a/coreutils/tail.c
+++ b/coreutils/tail.c
@@ -51,7 +51,7 @@ static void tailbuf_append(char *buf, int len)
51 taillen += len; 51 taillen += len;
52} 52}
53 53
54static void tailbuf_trunc() 54static void tailbuf_trunc(void)
55{ 55{
56 char *s; 56 char *s;
57 s = memchr(tailbuf, '\n', taillen); 57 s = memchr(tailbuf, '\n', taillen);
diff --git a/coreutils/test.c b/coreutils/test.c
index 9c66cbb87..3404b02b4 100644
--- a/coreutils/test.c
+++ b/coreutils/test.c
@@ -158,21 +158,21 @@ static struct t_op const *t_wp_op;
158static gid_t *group_array = NULL; 158static gid_t *group_array = NULL;
159static int ngroups; 159static int ngroups;
160 160
161static enum token t_lex(); 161static enum token t_lex(char* s);
162static int oexpr(); 162static int oexpr(enum token n);
163static int aexpr(); 163static int aexpr(enum token n);
164static int nexpr(); 164static int nexpr(enum token n);
165static int binop(); 165static int binop(void);
166static int primary(); 166static int primary(enum token n);
167static int filstat(); 167static int filstat(char *nm, enum token mode);
168static int getn(); 168static int getn(const char *s);
169static int newerf(); 169static int newerf(const char *f1, const char *f2);
170static int olderf(); 170static int olderf(const char *f1, const char *f2);
171static int equalf(); 171static int equalf(const char *f1, const char *f2);
172static void syntax(); 172static void syntax(const char *op, const char *msg);
173static int test_eaccess(); 173static int test_eaccess(char *path, int mode);
174static int is_a_group_member(); 174static int is_a_group_member(gid_t gid);
175static void initialize_group_array(); 175static void initialize_group_array(void);
176 176
177extern int 177extern int
178test_main(int argc, char** argv) 178test_main(int argc, char** argv)
@@ -226,8 +226,8 @@ test_main(int argc, char** argv)
226 226
227static void 227static void
228syntax(op, msg) 228syntax(op, msg)
229 char *op; 229 const char *op;
230 char *msg; 230 const char *msg;
231{ 231{
232 if (op && *op) 232 if (op && *op)
233 error_msg_and_die("%s: %s", op, msg); 233 error_msg_and_die("%s: %s", op, msg);
@@ -458,7 +458,7 @@ t_lex(s)
458/* atoi with error detection */ 458/* atoi with error detection */
459static int 459static int
460getn(s) 460getn(s)
461 char *s; 461 const char *s;
462{ 462{
463 char *p; 463 char *p;
464 long r; 464 long r;
@@ -480,7 +480,7 @@ getn(s)
480 480
481static int 481static int
482newerf (f1, f2) 482newerf (f1, f2)
483char *f1, *f2; 483const char *f1, *f2;
484{ 484{
485 struct stat b1, b2; 485 struct stat b1, b2;
486 486
@@ -491,7 +491,7 @@ char *f1, *f2;
491 491
492static int 492static int
493olderf (f1, f2) 493olderf (f1, f2)
494char *f1, *f2; 494const char *f1, *f2;
495{ 495{
496 struct stat b1, b2; 496 struct stat b1, b2;
497 497
@@ -502,7 +502,7 @@ char *f1, *f2;
502 502
503static int 503static int
504equalf (f1, f2) 504equalf (f1, f2)
505char *f1, *f2; 505const char *f1, *f2;
506{ 506{
507 struct stat b1, b2; 507 struct stat b1, b2;
508 508
diff --git a/findutils/grep.c b/findutils/grep.c
index 3254868be..eff7c3ff5 100644
--- a/findutils/grep.c
+++ b/findutils/grep.c
@@ -30,7 +30,6 @@
30 30
31 31
32extern int optind; /* in unistd.h */ 32extern int optind; /* in unistd.h */
33extern int errno; /* for use with strerror() */
34extern void xregcomp(regex_t *preg, const char *regex, int cflags); /* in busybox.h */ 33extern void xregcomp(regex_t *preg, const char *regex, int cflags); /* in busybox.h */
35 34
36/* options */ 35/* options */
diff --git a/grep.c b/grep.c
index 3254868be..eff7c3ff5 100644
--- a/grep.c
+++ b/grep.c
@@ -30,7 +30,6 @@
30 30
31 31
32extern int optind; /* in unistd.h */ 32extern int optind; /* in unistd.h */
33extern int errno; /* for use with strerror() */
34extern void xregcomp(regex_t *preg, const char *regex, int cflags); /* in busybox.h */ 33extern void xregcomp(regex_t *preg, const char *regex, int cflags); /* in busybox.h */
35 34
36/* options */ 35/* options */
diff --git a/gzip.c b/gzip.c
index 53646df7c..5c86c1070 100644
--- a/gzip.c
+++ b/gzip.c
@@ -354,7 +354,7 @@ static void clear_bufs(void)
354 bytes_in = 0L; 354 bytes_in = 0L;
355} 355}
356 356
357static void write_error_msg() 357static void write_error_msg(void)
358{ 358{
359 fprintf(stderr, "\n"); 359 fprintf(stderr, "\n");
360 perror(""); 360 perror("");
diff --git a/init.c b/init.c
index 17273afcd..068e1df16 100644
--- a/init.c
+++ b/init.c
@@ -179,7 +179,7 @@ static char console[32] = _PATH_CONSOLE;
179 179
180static void delete_initAction(initAction * action); 180static void delete_initAction(initAction * action);
181 181
182static void loop_forever() 182static void loop_forever(void)
183{ 183{
184 while (1) 184 while (1)
185 sleep (1); 185 sleep (1);
@@ -289,7 +289,7 @@ static void set_term(int fd)
289 289
290/* How much memory does this machine have? 290/* How much memory does this machine have?
291 Units are kBytes to avoid overflow on 4GB machines */ 291 Units are kBytes to avoid overflow on 4GB machines */
292static int check_free_memory() 292static int check_free_memory(void)
293{ 293{
294 struct sysinfo info; 294 struct sysinfo info;
295 unsigned int result, u, s=10; 295 unsigned int result, u, s=10;
@@ -310,7 +310,7 @@ static int check_free_memory()
310 return result; 310 return result;
311} 311}
312 312
313static void console_init() 313static void console_init(void)
314{ 314{
315 int fd; 315 int fd;
316 int tried_devcons = 0; 316 int tried_devcons = 0;
@@ -585,7 +585,7 @@ static int waitfor(char *command, char *terminal, int get_enter)
585 585
586/* Make sure there is enough memory to do something useful. * 586/* Make sure there is enough memory to do something useful. *
587 * Calls "swapon -a" if needed so be sure /etc/fstab is present... */ 587 * Calls "swapon -a" if needed so be sure /etc/fstab is present... */
588static void check_memory() 588static void check_memory(void)
589{ 589{
590 struct stat statBuf; 590 struct stat statBuf;
591 591
diff --git a/init/init.c b/init/init.c
index 17273afcd..068e1df16 100644
--- a/init/init.c
+++ b/init/init.c
@@ -179,7 +179,7 @@ static char console[32] = _PATH_CONSOLE;
179 179
180static void delete_initAction(initAction * action); 180static void delete_initAction(initAction * action);
181 181
182static void loop_forever() 182static void loop_forever(void)
183{ 183{
184 while (1) 184 while (1)
185 sleep (1); 185 sleep (1);
@@ -289,7 +289,7 @@ static void set_term(int fd)
289 289
290/* How much memory does this machine have? 290/* How much memory does this machine have?
291 Units are kBytes to avoid overflow on 4GB machines */ 291 Units are kBytes to avoid overflow on 4GB machines */
292static int check_free_memory() 292static int check_free_memory(void)
293{ 293{
294 struct sysinfo info; 294 struct sysinfo info;
295 unsigned int result, u, s=10; 295 unsigned int result, u, s=10;
@@ -310,7 +310,7 @@ static int check_free_memory()
310 return result; 310 return result;
311} 311}
312 312
313static void console_init() 313static void console_init(void)
314{ 314{
315 int fd; 315 int fd;
316 int tried_devcons = 0; 316 int tried_devcons = 0;
@@ -585,7 +585,7 @@ static int waitfor(char *command, char *terminal, int get_enter)
585 585
586/* Make sure there is enough memory to do something useful. * 586/* Make sure there is enough memory to do something useful. *
587 * Calls "swapon -a" if needed so be sure /etc/fstab is present... */ 587 * Calls "swapon -a" if needed so be sure /etc/fstab is present... */
588static void check_memory() 588static void check_memory(void)
589{ 589{
590 struct stat statBuf; 590 struct stat statBuf;
591 591
diff --git a/libbb/unzip.c b/libbb/unzip.c
index ee746216d..bb32891be 100644
--- a/libbb/unzip.c
+++ b/libbb/unzip.c
@@ -115,13 +115,13 @@ static const unsigned short mask_bits[] = {
115 * Signal and error handler. 115 * Signal and error handler.
116 */ 116 */
117 117
118static void abort_gzip() 118static void abort_gzip(void)
119{ 119{
120 error_msg("gzip aborted\n"); 120 error_msg("gzip aborted\n");
121 exit(ERROR); 121 exit(ERROR);
122} 122}
123 123
124static void make_crc_table() 124static void make_crc_table(void)
125{ 125{
126 unsigned long table_entry; /* crc shift register */ 126 unsigned long table_entry; /* crc shift register */
127 unsigned long poly = 0; /* polynomial exclusive-or pattern */ 127 unsigned long poly = 0; /* polynomial exclusive-or pattern */
@@ -853,7 +853,7 @@ static int inflate_block(int *e)
853 * 853 *
854 * GLOBAL VARIABLES: outcnt, bk, bb, hufts, inptr 854 * GLOBAL VARIABLES: outcnt, bk, bb, hufts, inptr
855 */ 855 */
856static int inflate() 856static int inflate(void)
857{ 857{
858 int e; /* last block flag */ 858 int e; /* last block flag */
859 int r; /* result code */ 859 int r; /* result code */
diff --git a/libbb/vherror_msg.c b/libbb/vherror_msg.c
index ee0bb5009..44f6ebd28 100644
--- a/libbb/vherror_msg.c
+++ b/libbb/vherror_msg.c
@@ -27,12 +27,11 @@
27 27
28#include <stdarg.h> 28#include <stdarg.h>
29#include <netdb.h> 29#include <netdb.h>
30extern int h_errno;
31
32#include <stdio.h> 30#include <stdio.h>
33 31
34#include "libbb.h" 32#include "libbb.h"
35 33
34
36extern void vherror_msg(const char *s, va_list p) 35extern void vherror_msg(const char *s, va_list p)
37{ 36{
38 if(s == 0) 37 if(s == 0)
diff --git a/libbb/xgethostbyname.c b/libbb/xgethostbyname.c
index 258510332..be56f2ed1 100644
--- a/libbb/xgethostbyname.c
+++ b/libbb/xgethostbyname.c
@@ -22,10 +22,9 @@
22 */ 22 */
23 23
24#include <netdb.h> 24#include <netdb.h>
25extern int h_errno;
26
27#include "libbb.h" 25#include "libbb.h"
28 26
27
29struct hostent *xgethostbyname(const char *name) 28struct hostent *xgethostbyname(const char *name)
30{ 29{
31 struct hostent *retval; 30 struct hostent *retval;
diff --git a/mkswap.c b/mkswap.c
index f72c7009a..c773ecef9 100644
--- a/mkswap.c
+++ b/mkswap.c
@@ -81,7 +81,7 @@ static struct swap_header_v1 {
81 unsigned int badpages[1]; 81 unsigned int badpages[1];
82} *p; 82} *p;
83 83
84static void init_signature_page() 84static void init_signature_page(void)
85{ 85{
86 pagesize = getpagesize(); 86 pagesize = getpagesize();
87 87
diff --git a/shell/ash.c b/shell/ash.c
index 8a213d876..a65275893 100644
--- a/shell/ash.c
+++ b/shell/ash.c
@@ -2508,9 +2508,7 @@ out:
2508 * of all the rest.) 2508 * of all the rest.)
2509 */ 2509 */
2510 2510
2511static inline void 2511static inline void evalpipe(union node *n)
2512evalpipe(n)
2513 union node *n;
2514{ 2512{
2515 struct job *jp; 2513 struct job *jp;
2516 struct nodelist *lp; 2514 struct nodelist *lp;
@@ -3453,8 +3451,8 @@ pgetc(void)
3453 * PEOF may be pushed back. 3451 * PEOF may be pushed back.
3454 */ 3452 */
3455 3453
3456static void 3454static void pungetc(void)
3457pungetc() { 3455{
3458 parsenleft++; 3456 parsenleft++;
3459 parsenextc--; 3457 parsenextc--;
3460} 3458}
@@ -3496,8 +3494,8 @@ popallfiles(void) {
3496 * after a fork is done. 3494 * after a fork is done.
3497 */ 3495 */
3498 3496
3499static void 3497static void closescript(void)
3500closescript() { 3498{
3501 popallfiles(); 3499 popallfiles();
3502 if (parsefile->fd > 0) { 3500 if (parsefile->fd > 0) {
3503 close(parsefile->fd); 3501 close(parsefile->fd);
@@ -3511,9 +3509,7 @@ closescript() {
3511 * interrupts off. 3509 * interrupts off.
3512 */ 3510 */
3513 3511
3514static void 3512static void setinputfd(int fd, int push)
3515setinputfd(fd, push)
3516 int fd, push;
3517{ 3513{
3518 (void) fcntl(fd, F_SETFD, FD_CLOEXEC); 3514 (void) fcntl(fd, F_SETFD, FD_CLOEXEC);
3519 if (push) { 3515 if (push) {
@@ -4471,10 +4467,7 @@ expandarg(arg, arglist, flag)
4471 * input string. 4467 * input string.
4472 */ 4468 */
4473 4469
4474static inline char * 4470static inline char * evalvar(char *p, int flag)
4475evalvar(p, flag)
4476 char *p;
4477 int flag;
4478{ 4471{
4479 int subtype; 4472 int subtype;
4480 int varflags; 4473 int varflags;
@@ -6075,7 +6068,7 @@ static inline void putprompt(const char *s) {
6075 6068
6076#ifdef ASH_ALIAS 6069#ifdef ASH_ALIAS
6077static int 6070static int
6078pgetc2() 6071pgetc2(void)
6079{ 6072{
6080 int c; 6073 int c;
6081 do { 6074 do {
@@ -6349,7 +6342,8 @@ static int fd0_redirected = 0;
6349 6342
6350/* Return true if fd 0 has already been redirected at least once. */ 6343/* Return true if fd 0 has already been redirected at least once. */
6351static inline int 6344static inline int
6352fd0_redirected_p () { 6345fd0_redirected_p (void)
6346{
6353 return fd0_redirected != 0; 6347 return fd0_redirected != 0;
6354} 6348}
6355 6349
@@ -7971,8 +7965,7 @@ readcmdfile(const char *name)
7971 7965
7972 7966
7973static inline char * 7967static inline char *
7974find_dot_file(mybasename) 7968find_dot_file(char *mybasename)
7975 char *mybasename;
7976{ 7969{
7977 char *fullname; 7970 char *fullname;
7978 const char *path = pathval(); 7971 const char *path = pathval();
@@ -12761,7 +12754,7 @@ findvar(struct var **vpp, const char *name)
12761/* 12754/*
12762 * Copyright (c) 1999 Herbert Xu <herbert@debian.org> 12755 * Copyright (c) 1999 Herbert Xu <herbert@debian.org>
12763 * This file contains code for the times builtin. 12756 * This file contains code for the times builtin.
12764 * $Id: ash.c,v 1.25 2001/09/11 01:14:02 mjn3 Exp $ 12757 * $Id: ash.c,v 1.26 2001/10/18 04:11:38 andersen Exp $
12765 */ 12758 */
12766static int timescmd (int argc, char **argv) 12759static int timescmd (int argc, char **argv)
12767{ 12760{
diff --git a/swaponoff.c b/swaponoff.c
index ce0e2c6cc..d9eb5baae 100644
--- a/swaponoff.c
+++ b/swaponoff.c
@@ -59,7 +59,7 @@ static void swap_enable_disable(char *device)
59 perror_msg_and_die(applet_name); 59 perror_msg_and_die(applet_name);
60} 60}
61 61
62static void do_em_all() 62static void do_em_all(void)
63{ 63{
64 struct mntent *m; 64 struct mntent *m;
65 FILE *f = setmntent("/etc/fstab", "r"); 65 FILE *f = setmntent("/etc/fstab", "r");
diff --git a/tail.c b/tail.c
index 90cc2a6ef..5e5fbc14f 100644
--- a/tail.c
+++ b/tail.c
@@ -51,7 +51,7 @@ static void tailbuf_append(char *buf, int len)
51 taillen += len; 51 taillen += len;
52} 52}
53 53
54static void tailbuf_trunc() 54static void tailbuf_trunc(void)
55{ 55{
56 char *s; 56 char *s;
57 s = memchr(tailbuf, '\n', taillen); 57 s = memchr(tailbuf, '\n', taillen);
diff --git a/test.c b/test.c
index 9c66cbb87..3404b02b4 100644
--- a/test.c
+++ b/test.c
@@ -158,21 +158,21 @@ static struct t_op const *t_wp_op;
158static gid_t *group_array = NULL; 158static gid_t *group_array = NULL;
159static int ngroups; 159static int ngroups;
160 160
161static enum token t_lex(); 161static enum token t_lex(char* s);
162static int oexpr(); 162static int oexpr(enum token n);
163static int aexpr(); 163static int aexpr(enum token n);
164static int nexpr(); 164static int nexpr(enum token n);
165static int binop(); 165static int binop(void);
166static int primary(); 166static int primary(enum token n);
167static int filstat(); 167static int filstat(char *nm, enum token mode);
168static int getn(); 168static int getn(const char *s);
169static int newerf(); 169static int newerf(const char *f1, const char *f2);
170static int olderf(); 170static int olderf(const char *f1, const char *f2);
171static int equalf(); 171static int equalf(const char *f1, const char *f2);
172static void syntax(); 172static void syntax(const char *op, const char *msg);
173static int test_eaccess(); 173static int test_eaccess(char *path, int mode);
174static int is_a_group_member(); 174static int is_a_group_member(gid_t gid);
175static void initialize_group_array(); 175static void initialize_group_array(void);
176 176
177extern int 177extern int
178test_main(int argc, char** argv) 178test_main(int argc, char** argv)
@@ -226,8 +226,8 @@ test_main(int argc, char** argv)
226 226
227static void 227static void
228syntax(op, msg) 228syntax(op, msg)
229 char *op; 229 const char *op;
230 char *msg; 230 const char *msg;
231{ 231{
232 if (op && *op) 232 if (op && *op)
233 error_msg_and_die("%s: %s", op, msg); 233 error_msg_and_die("%s: %s", op, msg);
@@ -458,7 +458,7 @@ t_lex(s)
458/* atoi with error detection */ 458/* atoi with error detection */
459static int 459static int
460getn(s) 460getn(s)
461 char *s; 461 const char *s;
462{ 462{
463 char *p; 463 char *p;
464 long r; 464 long r;
@@ -480,7 +480,7 @@ getn(s)
480 480
481static int 481static int
482newerf (f1, f2) 482newerf (f1, f2)
483char *f1, *f2; 483const char *f1, *f2;
484{ 484{
485 struct stat b1, b2; 485 struct stat b1, b2;
486 486
@@ -491,7 +491,7 @@ char *f1, *f2;
491 491
492static int 492static int
493olderf (f1, f2) 493olderf (f1, f2)
494char *f1, *f2; 494const char *f1, *f2;
495{ 495{
496 struct stat b1, b2; 496 struct stat b1, b2;
497 497
@@ -502,7 +502,7 @@ char *f1, *f2;
502 502
503static int 503static int
504equalf (f1, f2) 504equalf (f1, f2)
505char *f1, *f2; 505const char *f1, *f2;
506{ 506{
507 struct stat b1, b2; 507 struct stat b1, b2;
508 508
diff --git a/util-linux/mkswap.c b/util-linux/mkswap.c
index f72c7009a..c773ecef9 100644
--- a/util-linux/mkswap.c
+++ b/util-linux/mkswap.c
@@ -81,7 +81,7 @@ static struct swap_header_v1 {
81 unsigned int badpages[1]; 81 unsigned int badpages[1];
82} *p; 82} *p;
83 83
84static void init_signature_page() 84static void init_signature_page(void)
85{ 85{
86 pagesize = getpagesize(); 86 pagesize = getpagesize();
87 87
diff --git a/util-linux/swaponoff.c b/util-linux/swaponoff.c
index ce0e2c6cc..d9eb5baae 100644
--- a/util-linux/swaponoff.c
+++ b/util-linux/swaponoff.c
@@ -59,7 +59,7 @@ static void swap_enable_disable(char *device)
59 perror_msg_and_die(applet_name); 59 perror_msg_and_die(applet_name);
60} 60}
61 61
62static void do_em_all() 62static void do_em_all(void)
63{ 63{
64 struct mntent *m; 64 struct mntent *m;
65 FILE *f = setmntent("/etc/fstab", "r"); 65 FILE *f = setmntent("/etc/fstab", "r");