diff options
author | andersen <andersen@69ca8d6d-28ef-0310-b511-8ec308f3f277> | 2001-10-18 04:11:39 +0000 |
---|---|---|
committer | andersen <andersen@69ca8d6d-28ef-0310-b511-8ec308f3f277> | 2001-10-18 04:11:39 +0000 |
commit | 6d1d34a65ad8952d8115209f78d4f6fffee1e64f (patch) | |
tree | d1e5c30982d3ef735c33b3b52722aaaadd8daaaa | |
parent | 61aa77b60c411aaee39c3fade8c566642a260365 (diff) | |
download | busybox-w32-6d1d34a65ad8952d8115209f78d4f6fffee1e64f.tar.gz busybox-w32-6d1d34a65ad8952d8115209f78d4f6fffee1e64f.tar.bz2 busybox-w32-6d1d34a65ad8952d8115209f78d4f6fffee1e64f.zip |
Scrub up some function prototypes.
-Erik
git-svn-id: svn://busybox.net/trunk/busybox@3540 69ca8d6d-28ef-0310-b511-8ec308f3f277
-rw-r--r-- | Makefile | 5 | ||||
-rw-r--r-- | archival/gzip.c | 2 | ||||
-rw-r--r-- | archival/libunarchive/decompress_unzip.c | 6 | ||||
-rw-r--r-- | archival/libunarchive/unzip.c | 6 | ||||
-rw-r--r-- | ash.c | 31 | ||||
-rw-r--r-- | coreutils/tail.c | 2 | ||||
-rw-r--r-- | coreutils/test.c | 42 | ||||
-rw-r--r-- | findutils/grep.c | 1 | ||||
-rw-r--r-- | grep.c | 1 | ||||
-rw-r--r-- | gzip.c | 2 | ||||
-rw-r--r-- | init.c | 8 | ||||
-rw-r--r-- | init/init.c | 8 | ||||
-rw-r--r-- | libbb/unzip.c | 6 | ||||
-rw-r--r-- | libbb/vherror_msg.c | 3 | ||||
-rw-r--r-- | libbb/xgethostbyname.c | 3 | ||||
-rw-r--r-- | mkswap.c | 2 | ||||
-rw-r--r-- | shell/ash.c | 31 | ||||
-rw-r--r-- | swaponoff.c | 2 | ||||
-rw-r--r-- | tail.c | 2 | ||||
-rw-r--r-- | test.c | 42 | ||||
-rw-r--r-- | util-linux/mkswap.c | 2 | ||||
-rw-r--r-- | util-linux/swaponoff.c | 2 |
22 files changed, 95 insertions, 114 deletions
@@ -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 | |||
110 | OPTIMIZATION := $(shell if $(CC) -Os -S -o /dev/null -xc /dev/null >/dev/null 2>&1; \ | 110 | OPTIMIZATION := $(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 | ||
113 | WARNINGS = -Wall -Wshadow | 113 | WARNINGS=-Wall -Wstrict-prototypes -Wshadow |
114 | |||
115 | ARFLAGS = -r | 114 | ARFLAGS = -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 | ||
357 | static void write_error_msg() | 357 | static 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 | ||
118 | static void abort_gzip() | 118 | static 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 | ||
124 | static void make_crc_table() | 124 | static 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 | */ |
856 | static int inflate() | 856 | static 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 | ||
118 | static void abort_gzip() | 118 | static 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 | ||
124 | static void make_crc_table() | 124 | static 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 | */ |
856 | static int inflate() | 856 | static 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 */ |
@@ -2508,9 +2508,7 @@ out: | |||
2508 | * of all the rest.) | 2508 | * of all the rest.) |
2509 | */ | 2509 | */ |
2510 | 2510 | ||
2511 | static inline void | 2511 | static inline void evalpipe(union node *n) |
2512 | evalpipe(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 | ||
3456 | static void | 3454 | static void pungetc(void) |
3457 | pungetc() { | 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 | ||
3499 | static void | 3497 | static void closescript(void) |
3500 | closescript() { | 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 | ||
3514 | static void | 3512 | static void setinputfd(int fd, int push) |
3515 | setinputfd(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 | ||
4474 | static inline char * | 4470 | static inline char * evalvar(char *p, int flag) |
4475 | evalvar(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 |
6077 | static int | 6070 | static int |
6078 | pgetc2() | 6071 | pgetc2(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. */ |
6351 | static inline int | 6344 | static inline int |
6352 | fd0_redirected_p () { | 6345 | fd0_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 | ||
7973 | static inline char * | 7967 | static inline char * |
7974 | find_dot_file(mybasename) | 7968 | find_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 | */ |
12766 | static int timescmd (int argc, char **argv) | 12759 | static 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 | ||
54 | static void tailbuf_trunc() | 54 | static 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; | |||
158 | static gid_t *group_array = NULL; | 158 | static gid_t *group_array = NULL; |
159 | static int ngroups; | 159 | static int ngroups; |
160 | 160 | ||
161 | static enum token t_lex(); | 161 | static enum token t_lex(char* s); |
162 | static int oexpr(); | 162 | static int oexpr(enum token n); |
163 | static int aexpr(); | 163 | static int aexpr(enum token n); |
164 | static int nexpr(); | 164 | static int nexpr(enum token n); |
165 | static int binop(); | 165 | static int binop(void); |
166 | static int primary(); | 166 | static int primary(enum token n); |
167 | static int filstat(); | 167 | static int filstat(char *nm, enum token mode); |
168 | static int getn(); | 168 | static int getn(const char *s); |
169 | static int newerf(); | 169 | static int newerf(const char *f1, const char *f2); |
170 | static int olderf(); | 170 | static int olderf(const char *f1, const char *f2); |
171 | static int equalf(); | 171 | static int equalf(const char *f1, const char *f2); |
172 | static void syntax(); | 172 | static void syntax(const char *op, const char *msg); |
173 | static int test_eaccess(); | 173 | static int test_eaccess(char *path, int mode); |
174 | static int is_a_group_member(); | 174 | static int is_a_group_member(gid_t gid); |
175 | static void initialize_group_array(); | 175 | static void initialize_group_array(void); |
176 | 176 | ||
177 | extern int | 177 | extern int |
178 | test_main(int argc, char** argv) | 178 | test_main(int argc, char** argv) |
@@ -226,8 +226,8 @@ test_main(int argc, char** argv) | |||
226 | 226 | ||
227 | static void | 227 | static void |
228 | syntax(op, msg) | 228 | syntax(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 */ |
459 | static int | 459 | static int |
460 | getn(s) | 460 | getn(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 | ||
481 | static int | 481 | static int |
482 | newerf (f1, f2) | 482 | newerf (f1, f2) |
483 | char *f1, *f2; | 483 | const 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 | ||
492 | static int | 492 | static int |
493 | olderf (f1, f2) | 493 | olderf (f1, f2) |
494 | char *f1, *f2; | 494 | const 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 | ||
503 | static int | 503 | static int |
504 | equalf (f1, f2) | 504 | equalf (f1, f2) |
505 | char *f1, *f2; | 505 | const 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 | ||
32 | extern int optind; /* in unistd.h */ | 32 | extern int optind; /* in unistd.h */ |
33 | extern int errno; /* for use with strerror() */ | ||
34 | extern void xregcomp(regex_t *preg, const char *regex, int cflags); /* in busybox.h */ | 33 | extern void xregcomp(regex_t *preg, const char *regex, int cflags); /* in busybox.h */ |
35 | 34 | ||
36 | /* options */ | 35 | /* options */ |
@@ -30,7 +30,6 @@ | |||
30 | 30 | ||
31 | 31 | ||
32 | extern int optind; /* in unistd.h */ | 32 | extern int optind; /* in unistd.h */ |
33 | extern int errno; /* for use with strerror() */ | ||
34 | extern void xregcomp(regex_t *preg, const char *regex, int cflags); /* in busybox.h */ | 33 | extern void xregcomp(regex_t *preg, const char *regex, int cflags); /* in busybox.h */ |
35 | 34 | ||
36 | /* options */ | 35 | /* options */ |
@@ -354,7 +354,7 @@ static void clear_bufs(void) | |||
354 | bytes_in = 0L; | 354 | bytes_in = 0L; |
355 | } | 355 | } |
356 | 356 | ||
357 | static void write_error_msg() | 357 | static void write_error_msg(void) |
358 | { | 358 | { |
359 | fprintf(stderr, "\n"); | 359 | fprintf(stderr, "\n"); |
360 | perror(""); | 360 | perror(""); |
@@ -179,7 +179,7 @@ static char console[32] = _PATH_CONSOLE; | |||
179 | 179 | ||
180 | static void delete_initAction(initAction * action); | 180 | static void delete_initAction(initAction * action); |
181 | 181 | ||
182 | static void loop_forever() | 182 | static 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 */ |
292 | static int check_free_memory() | 292 | static 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 | ||
313 | static void console_init() | 313 | static 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... */ |
588 | static void check_memory() | 588 | static 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 | ||
180 | static void delete_initAction(initAction * action); | 180 | static void delete_initAction(initAction * action); |
181 | 181 | ||
182 | static void loop_forever() | 182 | static 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 */ |
292 | static int check_free_memory() | 292 | static 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 | ||
313 | static void console_init() | 313 | static 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... */ |
588 | static void check_memory() | 588 | static 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 | ||
118 | static void abort_gzip() | 118 | static 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 | ||
124 | static void make_crc_table() | 124 | static 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 | */ |
856 | static int inflate() | 856 | static 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> |
30 | extern 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 | |||
36 | extern void vherror_msg(const char *s, va_list p) | 35 | extern 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> |
25 | extern int h_errno; | ||
26 | |||
27 | #include "libbb.h" | 25 | #include "libbb.h" |
28 | 26 | ||
27 | |||
29 | struct hostent *xgethostbyname(const char *name) | 28 | struct hostent *xgethostbyname(const char *name) |
30 | { | 29 | { |
31 | struct hostent *retval; | 30 | struct hostent *retval; |
@@ -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 | ||
84 | static void init_signature_page() | 84 | static 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 | ||
2511 | static inline void | 2511 | static inline void evalpipe(union node *n) |
2512 | evalpipe(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 | ||
3456 | static void | 3454 | static void pungetc(void) |
3457 | pungetc() { | 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 | ||
3499 | static void | 3497 | static void closescript(void) |
3500 | closescript() { | 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 | ||
3514 | static void | 3512 | static void setinputfd(int fd, int push) |
3515 | setinputfd(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 | ||
4474 | static inline char * | 4470 | static inline char * evalvar(char *p, int flag) |
4475 | evalvar(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 |
6077 | static int | 6070 | static int |
6078 | pgetc2() | 6071 | pgetc2(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. */ |
6351 | static inline int | 6344 | static inline int |
6352 | fd0_redirected_p () { | 6345 | fd0_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 | ||
7973 | static inline char * | 7967 | static inline char * |
7974 | find_dot_file(mybasename) | 7968 | find_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 | */ |
12766 | static int timescmd (int argc, char **argv) | 12759 | static 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 | ||
62 | static void do_em_all() | 62 | static 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"); |
@@ -51,7 +51,7 @@ static void tailbuf_append(char *buf, int len) | |||
51 | taillen += len; | 51 | taillen += len; |
52 | } | 52 | } |
53 | 53 | ||
54 | static void tailbuf_trunc() | 54 | static void tailbuf_trunc(void) |
55 | { | 55 | { |
56 | char *s; | 56 | char *s; |
57 | s = memchr(tailbuf, '\n', taillen); | 57 | s = memchr(tailbuf, '\n', taillen); |
@@ -158,21 +158,21 @@ static struct t_op const *t_wp_op; | |||
158 | static gid_t *group_array = NULL; | 158 | static gid_t *group_array = NULL; |
159 | static int ngroups; | 159 | static int ngroups; |
160 | 160 | ||
161 | static enum token t_lex(); | 161 | static enum token t_lex(char* s); |
162 | static int oexpr(); | 162 | static int oexpr(enum token n); |
163 | static int aexpr(); | 163 | static int aexpr(enum token n); |
164 | static int nexpr(); | 164 | static int nexpr(enum token n); |
165 | static int binop(); | 165 | static int binop(void); |
166 | static int primary(); | 166 | static int primary(enum token n); |
167 | static int filstat(); | 167 | static int filstat(char *nm, enum token mode); |
168 | static int getn(); | 168 | static int getn(const char *s); |
169 | static int newerf(); | 169 | static int newerf(const char *f1, const char *f2); |
170 | static int olderf(); | 170 | static int olderf(const char *f1, const char *f2); |
171 | static int equalf(); | 171 | static int equalf(const char *f1, const char *f2); |
172 | static void syntax(); | 172 | static void syntax(const char *op, const char *msg); |
173 | static int test_eaccess(); | 173 | static int test_eaccess(char *path, int mode); |
174 | static int is_a_group_member(); | 174 | static int is_a_group_member(gid_t gid); |
175 | static void initialize_group_array(); | 175 | static void initialize_group_array(void); |
176 | 176 | ||
177 | extern int | 177 | extern int |
178 | test_main(int argc, char** argv) | 178 | test_main(int argc, char** argv) |
@@ -226,8 +226,8 @@ test_main(int argc, char** argv) | |||
226 | 226 | ||
227 | static void | 227 | static void |
228 | syntax(op, msg) | 228 | syntax(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 */ |
459 | static int | 459 | static int |
460 | getn(s) | 460 | getn(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 | ||
481 | static int | 481 | static int |
482 | newerf (f1, f2) | 482 | newerf (f1, f2) |
483 | char *f1, *f2; | 483 | const 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 | ||
492 | static int | 492 | static int |
493 | olderf (f1, f2) | 493 | olderf (f1, f2) |
494 | char *f1, *f2; | 494 | const 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 | ||
503 | static int | 503 | static int |
504 | equalf (f1, f2) | 504 | equalf (f1, f2) |
505 | char *f1, *f2; | 505 | const 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 | ||
84 | static void init_signature_page() | 84 | static 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 | ||
62 | static void do_em_all() | 62 | static 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"); |