*: 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
This commit is contained in:
parent
a55bd05f3c
commit
68404f13d4
@ -20,6 +20,7 @@ CPPFLAGS += \
|
||||
# flag checks are grouped together to speed the checks up a bit..
|
||||
CFLAGS += $(call cc-option,-Wall -Wshadow -Wwrite-strings,)
|
||||
CFLAGS += $(call cc-option,-Wundef -Wstrict-prototypes,)
|
||||
CFLAGS += $(call cc-option,-Wunused -Wunused-parameter,)
|
||||
# If you want to add "-Wmissing-prototypes -Wmissing-declarations" above
|
||||
# (or anything else for that matter) make sure that it is still possible
|
||||
# to build bbox without warnings. Current offender: find.c:alloc_action().
|
||||
|
@ -159,7 +159,7 @@ USE_DESKTOP(long long) int unpack_bunzip2(void)
|
||||
}
|
||||
|
||||
int bunzip2_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
|
||||
int bunzip2_main(int argc, char **argv)
|
||||
int bunzip2_main(int argc ATTRIBUTE_UNUSED, char **argv)
|
||||
{
|
||||
getopt32(argv, "cfvdt");
|
||||
argv += optind;
|
||||
@ -257,7 +257,7 @@ USE_DESKTOP(long long) int unpack_gunzip(void)
|
||||
}
|
||||
|
||||
int gunzip_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
|
||||
int gunzip_main(int argc, char **argv)
|
||||
int gunzip_main(int argc ATTRIBUTE_UNUSED, char **argv)
|
||||
{
|
||||
getopt32(argv, "cfvdt");
|
||||
argv += optind;
|
||||
@ -295,7 +295,7 @@ USE_DESKTOP(long long) int unpack_unlzma(void)
|
||||
}
|
||||
|
||||
int unlzma_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
|
||||
int unlzma_main(int argc, char **argv)
|
||||
int unlzma_main(int argc ATTRIBUTE_UNUSED, char **argv)
|
||||
{
|
||||
getopt32(argv, "cf");
|
||||
argv += optind;
|
||||
@ -337,7 +337,7 @@ USE_DESKTOP(long long) int unpack_uncompress(void)
|
||||
}
|
||||
|
||||
int uncompress_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
|
||||
int uncompress_main(int argc, char **argv)
|
||||
int uncompress_main(int argc ATTRIBUTE_UNUSED, char **argv)
|
||||
{
|
||||
getopt32(argv, "cf");
|
||||
argv += optind;
|
||||
|
@ -949,7 +949,7 @@ static int package_satisfies_dependency(int package, int depend_type)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int check_deps(deb_file_t **deb_file, int deb_start, int dep_max_count)
|
||||
static int check_deps(deb_file_t **deb_file, int deb_start /*, int dep_max_count - ?? */)
|
||||
{
|
||||
int *conflicts = NULL;
|
||||
int conflicts_num = 0;
|
||||
@ -1689,7 +1689,7 @@ int dpkg_main(int argc, char **argv)
|
||||
|
||||
/* Check that the deb file arguments are installable */
|
||||
if (!(opt & OPT_force_ignore_depends)) {
|
||||
if (!check_deps(deb_file, 0, deb_count)) {
|
||||
if (!check_deps(deb_file, 0 /*, deb_count*/)) {
|
||||
bb_error_msg_and_die("dependency check failed");
|
||||
}
|
||||
}
|
||||
|
@ -13,7 +13,7 @@
|
||||
#include "libbb.h"
|
||||
|
||||
int clear_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
|
||||
int clear_main(int argc, char **argv)
|
||||
int clear_main(int argc ATTRIBUTE_UNUSED, char **argv ATTRIBUTE_UNUSED)
|
||||
{
|
||||
return printf("\033[H\033[J") != 6;
|
||||
}
|
||||
|
@ -167,7 +167,7 @@ static void loadnewfont(int fd)
|
||||
}
|
||||
|
||||
int loadfont_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
|
||||
int loadfont_main(int argc, char **argv)
|
||||
int loadfont_main(int argc, char **argv ATTRIBUTE_UNUSED)
|
||||
{
|
||||
int fd;
|
||||
|
||||
|
@ -26,7 +26,7 @@ struct kbentry {
|
||||
#define MAX_NR_KEYMAPS 256
|
||||
|
||||
int loadkmap_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
|
||||
int loadkmap_main(int argc, char **argv)
|
||||
int loadkmap_main(int argc, char **argv ATTRIBUTE_UNUSED)
|
||||
{
|
||||
struct kbentry ke;
|
||||
int i, j, fd;
|
||||
|
@ -18,7 +18,7 @@ int stty_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
|
||||
#endif
|
||||
|
||||
int reset_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
|
||||
int reset_main(int argc, char **argv)
|
||||
int reset_main(int argc ATTRIBUTE_UNUSED, char **argv ATTRIBUTE_UNUSED)
|
||||
{
|
||||
static const char *const args[] = {
|
||||
"stty", "sane", NULL
|
||||
|
@ -21,7 +21,7 @@ onintr(int sig ATTRIBUTE_UNUSED)
|
||||
}
|
||||
|
||||
int resize_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
|
||||
int resize_main(int argc, char **argv)
|
||||
int resize_main(int argc ATTRIBUTE_UNUSED, char **argv ATTRIBUTE_UNUSED)
|
||||
{
|
||||
struct termios new;
|
||||
struct winsize w = { 0, 0, 0, 0 };
|
||||
|
@ -44,7 +44,7 @@ int bb_cat(char **argv)
|
||||
}
|
||||
|
||||
int cat_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
|
||||
int cat_main(int argc, char **argv)
|
||||
int cat_main(int argc ATTRIBUTE_UNUSED, char **argv)
|
||||
{
|
||||
getopt32(argv, "u");
|
||||
argv += optind;
|
||||
|
@ -13,7 +13,7 @@
|
||||
#include "libbb.h"
|
||||
|
||||
int catv_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
|
||||
int catv_main(int argc, char **argv)
|
||||
int catv_main(int argc ATTRIBUTE_UNUSED, char **argv)
|
||||
{
|
||||
int retval = EXIT_SUCCESS;
|
||||
int fd;
|
||||
|
@ -68,7 +68,7 @@ static int fileAction(const char *fileName, struct stat *statbuf, void* param, i
|
||||
}
|
||||
|
||||
int chmod_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
|
||||
int chmod_main(int argc, char **argv)
|
||||
int chmod_main(int argc ATTRIBUTE_UNUSED, char **argv)
|
||||
{
|
||||
int retval = EXIT_SUCCESS;
|
||||
char *arg, **argp;
|
||||
|
@ -42,7 +42,7 @@ typedef int (*chown_fptr)(const char *, uid_t, gid_t);
|
||||
static struct bb_uidgid_t ugid = { -1, -1 };
|
||||
|
||||
static int fileAction(const char *fileName, struct stat *statbuf,
|
||||
void *cf, int depth)
|
||||
void *cf, int depth ATTRIBUTE_UNUSED)
|
||||
{
|
||||
uid_t u = (ugid.uid == (uid_t)-1) ? statbuf->st_uid : ugid.uid;
|
||||
gid_t g = (ugid.gid == (gid_t)-1) ? statbuf->st_gid : ugid.gid;
|
||||
@ -62,7 +62,7 @@ static int fileAction(const char *fileName, struct stat *statbuf,
|
||||
}
|
||||
|
||||
int chown_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
|
||||
int chown_main(int argc, char **argv)
|
||||
int chown_main(int argc ATTRIBUTE_UNUSED, char **argv)
|
||||
{
|
||||
int retval = EXIT_SUCCESS;
|
||||
int flags;
|
||||
|
@ -36,7 +36,7 @@ static void writeline(char *line, int class, int flags)
|
||||
}
|
||||
|
||||
int comm_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
|
||||
int comm_main(int argc, char **argv)
|
||||
int comm_main(int argc ATTRIBUTE_UNUSED, char **argv)
|
||||
{
|
||||
#define LINE_LEN 100
|
||||
#define BB_EOF_0 0x1
|
||||
|
@ -162,7 +162,7 @@ static void cut_file(FILE *file, char delim)
|
||||
}
|
||||
|
||||
int cut_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
|
||||
int cut_main(int argc, char **argv)
|
||||
int cut_main(int argc ATTRIBUTE_UNUSED, char **argv)
|
||||
{
|
||||
char delim = '\t'; /* delimiter, default is tab */
|
||||
char *sopt, *ltok;
|
||||
|
@ -141,7 +141,7 @@ static unsigned long du(const char *filename)
|
||||
}
|
||||
|
||||
int du_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
|
||||
int du_main(int argc, char **argv)
|
||||
int du_main(int argc ATTRIBUTE_UNUSED, char **argv)
|
||||
{
|
||||
unsigned long total;
|
||||
int slink_depth_save;
|
||||
|
@ -31,7 +31,7 @@
|
||||
* using call -> jump optimization */
|
||||
|
||||
int echo_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
|
||||
int echo_main(int argc, char **argv)
|
||||
int echo_main(int argc ATTRIBUTE_UNUSED, char **argv)
|
||||
{
|
||||
const char *arg;
|
||||
#if !ENABLE_FEATURE_FANCY_ECHO
|
||||
|
@ -40,7 +40,7 @@ static const char env_longopts[] ALIGN1 =
|
||||
#endif
|
||||
|
||||
int env_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
|
||||
int env_main(int argc, char **argv)
|
||||
int env_main(int argc ATTRIBUTE_UNUSED, char **argv)
|
||||
{
|
||||
/* cleanenv was static - why? */
|
||||
char *cleanenv[1];
|
||||
|
@ -126,7 +126,7 @@ static void unexpand(FILE *file, unsigned int tab_size, unsigned opt)
|
||||
#endif
|
||||
|
||||
int expand_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
|
||||
int expand_main(int argc, char **argv)
|
||||
int expand_main(int argc ATTRIBUTE_UNUSED, char **argv)
|
||||
{
|
||||
/* Default 8 spaces for 1 tab */
|
||||
const char *opt_t = "8";
|
||||
|
@ -37,7 +37,7 @@ static int printf_full(unsigned int id, const char *arg, const char prefix)
|
||||
}
|
||||
|
||||
int id_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
|
||||
int id_main(int argc, char **argv)
|
||||
int id_main(int argc ATTRIBUTE_UNUSED, char **argv)
|
||||
{
|
||||
struct passwd *p;
|
||||
uid_t uid;
|
||||
|
@ -11,6 +11,6 @@ typedef int (*stat_func)(const char *fn, struct stat *ps);
|
||||
int cp_mv_stat2(const char *fn, struct stat *fn_stat, stat_func sf);
|
||||
int cp_mv_stat(const char *fn, struct stat *fn_stat);
|
||||
|
||||
mode_t getopt_mk_fifo_nod(int argc, char **argv);
|
||||
mode_t getopt_mk_fifo_nod(char **argv);
|
||||
|
||||
#endif
|
||||
|
@ -23,7 +23,7 @@
|
||||
#include "libbb.h"
|
||||
#include "coreutils.h"
|
||||
|
||||
mode_t getopt_mk_fifo_nod(int argc, char **argv)
|
||||
mode_t getopt_mk_fifo_nod(char **argv)
|
||||
{
|
||||
mode_t mode = 0666;
|
||||
char *smode = NULL;
|
||||
|
@ -14,12 +14,12 @@
|
||||
#include "libcoreutils/coreutils.h"
|
||||
|
||||
int mkfifo_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
|
||||
int mkfifo_main(int argc, char **argv)
|
||||
int mkfifo_main(int argc ATTRIBUTE_UNUSED, char **argv)
|
||||
{
|
||||
mode_t mode;
|
||||
int retval = EXIT_SUCCESS;
|
||||
|
||||
mode = getopt_mk_fifo_nod(argc, argv);
|
||||
mode = getopt_mk_fifo_nod(argv);
|
||||
|
||||
argv += optind;
|
||||
if (!*argv) {
|
||||
|
@ -24,7 +24,7 @@ int mknod_main(int argc, char **argv)
|
||||
dev_t dev;
|
||||
const char *name;
|
||||
|
||||
mode = getopt_mk_fifo_nod(argc, argv);
|
||||
mode = getopt_mk_fifo_nod(argv);
|
||||
argv += optind;
|
||||
argc -= optind;
|
||||
|
||||
|
@ -12,7 +12,7 @@
|
||||
/* This is a NOFORK applet. Be very careful! */
|
||||
|
||||
int pwd_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
|
||||
int pwd_main(int argc, char **argv)
|
||||
int pwd_main(int argc ATTRIBUTE_UNUSED, char **argv ATTRIBUTE_UNUSED)
|
||||
{
|
||||
char *buf;
|
||||
|
||||
|
@ -11,7 +11,7 @@
|
||||
#include "libbb.h"
|
||||
|
||||
int readlink_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
|
||||
int readlink_main(int argc, char **argv)
|
||||
int readlink_main(int argc ATTRIBUTE_UNUSED, char **argv)
|
||||
{
|
||||
char *buf;
|
||||
char *fname;
|
||||
|
@ -20,7 +20,7 @@
|
||||
/* This is a NOFORK applet. Be very careful! */
|
||||
|
||||
int rm_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
|
||||
int rm_main(int argc, char **argv)
|
||||
int rm_main(int argc ATTRIBUTE_UNUSED, char **argv)
|
||||
{
|
||||
int status = 0;
|
||||
int flags = 0;
|
||||
|
@ -19,7 +19,7 @@
|
||||
#define IGNORE_NON_EMPTY 0x02
|
||||
|
||||
int rmdir_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
|
||||
int rmdir_main(int argc, char **argv)
|
||||
int rmdir_main(int argc ATTRIBUTE_UNUSED, char **argv)
|
||||
{
|
||||
int status = EXIT_SUCCESS;
|
||||
int flags;
|
||||
|
@ -275,7 +275,7 @@ static unsigned str2u(char **str)
|
||||
#endif
|
||||
|
||||
int sort_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
|
||||
int sort_main(int argc, char **argv)
|
||||
int sort_main(int argc ATTRIBUTE_UNUSED, char **argv)
|
||||
{
|
||||
FILE *fp, *outfile = stdout;
|
||||
char *line, **lines = NULL;
|
||||
|
@ -56,7 +56,7 @@ enum { READ_BUFFER_SIZE = COMMON_BUFSIZE - 1 };
|
||||
#define SPLIT_OPT_a (1<<2)
|
||||
|
||||
int split_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
|
||||
int split_main(int argc, char **argv)
|
||||
int split_main(int argc ATTRIBUTE_UNUSED, char **argv)
|
||||
{
|
||||
unsigned suffix_len = 2;
|
||||
char *pfx;
|
||||
|
@ -14,8 +14,9 @@
|
||||
/* This is a NOFORK applet. Be very careful! */
|
||||
|
||||
int sync_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
|
||||
int sync_main(int argc, char **argv)
|
||||
int sync_main(int argc, char **argv ATTRIBUTE_UNUSED)
|
||||
{
|
||||
/* coreutils-6.9 compat */
|
||||
bb_warn_ignoring_args(argc - 1);
|
||||
|
||||
sync();
|
||||
|
@ -26,7 +26,7 @@ struct lstring {
|
||||
};
|
||||
|
||||
int tac_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
|
||||
int tac_main(int argc, char **argv)
|
||||
int tac_main(int argc ATTRIBUTE_UNUSED, char **argv)
|
||||
{
|
||||
char **name;
|
||||
FILE *f;
|
||||
|
@ -22,7 +22,7 @@
|
||||
/* This is a NOFORK applet. Be very careful! */
|
||||
|
||||
int touch_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
|
||||
int touch_main(int argc, char **argv)
|
||||
int touch_main(int argc ATTRIBUTE_UNUSED, char **argv)
|
||||
{
|
||||
int fd;
|
||||
int status = EXIT_SUCCESS;
|
||||
|
@ -174,7 +174,7 @@ static int complement(char *buffer, int buffer_len)
|
||||
}
|
||||
|
||||
int tr_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
|
||||
int tr_main(int argc, char **argv)
|
||||
int tr_main(int argc ATTRIBUTE_UNUSED, char **argv)
|
||||
{
|
||||
int output_length = 0, input_length;
|
||||
int i;
|
||||
|
@ -15,7 +15,7 @@
|
||||
/* This is a NOFORK applet. Be very careful! */
|
||||
|
||||
int true_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
|
||||
int true_main(int argc, char **argv)
|
||||
int true_main(int argc ATTRIBUTE_UNUSED, char **argv ATTRIBUTE_UNUSED)
|
||||
{
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
|
@ -13,7 +13,7 @@
|
||||
#include "libbb.h"
|
||||
|
||||
int tty_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
|
||||
int tty_main(int argc, char **argv)
|
||||
int tty_main(int argc, char **argv SKIP_INCLUDE_SUSv2(ATTRIBUTE_UNUSED))
|
||||
{
|
||||
const char *s;
|
||||
USE_INCLUDE_SUSv2(int silent;) /* Note: No longer relevant in SUSv3. */
|
||||
@ -22,15 +22,17 @@ int tty_main(int argc, char **argv)
|
||||
xfunc_error_retval = 2; /* SUSv3 requires > 1 for error. */
|
||||
|
||||
USE_INCLUDE_SUSv2(silent = getopt32(argv, "s");)
|
||||
USE_INCLUDE_SUSv2(argc -= optind;)
|
||||
SKIP_INCLUDE_SUSv2(argc -= 1;)
|
||||
|
||||
/* gnu tty outputs a warning that it is ignoring all args. */
|
||||
bb_warn_ignoring_args(argc - optind);
|
||||
bb_warn_ignoring_args(argc);
|
||||
|
||||
retval = 0;
|
||||
|
||||
s = ttyname(0);
|
||||
if (s == NULL) {
|
||||
/* According to SUSv3, ttyname can on fail with EBADF or ENOTTY.
|
||||
/* According to SUSv3, ttyname can fail with EBADF or ENOTTY.
|
||||
* We know the file descriptor is good, so failure means not a tty. */
|
||||
s = "not a tty";
|
||||
retval = 1;
|
||||
|
@ -28,7 +28,7 @@ static FILE *xgetoptfile_uniq_s(char **argv, int read0write2)
|
||||
}
|
||||
|
||||
int uniq_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
|
||||
int uniq_main(int argc, char **argv)
|
||||
int uniq_main(int argc ATTRIBUTE_UNUSED, char **argv)
|
||||
{
|
||||
FILE *in, *out;
|
||||
unsigned long dups, skip_fields, skip_chars, i;
|
||||
|
@ -127,7 +127,7 @@ static void read_base64(FILE *src_stream, FILE *dst_stream)
|
||||
}
|
||||
|
||||
int uudecode_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
|
||||
int uudecode_main(int argc, char **argv)
|
||||
int uudecode_main(int argc ATTRIBUTE_UNUSED, char **argv)
|
||||
{
|
||||
FILE *src_stream = stdin;
|
||||
char *outname = NULL;
|
||||
|
@ -69,7 +69,7 @@ enum {
|
||||
};
|
||||
|
||||
int wc_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
|
||||
int wc_main(int argc, char **argv)
|
||||
int wc_main(int argc ATTRIBUTE_UNUSED, char **argv)
|
||||
{
|
||||
FILE *fp;
|
||||
const char *s, *arg;
|
||||
|
@ -41,7 +41,7 @@ static void idle_string(char *str6, time_t t)
|
||||
}
|
||||
|
||||
int who_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
|
||||
int who_main(int argc, char **argv)
|
||||
int who_main(int argc ATTRIBUTE_UNUSED, char **argv)
|
||||
{
|
||||
char str6[6];
|
||||
struct utmp *ut;
|
||||
|
@ -14,7 +14,7 @@
|
||||
/* This is a NOFORK applet. Be very careful! */
|
||||
|
||||
int whoami_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
|
||||
int whoami_main(int argc, char **argv)
|
||||
int whoami_main(int argc, char **argv ATTRIBUTE_UNUSED)
|
||||
{
|
||||
if (argc > 1)
|
||||
bb_show_usage();
|
||||
|
@ -12,7 +12,7 @@
|
||||
#include "libbb.h"
|
||||
|
||||
int mktemp_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
|
||||
int mktemp_main(int argc, char **argv)
|
||||
int mktemp_main(int argc ATTRIBUTE_UNUSED, char **argv)
|
||||
{
|
||||
// -d Make a directory instead of a file
|
||||
// -q Fail silently if an error occurs [bbox: ignored]
|
||||
|
@ -15,7 +15,7 @@
|
||||
* Activity is indicated by a '.' to stderr
|
||||
*/
|
||||
int pipe_progress_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
|
||||
int pipe_progress_main(int argc, char **argv)
|
||||
int pipe_progress_main(int argc ATTRIBUTE_UNUSED, char **argv ATTRIBUTE_UNUSED)
|
||||
{
|
||||
RESERVE_CONFIG_BUFFER(buf, PIPE_PROGRESS_SIZE);
|
||||
time_t t = time(NULL);
|
||||
|
@ -79,7 +79,7 @@ static int bb_alphasort(const void *p1, const void *p2)
|
||||
return (option_mask32 & OPT_r) ? -r : r;
|
||||
}
|
||||
|
||||
static int act(const char *file, struct stat *statbuf, void *args, int depth)
|
||||
static int act(const char *file, struct stat *statbuf, void *args ATTRIBUTE_UNUSED, int depth)
|
||||
{
|
||||
if (depth == 1)
|
||||
return TRUE;
|
||||
@ -113,7 +113,7 @@ static const char runparts_longopts[] ALIGN1 =
|
||||
#endif
|
||||
|
||||
int run_parts_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
|
||||
int run_parts_main(int argc, char **argv)
|
||||
int run_parts_main(int argc ATTRIBUTE_UNUSED, char **argv)
|
||||
{
|
||||
const char *umask_p = "22";
|
||||
llist_t *arg_list = NULL;
|
||||
|
@ -125,7 +125,7 @@ static void change_attributes(const char *name, struct globals *gp)
|
||||
}
|
||||
|
||||
int chattr_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
|
||||
int chattr_main(int argc, char **argv)
|
||||
int chattr_main(int argc ATTRIBUTE_UNUSED, char **argv)
|
||||
{
|
||||
struct globals g;
|
||||
char *arg;
|
||||
|
@ -1128,7 +1128,7 @@ static void signal_cancel(int sig ATTRIBUTE_UNUSED)
|
||||
}
|
||||
|
||||
int fsck_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
|
||||
int fsck_main(int argc, char **argv)
|
||||
int fsck_main(int argc ATTRIBUTE_UNUSED, char **argv)
|
||||
{
|
||||
int i, status;
|
||||
/*int interactive;*/
|
||||
|
@ -58,7 +58,7 @@ static void list_attributes(const char *name)
|
||||
}
|
||||
|
||||
static int lsattr_dir_proc(const char *dir_name, struct dirent *de,
|
||||
void *private)
|
||||
void *private ATTRIBUTE_UNUSED)
|
||||
{
|
||||
struct stat st;
|
||||
char *path;
|
||||
@ -96,7 +96,7 @@ static void lsattr_args(const char *name)
|
||||
}
|
||||
|
||||
int lsattr_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
|
||||
int lsattr_main(int argc, char **argv)
|
||||
int lsattr_main(int argc ATTRIBUTE_UNUSED, char **argv)
|
||||
{
|
||||
getopt32(argv, "Radlv");
|
||||
argv += optind;
|
||||
|
@ -43,7 +43,7 @@ static const char opt_chars[] ALIGN1 = "sl";
|
||||
#define CMP_OPT_l (1<<1)
|
||||
|
||||
int cmp_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
|
||||
int cmp_main(int argc, char **argv)
|
||||
int cmp_main(int argc ATTRIBUTE_UNUSED, char **argv)
|
||||
{
|
||||
FILE *fp1, *fp2, *outfile = stdout;
|
||||
const char *filename1, *filename2 = "-";
|
||||
|
@ -1205,7 +1205,7 @@ static void diffdir(char *p1, char *p2)
|
||||
|
||||
|
||||
int diff_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
|
||||
int diff_main(int argc, char **argv)
|
||||
int diff_main(int argc ATTRIBUTE_UNUSED, char **argv)
|
||||
{
|
||||
bool gotstdin = 0;
|
||||
char *U_opt;
|
||||
|
@ -78,7 +78,7 @@ static int file_doesnt_exist(const char *filename)
|
||||
}
|
||||
|
||||
int patch_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
|
||||
int patch_main(int argc, char **argv)
|
||||
int patch_main(int argc ATTRIBUTE_UNUSED, char **argv)
|
||||
{
|
||||
int patch_level = -1;
|
||||
char *patch_line;
|
||||
|
@ -301,7 +301,7 @@ static int get_address(const char *my_str, int *linenum, regex_t ** regex)
|
||||
}
|
||||
|
||||
/* Grab a filename. Whitespace at start is skipped, then goes to EOL. */
|
||||
static int parse_file_cmd(sed_cmd_t *sed_cmd, const char *filecmdstr, char **retval)
|
||||
static int parse_file_cmd(/*sed_cmd_t *sed_cmd,*/ const char *filecmdstr, char **retval)
|
||||
{
|
||||
int start = 0, idx, hack = 0;
|
||||
|
||||
@ -375,7 +375,7 @@ static int parse_subst_cmd(sed_cmd_t *sed_cmd, const char *substr)
|
||||
case 'w':
|
||||
{
|
||||
char *temp;
|
||||
idx += parse_file_cmd(sed_cmd, substr+idx, &temp);
|
||||
idx += parse_file_cmd(/*sed_cmd,*/ substr+idx, &temp);
|
||||
break;
|
||||
}
|
||||
/* Ignore case (gnu exension) */
|
||||
@ -436,7 +436,7 @@ static const char *parse_cmd_args(sed_cmd_t *sed_cmd, const char *cmdstr)
|
||||
} else if (strchr("rw", sed_cmd->cmd)) {
|
||||
if (sed_cmd->end_line || sed_cmd->end_match)
|
||||
bb_error_msg_and_die("command only uses one address");
|
||||
cmdstr += parse_file_cmd(sed_cmd, cmdstr, &sed_cmd->string);
|
||||
cmdstr += parse_file_cmd(/*sed_cmd,*/ cmdstr, &sed_cmd->string);
|
||||
if (sed_cmd->cmd == 'w') {
|
||||
sed_cmd->sw_file = xfopen(sed_cmd->string, "w");
|
||||
sed_cmd->sw_last_char = '\n';
|
||||
|
@ -301,7 +301,7 @@ static void status_line_bold(const char *, ...);
|
||||
static void not_implemented(const char *); // display "Not implemented" message
|
||||
static int format_edit_status(void); // format file status on status line
|
||||
static void redraw(int); // force a full screen refresh
|
||||
static char* format_line(char*, int);
|
||||
static char* format_line(char* /*, int*/);
|
||||
static void refresh(int); // update the terminal from screen[]
|
||||
|
||||
static void Indicate_Error(void); // use flash or beep to indicate error
|
||||
@ -2764,7 +2764,7 @@ static void redraw(int full_screen)
|
||||
}
|
||||
|
||||
//----- Format a text[] line into a buffer ---------------------
|
||||
static char* format_line(char *src, int li)
|
||||
static char* format_line(char *src /*, int li*/)
|
||||
{
|
||||
unsigned char c;
|
||||
int co;
|
||||
@ -2848,7 +2848,7 @@ static void refresh(int full_screen)
|
||||
int cs, ce; // column start & end
|
||||
char *out_buf;
|
||||
// format current text line
|
||||
out_buf = format_line(tp, li);
|
||||
out_buf = format_line(tp /*, li*/);
|
||||
|
||||
// skip to the end of the current text[] line
|
||||
if (tp < end) {
|
||||
|
@ -74,7 +74,9 @@ typedef struct {
|
||||
#endif
|
||||
} action;
|
||||
#define ACTS(name, arg...) typedef struct { action a; arg; } action_##name;
|
||||
#define ACTF(name) static int func_##name(const char *fileName, struct stat *statbuf, action_##name* ap)
|
||||
#define ACTF(name) static int func_##name(const char *fileName ATTRIBUTE_UNUSED, \
|
||||
struct stat *statbuf ATTRIBUTE_UNUSED, \
|
||||
action_##name* ap ATTRIBUTE_UNUSED)
|
||||
ACTS(print)
|
||||
ACTS(name, const char *pattern; bool iname;)
|
||||
USE_FEATURE_FIND_PATH( ACTS(path, const char *pattern;))
|
||||
|
@ -371,7 +371,7 @@ static void load_regexes_from_file(llist_t *fopt)
|
||||
}
|
||||
}
|
||||
|
||||
static int file_action_grep(const char *filename, struct stat *statbuf, void* matched, int depth)
|
||||
static int file_action_grep(const char *filename, struct stat *statbuf ATTRIBUTE_UNUSED, void* matched, int depth ATTRIBUTE_UNUSED)
|
||||
{
|
||||
FILE *file = fopen(filename, "r");
|
||||
if (file == NULL) {
|
||||
|
@ -59,7 +59,9 @@ extern const uint8_t applet_install_loc[];
|
||||
/* Length of these names has effect on size of libbusybox
|
||||
* and "individual" binaries. Keep them short.
|
||||
*/
|
||||
void lbb_prepare(const char *applet, char **argv) MAIN_EXTERNALLY_VISIBLE;
|
||||
void lbb_prepare(const char *applet
|
||||
USE_FEATURE_INDIVIDUAL(, char **argv)
|
||||
) MAIN_EXTERNALLY_VISIBLE;
|
||||
#if ENABLE_BUILD_LIBBUSYBOX
|
||||
#if ENABLE_FEATURE_SHARED_BUSYBOX
|
||||
int lbb_main(int argc, char **argv) EXTERNALLY_VISIBLE;
|
||||
|
@ -1120,7 +1120,7 @@ enum {
|
||||
| PSSCAN_STIME | PSSCAN_UTIME | PSSCAN_START_TIME
|
||||
| PSSCAN_TTY,
|
||||
};
|
||||
procps_status_t* alloc_procps_scan(int flags);
|
||||
//procps_status_t* alloc_procps_scan(void);
|
||||
void free_procps_scan(procps_status_t* sp);
|
||||
procps_status_t* procps_scan(procps_status_t* sp, int flags);
|
||||
/* Format cmdline (up to col chars) into char buf[col+1] */
|
||||
|
@ -143,7 +143,7 @@ static void connection_status(void)
|
||||
bb_error_msg("status %u/%u", cnum, cmax);
|
||||
}
|
||||
|
||||
static void sig_child_handler(int sig)
|
||||
static void sig_child_handler(int sig ATTRIBUTE_UNUSED)
|
||||
{
|
||||
int wstat;
|
||||
int pid;
|
||||
@ -161,7 +161,7 @@ static void sig_child_handler(int sig)
|
||||
}
|
||||
|
||||
int tcpudpsvd_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
|
||||
int tcpudpsvd_main(int argc, char **argv)
|
||||
int tcpudpsvd_main(int argc ATTRIBUTE_UNUSED, char **argv)
|
||||
{
|
||||
char *str_c, *str_C, *str_b, *str_t;
|
||||
char *user;
|
||||
|
@ -123,7 +123,8 @@ int find_applet_by_name(const char *name)
|
||||
int *const bb_errno __attribute__ ((section (".data")));
|
||||
#endif
|
||||
|
||||
void lbb_prepare(const char *applet, char **argv)
|
||||
void lbb_prepare(const char *applet
|
||||
USE_FEATURE_INDIVIDUAL(, char **argv))
|
||||
{
|
||||
#ifdef __GLIBC__
|
||||
(*(int **)&bb_errno) = __errno_location();
|
||||
@ -662,10 +663,10 @@ void run_applet_and_exit(const char *name, char **argv)
|
||||
#if ENABLE_BUILD_LIBBUSYBOX
|
||||
int lbb_main(int argc, char **argv)
|
||||
#else
|
||||
int main(int argc, char **argv)
|
||||
int main(int argc ATTRIBUTE_UNUSED, char **argv)
|
||||
#endif
|
||||
{
|
||||
lbb_prepare("busybox", argv);
|
||||
lbb_prepare("busybox" USE_FEATURE_INDIVIDUAL(, argv));
|
||||
|
||||
#if !BB_MMU
|
||||
/* NOMMU re-exec trick sets high-order bit in first byte of name */
|
||||
|
@ -93,7 +93,7 @@ static int read_to_buf(const char *filename, void *buf)
|
||||
return ret;
|
||||
}
|
||||
|
||||
procps_status_t *alloc_procps_scan(int flags)
|
||||
static procps_status_t *alloc_procps_scan(void)
|
||||
{
|
||||
unsigned n = getpagesize();
|
||||
procps_status_t* sp = xzalloc(sizeof(procps_status_t));
|
||||
@ -175,7 +175,7 @@ procps_status_t *procps_scan(procps_status_t* sp, int flags)
|
||||
struct stat sb;
|
||||
|
||||
if (!sp)
|
||||
sp = alloc_procps_scan(flags);
|
||||
sp = alloc_procps_scan();
|
||||
|
||||
for (;;) {
|
||||
entry = readdir(sp->dir);
|
||||
|
@ -22,8 +22,10 @@
|
||||
* is so stinking huge.
|
||||
*/
|
||||
|
||||
static int true_action(const char *fileName, struct stat *statbuf,
|
||||
void* userData, int depth)
|
||||
static int true_action(const char *fileName ATTRIBUTE_UNUSED,
|
||||
struct stat *statbuf ATTRIBUTE_UNUSED,
|
||||
void* userData ATTRIBUTE_UNUSED,
|
||||
int depth ATTRIBUTE_UNUSED)
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
|
@ -85,7 +85,7 @@ static const char adduser_longopts[] ALIGN1 =
|
||||
* can be customized via command-line parameters.
|
||||
*/
|
||||
int adduser_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
|
||||
int adduser_main(int argc, char **argv)
|
||||
int adduser_main(int argc ATTRIBUTE_UNUSED, char **argv)
|
||||
{
|
||||
struct passwd pw;
|
||||
const char *usegroup = NULL;
|
||||
|
@ -21,7 +21,7 @@ static const char chpasswd_longopts[] ALIGN1 =
|
||||
#define OPT_MD5 2
|
||||
|
||||
int chpasswd_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
|
||||
int chpasswd_main(int argc, char **argv)
|
||||
int chpasswd_main(int argc ATTRIBUTE_UNUSED, char **argv)
|
||||
{
|
||||
char *name, *pass;
|
||||
char salt[sizeof("$N$XXXXXXXX")];
|
||||
|
@ -8,7 +8,7 @@
|
||||
#include "libbb.h"
|
||||
|
||||
int cryptpw_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
|
||||
int cryptpw_main(int argc, char **argv)
|
||||
int cryptpw_main(int argc ATTRIBUTE_UNUSED, char **argv)
|
||||
{
|
||||
char salt[sizeof("$N$XXXXXXXX")];
|
||||
|
||||
|
@ -367,7 +367,7 @@ static void auto_baud(char *buf, unsigned size_buf, struct termios *tp)
|
||||
}
|
||||
|
||||
/* do_prompt - show login prompt, optionally preceded by /etc/issue contents */
|
||||
static void do_prompt(struct options *op, struct termios *tp)
|
||||
static void do_prompt(struct options *op)
|
||||
{
|
||||
#ifdef ISSUE
|
||||
print_login_issue(op->issue, op->tty);
|
||||
@ -390,7 +390,7 @@ static int all_is_upcase(const char *s)
|
||||
/* get_logname - get user name, establish parity, speed, erase, kill, eol;
|
||||
* return NULL on BREAK, logname on success */
|
||||
static char *get_logname(char *logname, unsigned size_logname,
|
||||
struct options *op, struct chardata *cp, struct termios *tp)
|
||||
struct options *op, struct chardata *cp)
|
||||
{
|
||||
char *bp;
|
||||
char c; /* input character, full eight bits */
|
||||
@ -414,7 +414,7 @@ static char *get_logname(char *logname, unsigned size_logname,
|
||||
logname[0] = '\0';
|
||||
while (!logname[0]) {
|
||||
/* Write issue file and prompt, with "parity" bit == 0. */
|
||||
do_prompt(op, tp);
|
||||
do_prompt(op);
|
||||
|
||||
/* Read name, watch for break, parity, erase, kill, end-of-line. */
|
||||
bp = logname;
|
||||
@ -621,7 +621,7 @@ static void update_utmp(const char *line, char *fakehost)
|
||||
#endif /* CONFIG_FEATURE_UTMP */
|
||||
|
||||
int getty_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
|
||||
int getty_main(int argc, char **argv)
|
||||
int getty_main(int argc ATTRIBUTE_UNUSED, char **argv)
|
||||
{
|
||||
int n;
|
||||
char *fakehost = NULL; /* Fake hostname for ut_host */
|
||||
@ -670,7 +670,7 @@ int getty_main(int argc, char **argv)
|
||||
|
||||
#ifdef DEBUGGING
|
||||
dbf = xfopen(DEBUGTERM, "w");
|
||||
for (n = 1; n < argc; n++) {
|
||||
for (n = 1; argv[n]; n++) {
|
||||
debug(argv[n]);
|
||||
debug("\n");
|
||||
}
|
||||
@ -750,7 +750,7 @@ int getty_main(int argc, char **argv)
|
||||
/* Read the login name. */
|
||||
debug("reading login name\n");
|
||||
logname = get_logname(line_buf, sizeof(line_buf),
|
||||
&options, &chardata, &termios);
|
||||
&options, &chardata);
|
||||
if (logname)
|
||||
break;
|
||||
/* we are here only if options.numspeed > 1 */
|
||||
|
@ -114,7 +114,7 @@ static void write_utent(struct utmp *utptr, const char *username)
|
||||
#endif /* !ENABLE_FEATURE_UTMP */
|
||||
|
||||
#if ENABLE_FEATURE_NOLOGIN
|
||||
static void die_if_nologin_and_non_root(int amroot)
|
||||
static void die_if_nologin(void)
|
||||
{
|
||||
FILE *fp;
|
||||
int c;
|
||||
@ -135,7 +135,7 @@ static void die_if_nologin_and_non_root(int amroot)
|
||||
puts("\r\n[Disconnect bypassed -- root login allowed]\r");
|
||||
}
|
||||
#else
|
||||
static ALWAYS_INLINE void die_if_nologin_and_non_root(int amroot) {}
|
||||
static ALWAYS_INLINE void die_if_nologin(void) {}
|
||||
#endif
|
||||
|
||||
#if ENABLE_FEATURE_SECURETTY && !ENABLE_PAM
|
||||
@ -406,7 +406,8 @@ int login_main(int argc, char **argv)
|
||||
}
|
||||
|
||||
alarm(0);
|
||||
die_if_nologin_and_non_root(pw->pw_uid == 0);
|
||||
if (!amroot)
|
||||
die_if_nologin();
|
||||
|
||||
write_utent(&utent, username);
|
||||
|
||||
|
@ -70,7 +70,7 @@ static char* new_password(const struct passwd *pw, uid_t myuid, int algo)
|
||||
}
|
||||
|
||||
int passwd_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
|
||||
int passwd_main(int argc, char **argv)
|
||||
int passwd_main(int argc ATTRIBUTE_UNUSED, char **argv)
|
||||
{
|
||||
enum {
|
||||
OPT_algo = 0x1, /* -a - password algorithm */
|
||||
|
@ -15,7 +15,7 @@
|
||||
|
||||
|
||||
int sulogin_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
|
||||
int sulogin_main(int argc, char **argv)
|
||||
int sulogin_main(int argc ATTRIBUTE_UNUSED, char **argv)
|
||||
{
|
||||
char *cp;
|
||||
int timeout = 0;
|
||||
|
@ -18,21 +18,21 @@
|
||||
#include <sys/vt.h>
|
||||
#include "libbb.h"
|
||||
|
||||
static void release_vt(int signo)
|
||||
static void release_vt(int signo ATTRIBUTE_UNUSED)
|
||||
{
|
||||
/* If -a, param is 0, which means:
|
||||
* "no, kernel, we don't allow console switch away from us!" */
|
||||
ioctl(STDIN_FILENO, VT_RELDISP, (unsigned long) !option_mask32);
|
||||
}
|
||||
|
||||
static void acquire_vt(int signo)
|
||||
static void acquire_vt(int signo ATTRIBUTE_UNUSED)
|
||||
{
|
||||
/* ACK to kernel that switch to console is successful */
|
||||
ioctl(STDIN_FILENO, VT_RELDISP, VT_ACKACQ);
|
||||
}
|
||||
|
||||
int vlock_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
|
||||
int vlock_main(int argc, char **argv)
|
||||
int vlock_main(int argc ATTRIBUTE_UNUSED, char **argv)
|
||||
{
|
||||
struct vt_mode vtm;
|
||||
struct termios term;
|
||||
|
@ -103,7 +103,7 @@ static size_t unescape(char *s, int *nocr)
|
||||
|
||||
|
||||
int chat_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
|
||||
int chat_main(int argc, char **argv)
|
||||
int chat_main(int argc ATTRIBUTE_UNUSED, char **argv)
|
||||
{
|
||||
// should we dump device output? to what fd? by default no.
|
||||
// this can be controlled later via ECHO {ON|OFF} chat directive
|
||||
|
@ -158,7 +158,7 @@ static void crondlog(const char *ctl, ...)
|
||||
}
|
||||
|
||||
int crond_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
|
||||
int crond_main(int ac, char **av)
|
||||
int crond_main(int ac ATTRIBUTE_UNUSED, char **av)
|
||||
{
|
||||
unsigned opt;
|
||||
|
||||
|
@ -88,7 +88,7 @@ static int open_as_user(const struct passwd *pas, const char *file)
|
||||
}
|
||||
|
||||
int crontab_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
|
||||
int crontab_main(int argc, char **argv)
|
||||
int crontab_main(int argc ATTRIBUTE_UNUSED, char **argv)
|
||||
{
|
||||
const struct passwd *pas;
|
||||
const char *crontab_dir = CRONTABS;
|
||||
|
@ -79,7 +79,7 @@ static void eject_cdrom(const int fd, const unsigned long flags,
|
||||
}
|
||||
|
||||
int eject_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
|
||||
int eject_main(int argc, char **argv)
|
||||
int eject_main(int argc ATTRIBUTE_UNUSED, char **argv)
|
||||
{
|
||||
unsigned long flags;
|
||||
const char *device;
|
||||
|
@ -27,7 +27,7 @@
|
||||
#endif
|
||||
|
||||
int last_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
|
||||
int last_main(int argc, char **argv)
|
||||
int last_main(int argc, char **argv ATTRIBUTE_UNUSED)
|
||||
{
|
||||
struct utmp ut;
|
||||
int n, file = STDIN_FILENO;
|
||||
|
@ -41,7 +41,7 @@ static int xset1(int fd, struct termios *tio, const char *device)
|
||||
}
|
||||
|
||||
int microcom_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
|
||||
int microcom_main(int argc, char **argv)
|
||||
int microcom_main(int argc ATTRIBUTE_UNUSED, char **argv)
|
||||
{
|
||||
int sfd;
|
||||
int nfd;
|
||||
|
@ -17,7 +17,7 @@
|
||||
#define SIZE 8
|
||||
|
||||
int strings_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
|
||||
int strings_main(int argc, char **argv)
|
||||
int strings_main(int argc ATTRIBUTE_UNUSED, char **argv)
|
||||
{
|
||||
int n, c, status = EXIT_SUCCESS;
|
||||
unsigned opt;
|
||||
|
@ -651,7 +651,7 @@ static struct obj_symbol *arch_new_symbol(void);
|
||||
|
||||
static enum obj_reloc arch_apply_relocation(struct obj_file *f,
|
||||
struct obj_section *targsec,
|
||||
struct obj_section *symsec,
|
||||
/*struct obj_section *symsec,*/
|
||||
struct obj_symbol *sym,
|
||||
ElfW(RelM) *rel, ElfW(Addr) value);
|
||||
|
||||
@ -792,8 +792,9 @@ static char *m_fullName;
|
||||
/*======================================================================*/
|
||||
|
||||
|
||||
static int check_module_name_match(const char *filename, struct stat *statbuf,
|
||||
void *userdata, int depth)
|
||||
static int check_module_name_match(const char *filename,
|
||||
struct stat *statbuf ATTRIBUTE_UNUSED,
|
||||
void *userdata, int depth ATTRIBUTE_UNUSED)
|
||||
{
|
||||
char *fullname = (char *) userdata;
|
||||
char *tmp;
|
||||
@ -835,7 +836,7 @@ static struct obj_symbol *arch_new_symbol(void)
|
||||
static enum obj_reloc
|
||||
arch_apply_relocation(struct obj_file *f,
|
||||
struct obj_section *targsec,
|
||||
struct obj_section *symsec,
|
||||
/*struct obj_section *symsec,*/
|
||||
struct obj_symbol *sym,
|
||||
ElfW(RelM) *rel, ElfW(Addr) v)
|
||||
{
|
||||
@ -1751,7 +1752,7 @@ static int arch_list_add(ElfW(RelM) *rel, struct arch_list_entry **list,
|
||||
|
||||
#if defined(USE_SINGLE)
|
||||
|
||||
static int arch_single_init(ElfW(RelM) *rel, struct arch_single_entry *single,
|
||||
static int arch_single_init(/*ElfW(RelM) *rel,*/ struct arch_single_entry *single,
|
||||
int offset, int size)
|
||||
{
|
||||
if (single->allocated == 0) {
|
||||
@ -1899,7 +1900,7 @@ static void arch_create_got(struct obj_file *f)
|
||||
#if defined(USE_GOT_ENTRIES)
|
||||
if (got_allocate) {
|
||||
got_offset += arch_single_init(
|
||||
rel, &intsym->gotent,
|
||||
/*rel,*/ &intsym->gotent,
|
||||
got_offset, GOT_ENTRY_SIZE);
|
||||
|
||||
got_needed = 1;
|
||||
@ -1913,7 +1914,7 @@ static void arch_create_got(struct obj_file *f)
|
||||
plt_offset, PLT_ENTRY_SIZE);
|
||||
#else
|
||||
plt_offset += arch_single_init(
|
||||
rel, &intsym->pltent,
|
||||
/*rel,*/ &intsym->pltent,
|
||||
plt_offset, PLT_ENTRY_SIZE);
|
||||
#endif
|
||||
plt_needed = 1;
|
||||
@ -3220,7 +3221,7 @@ static int obj_relocate(struct obj_file *f, ElfW(Addr) base)
|
||||
|
||||
/* Do it! */
|
||||
switch (arch_apply_relocation
|
||||
(f, targsec, symsec, intsym, rel, value)
|
||||
(f, targsec, /*symsec,*/ intsym, rel, value)
|
||||
) {
|
||||
case obj_reloc_ok:
|
||||
break;
|
||||
@ -3299,7 +3300,7 @@ static int obj_create_image(struct obj_file *f, char *image)
|
||||
|
||||
/*======================================================================*/
|
||||
|
||||
static struct obj_file *obj_load(FILE * fp, int loadprogbits)
|
||||
static struct obj_file *obj_load(FILE * fp, int loadprogbits ATTRIBUTE_UNUSED)
|
||||
{
|
||||
struct obj_file *f;
|
||||
ElfW(Shdr) * section_headers;
|
||||
@ -4193,9 +4194,9 @@ static const char *moderror(int err)
|
||||
|
||||
#if !ENABLE_FEATURE_2_4_MODULES
|
||||
int insmod_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
|
||||
int insmod_main(int argc, char **argv)
|
||||
int insmod_main(int argc ATTRIBUTE_UNUSED, char **argv)
|
||||
#else
|
||||
static int insmod_ng_main(int argc, char **argv)
|
||||
static int insmod_ng_main(int argc ATTRIBUTE_UNUSED, char **argv)
|
||||
#endif
|
||||
{
|
||||
long ret;
|
||||
|
@ -141,7 +141,7 @@ int lsmod_main(int argc, char **argv)
|
||||
#else /* CONFIG_FEATURE_QUERY_MODULE_INTERFACE */
|
||||
|
||||
int lsmod_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
|
||||
int lsmod_main(int argc, char **argv)
|
||||
int lsmod_main(int argc ATTRIBUTE_UNUSED, char **argv ATTRIBUTE_UNUSED)
|
||||
{
|
||||
FILE *file = xfopen("/proc/modules", "r");
|
||||
|
||||
|
@ -435,7 +435,7 @@ static int arp_show(char *name)
|
||||
}
|
||||
|
||||
int arp_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
|
||||
int arp_main(int argc, char **argv)
|
||||
int arp_main(int argc ATTRIBUTE_UNUSED, char **argv)
|
||||
{
|
||||
char *hw_type;
|
||||
char *protocol;
|
||||
|
@ -245,7 +245,7 @@ static bool recv_pack(unsigned char *buf, int len, struct sockaddr_ll *FROM)
|
||||
}
|
||||
|
||||
int arping_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
|
||||
int arping_main(int argc, char **argv)
|
||||
int arping_main(int argc ATTRIBUTE_UNUSED, char **argv)
|
||||
{
|
||||
const char *device = "eth0";
|
||||
char *source = NULL;
|
||||
|
@ -321,15 +321,15 @@ static int process_packet(uint8_t * buf)
|
||||
/*
|
||||
* Exit on signal
|
||||
*/
|
||||
static void interrupt(int x)
|
||||
static void interrupt(int sig)
|
||||
{
|
||||
/* unlink("/var/run/dnsd.lock"); */
|
||||
bb_error_msg("interrupt, exiting\n");
|
||||
exit(2);
|
||||
kill_myself_with_sig(sig);
|
||||
}
|
||||
|
||||
int dnsd_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
|
||||
int dnsd_main(int argc, char **argv)
|
||||
int dnsd_main(int argc ATTRIBUTE_UNUSED, char **argv)
|
||||
{
|
||||
const char *listen_interface = "0.0.0.0";
|
||||
char *sttl, *sport;
|
||||
@ -387,6 +387,9 @@ int dnsd_main(int argc, char **argv)
|
||||
// Or else we can exhibit usual UDP ugliness:
|
||||
// [ip1.multihomed.ip2] <= query to ip1 <= peer
|
||||
// [ip1.multihomed.ip2] => reply from ip2 => peer (confused)
|
||||
|
||||
// TODO: recv_from_to
|
||||
|
||||
r = recvfrom(udps, buf, sizeof(buf), 0, &lsa->u.sa, &fromlen);
|
||||
if (OPT_verbose)
|
||||
bb_info_msg("Got UDP packet");
|
||||
|
@ -297,7 +297,7 @@ static const char ftpgetput_longopts[] ALIGN1 =
|
||||
#endif
|
||||
|
||||
int ftpgetput_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
|
||||
int ftpgetput_main(int argc, char **argv)
|
||||
int ftpgetput_main(int argc ATTRIBUTE_UNUSED, char **argv)
|
||||
{
|
||||
/* content-length of the file */
|
||||
unsigned opt;
|
||||
|
@ -1754,7 +1754,7 @@ static Htaccess_Proxy *find_proxy_entry(const char *url)
|
||||
* Handle timeouts
|
||||
*/
|
||||
static void exit_on_signal(int sig) ATTRIBUTE_NORETURN;
|
||||
static void exit_on_signal(int sig)
|
||||
static void exit_on_signal(int sig ATTRIBUTE_UNUSED)
|
||||
{
|
||||
send_headers_and_exit(HTTP_REQUEST_TIMEOUT);
|
||||
}
|
||||
@ -2275,7 +2275,7 @@ enum {
|
||||
|
||||
|
||||
int httpd_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
|
||||
int httpd_main(int argc, char **argv)
|
||||
int httpd_main(int argc ATTRIBUTE_UNUSED, char **argv)
|
||||
{
|
||||
int server_socket = server_socket; /* for gcc */
|
||||
unsigned opt;
|
||||
|
@ -150,7 +150,7 @@ static int release(char *master_ifname, char *slave_ifname);
|
||||
|
||||
|
||||
int ifenslave_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
|
||||
int ifenslave_main(int argc, char **argv)
|
||||
int ifenslave_main(int argc ATTRIBUTE_UNUSED, char **argv)
|
||||
{
|
||||
char *master_ifname, *slave_ifname;
|
||||
int rv;
|
||||
|
@ -530,7 +530,7 @@ static int dhcp_down(struct interface_defn_t *ifd, execfn *exec)
|
||||
#endif
|
||||
}
|
||||
|
||||
static int manual_up_down(struct interface_defn_t *ifd, execfn *exec)
|
||||
static int manual_up_down(struct interface_defn_t *ifd ATTRIBUTE_UNUSED, execfn *exec ATTRIBUTE_UNUSED)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
@ -1128,7 +1128,7 @@ static void clean_up_and_exit(int sig ATTRIBUTE_UNUSED)
|
||||
}
|
||||
|
||||
int inetd_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
|
||||
int inetd_main(int argc, char **argv)
|
||||
int inetd_main(int argc ATTRIBUTE_UNUSED, char **argv)
|
||||
{
|
||||
struct sigaction sa, saved_pipe_handler;
|
||||
servtab_t *sep, *sep2;
|
||||
@ -1492,7 +1492,7 @@ static void init_ring(void)
|
||||
}
|
||||
/* Character generator. MMU arches only. */
|
||||
/* ARGSUSED */
|
||||
static void chargen_stream(int s, servtab_t *sep)
|
||||
static void chargen_stream(int s, servtab_t *sep ATTRIBUTE_UNUSED)
|
||||
{
|
||||
char *rs;
|
||||
int len;
|
||||
|
@ -237,7 +237,7 @@ static char *UNSPEC_print(unsigned char *ptr)
|
||||
}
|
||||
|
||||
/* Display an UNSPEC socket address. */
|
||||
static const char *UNSPEC_sprint(struct sockaddr *sap, int numeric)
|
||||
static const char *UNSPEC_sprint(struct sockaddr *sap, int numeric ATTRIBUTE_UNUSED)
|
||||
{
|
||||
if (sap->sa_family == 0xFFFF || sap->sa_family == 0)
|
||||
return "[NONE SET]";
|
||||
|
@ -37,35 +37,35 @@ static int ip_do(int (*ip_func)(char **argv), char **argv)
|
||||
|
||||
#if ENABLE_FEATURE_IP_ADDRESS
|
||||
int ipaddr_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
|
||||
int ipaddr_main(int argc, char **argv)
|
||||
int ipaddr_main(int argc ATTRIBUTE_UNUSED, char **argv)
|
||||
{
|
||||
return ip_do(do_ipaddr, argv);
|
||||
}
|
||||
#endif
|
||||
#if ENABLE_FEATURE_IP_LINK
|
||||
int iplink_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
|
||||
int iplink_main(int argc, char **argv)
|
||||
int iplink_main(int argc ATTRIBUTE_UNUSED, char **argv)
|
||||
{
|
||||
return ip_do(do_iplink, argv);
|
||||
}
|
||||
#endif
|
||||
#if ENABLE_FEATURE_IP_ROUTE
|
||||
int iproute_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
|
||||
int iproute_main(int argc, char **argv)
|
||||
int iproute_main(int argc ATTRIBUTE_UNUSED, char **argv)
|
||||
{
|
||||
return ip_do(do_iproute, argv);
|
||||
}
|
||||
#endif
|
||||
#if ENABLE_FEATURE_IP_RULE
|
||||
int iprule_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
|
||||
int iprule_main(int argc, char **argv)
|
||||
int iprule_main(int argc ATTRIBUTE_UNUSED, char **argv)
|
||||
{
|
||||
return ip_do(do_iprule, argv);
|
||||
}
|
||||
#endif
|
||||
#if ENABLE_FEATURE_IP_TUNNEL
|
||||
int iptunnel_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
|
||||
int iptunnel_main(int argc, char **argv)
|
||||
int iptunnel_main(int argc ATTRIBUTE_UNUSED, char **argv)
|
||||
{
|
||||
return ip_do(do_iptunnel, argv);
|
||||
}
|
||||
@ -73,7 +73,7 @@ int iptunnel_main(int argc, char **argv)
|
||||
|
||||
|
||||
int ip_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
|
||||
int ip_main(int argc, char **argv)
|
||||
int ip_main(int argc ATTRIBUTE_UNUSED, char **argv)
|
||||
{
|
||||
static const char keywords[] ALIGN1 =
|
||||
USE_FEATURE_IP_ADDRESS("address\0")
|
||||
|
@ -76,7 +76,7 @@ static int do_rd(int fd, void **paramp)
|
||||
return retval;
|
||||
}
|
||||
|
||||
static int do_timeout(void **paramp)
|
||||
static int do_timeout(void **paramp ATTRIBUTE_UNUSED)
|
||||
{
|
||||
return 1; /* terminate session */
|
||||
}
|
||||
@ -93,7 +93,7 @@ static void inetd_mode(void)
|
||||
}
|
||||
|
||||
int fakeidentd_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
|
||||
int fakeidentd_main(int argc, char **argv)
|
||||
int fakeidentd_main(int argc ATTRIBUTE_UNUSED, char **argv)
|
||||
{
|
||||
enum {
|
||||
OPT_foreground = 0x1,
|
||||
|
@ -39,7 +39,9 @@ static struct idxmap *find_by_index(int idx)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
int ll_remember_index(struct sockaddr_nl *who, struct nlmsghdr *n, void *arg)
|
||||
int ll_remember_index(struct sockaddr_nl *who ATTRIBUTE_UNUSED,
|
||||
struct nlmsghdr *n,
|
||||
void *arg ATTRIBUTE_UNUSED)
|
||||
{
|
||||
int h;
|
||||
struct ifinfomsg *ifi = NLMSG_DATA(n);
|
||||
|
@ -177,7 +177,7 @@ static void unarm(void)
|
||||
}
|
||||
|
||||
/* timeout and other signal handling cruft */
|
||||
static void tmtravel(int sig)
|
||||
static void tmtravel(int sig ATTRIBUTE_UNUSED)
|
||||
{
|
||||
unarm();
|
||||
longjmp(jbuf, 1);
|
||||
|
@ -486,7 +486,7 @@ static void do_info(const char *file, const char *name, int (*proc)(int, char *)
|
||||
}
|
||||
|
||||
int netstat_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
|
||||
int netstat_main(int argc, char **argv)
|
||||
int netstat_main(int argc ATTRIBUTE_UNUSED, char **argv)
|
||||
{
|
||||
const char *net_conn_line_header = PRINT_NET_CONN_HEADER;
|
||||
unsigned opt;
|
||||
|
@ -174,7 +174,7 @@ static void ping6(len_and_sockaddr *lsa)
|
||||
#endif
|
||||
|
||||
int ping_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
|
||||
int ping_main(int argc, char **argv)
|
||||
int ping_main(int argc ATTRIBUTE_UNUSED, char **argv)
|
||||
{
|
||||
len_and_sockaddr *lsa;
|
||||
#if ENABLE_PING6
|
||||
@ -495,7 +495,7 @@ static void unpack4(char *buf, int sz, struct sockaddr_in *from)
|
||||
}
|
||||
}
|
||||
#if ENABLE_PING6
|
||||
static void unpack6(char *packet, int sz, struct sockaddr_in6 *from, int hoplimit)
|
||||
static void unpack6(char *packet, int sz, /*struct sockaddr_in6 *from,*/ int hoplimit)
|
||||
{
|
||||
struct icmp6_hdr *icmppkt;
|
||||
char buf[INET6_ADDRSTRLEN];
|
||||
@ -658,7 +658,7 @@ static void ping6(len_and_sockaddr *lsa)
|
||||
hoplimit = *(int*)CMSG_DATA(mp);
|
||||
}
|
||||
}
|
||||
unpack6(packet, c, &from, hoplimit);
|
||||
unpack6(packet, c, /*&from,*/ hoplimit);
|
||||
if (pingcount > 0 && nreceived >= pingcount)
|
||||
break;
|
||||
}
|
||||
@ -683,7 +683,7 @@ static void ping(len_and_sockaddr *lsa)
|
||||
}
|
||||
|
||||
int ping_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
|
||||
int ping_main(int argc, char **argv)
|
||||
int ping_main(int argc ATTRIBUTE_UNUSED, char **argv)
|
||||
{
|
||||
len_and_sockaddr *lsa;
|
||||
char *opt_c, *opt_s;
|
||||
|
@ -31,7 +31,7 @@ static const char *port_name(unsigned port)
|
||||
#define MONOTONIC_US() ((unsigned)monotonic_us())
|
||||
|
||||
int pscan_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
|
||||
int pscan_main(int argc, char **argv)
|
||||
int pscan_main(int argc ATTRIBUTE_UNUSED, char **argv)
|
||||
{
|
||||
const char *opt_max_port = "1024"; /* -P: default max port */
|
||||
const char *opt_min_port = "1"; /* -p: default min port */
|
||||
|
@ -539,7 +539,7 @@ void bb_displayroutes(int noresolve, int netstatfmt)
|
||||
|
||||
#if ENABLE_FEATURE_IPV6
|
||||
|
||||
static void INET6_displayroutes(int noresolve)
|
||||
static void INET6_displayroutes(void)
|
||||
{
|
||||
char addr6[128], *naddr6;
|
||||
/* In addr6x, we store both 40-byte ':'-delimited ipv6 addresses.
|
||||
@ -642,7 +642,7 @@ static const char tbl_verb[] ALIGN1 =
|
||||
;
|
||||
|
||||
int route_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
|
||||
int route_main(int argc, char **argv)
|
||||
int route_main(int argc ATTRIBUTE_UNUSED, char **argv)
|
||||
{
|
||||
unsigned opt;
|
||||
int what;
|
||||
@ -675,7 +675,7 @@ int route_main(int argc, char **argv)
|
||||
int noresolve = (opt & ROUTE_OPT_n) ? 0x0fff : 0;
|
||||
#if ENABLE_FEATURE_IPV6
|
||||
if (opt & ROUTE_OPT_INET6)
|
||||
INET6_displayroutes(noresolve);
|
||||
INET6_displayroutes();
|
||||
else
|
||||
#endif
|
||||
bb_displayroutes(noresolve, opt & ROUTE_OPT_e);
|
||||
|
@ -252,7 +252,7 @@ static void pop3_message(const char *filename)
|
||||
#endif
|
||||
|
||||
int sendgetmail_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
|
||||
int sendgetmail_main(int argc, char **argv)
|
||||
int sendgetmail_main(int argc ATTRIBUTE_UNUSED, char **argv)
|
||||
{
|
||||
llist_t *opt_recipients = NULL;
|
||||
|
||||
|
@ -114,13 +114,13 @@ static void set_state(struct termios *state, int encap)
|
||||
}
|
||||
}
|
||||
|
||||
static void sig_handler(int signo)
|
||||
static void sig_handler(int signo ATTRIBUTE_UNUSED)
|
||||
{
|
||||
restore_state_and_exit(0);
|
||||
}
|
||||
|
||||
int slattach_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
|
||||
int slattach_main(int argc, char **argv)
|
||||
int slattach_main(int argc ATTRIBUTE_UNUSED, char **argv)
|
||||
{
|
||||
/* Line discipline code table */
|
||||
static const char proto_names[] ALIGN1 =
|
||||
|
@ -338,7 +338,7 @@ free_session(struct tsession *ts)
|
||||
|
||||
#endif
|
||||
|
||||
static void handle_sigchld(int sig)
|
||||
static void handle_sigchld(int sig ATTRIBUTE_UNUSED)
|
||||
{
|
||||
pid_t pid;
|
||||
struct tsession *ts;
|
||||
@ -360,7 +360,7 @@ static void handle_sigchld(int sig)
|
||||
}
|
||||
|
||||
int telnetd_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
|
||||
int telnetd_main(int argc, char **argv)
|
||||
int telnetd_main(int argc ATTRIBUTE_UNUSED, char **argv)
|
||||
{
|
||||
fd_set rdfdset, wrfdset;
|
||||
unsigned opt;
|
||||
|
@ -392,7 +392,7 @@ static int tftp( USE_GETPUT(const int cmd,)
|
||||
}
|
||||
|
||||
int tftp_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
|
||||
int tftp_main(int argc, char **argv)
|
||||
int tftp_main(int argc ATTRIBUTE_UNUSED, char **argv)
|
||||
{
|
||||
len_and_sockaddr *peer_lsa;
|
||||
const char *localfile = NULL;
|
||||
|
@ -129,7 +129,7 @@ static uint8_t* alloc_dhcp_option(int code, const char *str, int extra)
|
||||
|
||||
|
||||
int udhcpc_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
|
||||
int udhcpc_main(int argc, char **argv)
|
||||
int udhcpc_main(int argc ATTRIBUTE_UNUSED, char **argv)
|
||||
{
|
||||
uint8_t *temp, *message;
|
||||
char *str_c, *str_V, *str_h, *str_F, *str_r, *str_T, *str_A, *str_t;
|
||||
|
@ -23,7 +23,7 @@ struct dhcpOfferedAddr *leases;
|
||||
|
||||
|
||||
int udhcpd_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
|
||||
int udhcpd_main(int argc, char **argv)
|
||||
int udhcpd_main(int argc ATTRIBUTE_UNUSED, char **argv)
|
||||
{
|
||||
fd_set rfds;
|
||||
struct timeval tv;
|
||||
|
@ -8,7 +8,7 @@
|
||||
#include "dhcpd.h"
|
||||
|
||||
int dumpleases_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
|
||||
int dumpleases_main(int argc, char **argv)
|
||||
int dumpleases_main(int argc ATTRIBUTE_UNUSED, char **argv)
|
||||
{
|
||||
int fd;
|
||||
int i;
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user