*: add -Wunused-parameter; fix resulting breakage
function old new delta
procps_scan 1265 1298 +33
aliascmd 278 283 +5
parse_file_cmd 116 120 +4
dname_enc 373 377 +4
setcmd 90 93 +3
execcmd 57 60 +3
count_lines 72 74 +2
process_command_subs 340 339 -1
test_main 409 407 -2
mknod_main 179 177 -2
handle_incoming_and_exit 2653 2651 -2
argstr 1312 1310 -2
shiftcmd 131 128 -3
exitcmd 46 43 -3
dotcmd 297 294 -3
breakcmd 86 83 -3
evalpipe 353 349 -4
evalcommand 1180 1176 -4
evalcmd 109 105 -4
send_tree 374 369 -5
mkfifo_main 82 77 -5
evalsubshell 152 147 -5
typecmd 75 69 -6
letcmd 61 55 -6
add_cmd 1190 1183 -7
main 891 883 -8
ash_main 1415 1407 -8
parse_stream 1377 1367 -10
alloc_procps_scan 55 - -55
------------------------------------------------------------------------------
(add/remove: 0/1 grow/shrink: 7/21 up/down: 54/-148) Total: -94 bytes
text data bss dec hex filename
797195 658 7428 805281 c49a1 busybox_old
797101 658 7428 805187 c4943 busybox_unstripped
diff --git a/shell/msh.c b/shell/msh.c
index 5ed6dfd..63f3659 100644
--- a/shell/msh.c
+++ b/shell/msh.c
@@ -589,7 +589,7 @@
};
static struct op *scantree(struct op *);
-static struct op *dowholefile(int, int);
+static struct op *dowholefile(int /*, int*/);
/* Globals */
@@ -1448,7 +1448,7 @@
PUSHIO(afile, f, filechar);
}
-static void onintr(int s) /* ANSI C requires a parameter */
+static void onintr(int s ATTRIBUTE_UNUSED) /* ANSI C requires a parameter */
{
signal(SIGINT, onintr);
intr = 1;
@@ -1864,11 +1864,11 @@
return t;
}
-static struct op *dowholefile(int type, int mark)
+static struct op *dowholefile(int type /*, int mark*/)
{
struct op *t;
- DBGPRINTF(("DOWHOLEFILE: enter, type=%d, mark=%d\n", type, mark));
+ DBGPRINTF(("DOWHOLEFILE: enter, type=%d\n", type /*, mark*/));
multiline++;
t = c_list();
@@ -2477,7 +2477,7 @@
newfile(evalstr(t->op_words[0], DOALL));
- t->left = dowholefile(TLIST, 0);
+ t->left = dowholefile(TLIST /*, 0*/);
t->right = NULL;
outtree = outtree_save;
@@ -3155,7 +3155,7 @@
* built-in commands: doX
*/
-static int dohelp(struct op *t, char **args)
+static int dohelp(struct op *t ATTRIBUTE_UNUSED, char **args ATTRIBUTE_UNUSED)
{
int col;
const struct builtincmd *x;
@@ -3191,12 +3191,12 @@
return EXIT_SUCCESS;
}
-static int dolabel(struct op *t, char **args)
+static int dolabel(struct op *t ATTRIBUTE_UNUSED, char **args ATTRIBUTE_UNUSED)
{
return 0;
}
-static int dochdir(struct op *t, char **args)
+static int dochdir(struct op *t ATTRIBUTE_UNUSED, char **args)
{
const char *cp, *er;
@@ -3217,7 +3217,7 @@
return 1;
}
-static int doshift(struct op *t, char **args)
+static int doshift(struct op *t ATTRIBUTE_UNUSED, char **args)
{
int n;
@@ -3236,7 +3236,7 @@
/*
* execute login and newgrp directly
*/
-static int dologin(struct op *t, char **args)
+static int dologin(struct op *t ATTRIBUTE_UNUSED, char **args)
{
const char *cp;
@@ -3251,7 +3251,7 @@
return 1;
}
-static int doumask(struct op *t, char **args)
+static int doumask(struct op *t ATTRIBUTE_UNUSED, char **args)
{
int i;
char *cp;
@@ -3301,7 +3301,7 @@
return 1;
}
-static int dodot(struct op *t, char **args)
+static int dodot(struct op *t ATTRIBUTE_UNUSED, char **args)
{
int i;
const char *sp;
@@ -3355,7 +3355,7 @@
return -1;
}
-static int dowait(struct op *t, char **args)
+static int dowait(struct op *t ATTRIBUTE_UNUSED, char **args)
{
int i;
char *cp;
@@ -3371,7 +3371,7 @@
return 0;
}
-static int doread(struct op *t, char **args)
+static int doread(struct op *t ATTRIBUTE_UNUSED, char **args)
{
char *cp, **wp;
int nb = 0;
@@ -3398,12 +3398,12 @@
return nb <= 0;
}
-static int doeval(struct op *t, char **args)
+static int doeval(struct op *t ATTRIBUTE_UNUSED, char **args)
{
return RUN(awordlist, args + 1, wdchar);
}
-static int dotrap(struct op *t, char **args)
+static int dotrap(struct op *t ATTRIBUTE_UNUSED, char **args)
{
int n, i;
int resetsig;
@@ -3484,12 +3484,12 @@
return n * m;
}
-static int dobreak(struct op *t, char **args)
+static int dobreak(struct op *t ATTRIBUTE_UNUSED, char **args)
{
return brkcontin(args[1], 1);
}
-static int docontinue(struct op *t, char **args)
+static int docontinue(struct op *t ATTRIBUTE_UNUSED, char **args)
{
return brkcontin(args[1], 0);
}
@@ -3517,7 +3517,7 @@
/* NOTREACHED */
}
-static int doexit(struct op *t, char **args)
+static int doexit(struct op *t ATTRIBUTE_UNUSED, char **args)
{
char *cp;
@@ -3533,13 +3533,13 @@
return 0;
}
-static int doexport(struct op *t, char **args)
+static int doexport(struct op *t ATTRIBUTE_UNUSED, char **args)
{
rdexp(args + 1, export, EXPORT);
return 0;
}
-static int doreadonly(struct op *t, char **args)
+static int doreadonly(struct op *t ATTRIBUTE_UNUSED, char **args)
{
rdexp(args + 1, ronly, RONLY);
return 0;
@@ -3575,7 +3575,7 @@
err(": bad identifier");
}
-static int doset(struct op *t, char **args)
+static int doset(struct op *t ATTRIBUTE_UNUSED, char **args)
{
struct var *vp;
char *cp;
@@ -3650,7 +3650,7 @@
#endif
}
-static int dotimes(struct op *t, char **args)
+static int dotimes(struct op *t ATTRIBUTE_UNUSED, char **args ATTRIBUTE_UNUSED)
{
struct tms buf;
unsigned clk_tck = sysconf(_SC_CLK_TCK);